VLF-ONE Add Command Definition - Command Not Found

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

VLF-ONE Add Command Definition - Command Not Found

Post by jyoung »

Related to my avSwitch issue viewtopic.php?f=3&t=1507 I think I may have come up with a work around but it requires adding a new command definition.

After I have added the command, when I execute the framework, I get an error that the command cannot be found.
Error.PNG
Error.PNG (10.59 KiB) Viewed 8115 times
Command Definition
Test Command.PNG
Test Command.PNG (66.88 KiB) Viewed 8115 times
Business Object Commands
Object Commands.PNG
Object Commands.PNG (105.11 KiB) Viewed 8115 times
Inside the framework's XML file I can find it.

Code: Select all

<MEMBER CLASS="VF_FP009" ID="8285CE461E0B49B9A0ABDACF2CD9500B" RUN="N">
<PROPERTY NAME="IP_LAST" VALUE="20170830-085634-JRYOUNG"/>
<PROPERTY NAME="UCAPTION" LANG="ENG" VALUE="Test"/>
<PROPERTY NAME="UUSEROBJECTTYPE" VALUE="COMMAND_TEST"/>
</MEMBER>
But it cannot be found inside the framework's .DAT file. Don't know if that is important or not, it seems important as it has other commands in it.

I've saved and restarted the framework.

How do I add a new command definition?
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE Add Command Definition - Command Not Found

Post by MarkD »

Can you try this:

-> Reopen framework in workbench again.
-> Check the command is still defined in Command definitions.
-> Check the command reference still exists in the business object.
-> Force a save or make a dummy change and resave to regenerate the VLF-ONE dat file.

Does that make the command missing problem go away?

There is also an option on the new Common Activities tab to add a new command to a business object.
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: VLF-ONE Add Command Definition - Command Not Found

Post by jyoung »

I've saved and restarted the Workbench multiple times and the commands are still there, but still get the error.

While fumbling around, I discovered that if I edit the version number and save, the problem seems to go away and the command is in the DAT file.
framework properties.PNG
framework properties.PNG (84.96 KiB) Viewed 8101 times
I've created another command, saved, restarted and the same problem. Edit the version number, save, restart and the problem goes away.

Not suggesting its tied to the version number, only that the version number was the way I was able to get it to work.
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE Add Command Definition - Command Not Found

Post by MarkD »

I think its just doing a second save and restart that causes an internal table to get rebuilt.
- Add new command.
- Save and restart.
- Open again.
- Dummy change (eg: version number) or just force a resave.
- Open again and run VLF-ONE app.
Problem should go away.
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE Add Command Definition - Command Not Found

Post by MarkD »

Okay – this seems to circumvent the problem.
• Add new command definition
• Add the new command's reference to business object(s) + snap in command handler.
• Use save and restart.
• Immediately save and restart again (2nd time) – elect to force a new save to regenerate VLF-ONE DAT file.
• Now execute VLF-ONE application.

Alternatively use the Custom command on the business object’s Common Activities tab – but that will create a command handler stub that you would have to delete.
Post Reply