Page 1 of 1

VLF-ONE Add Command Definition - Command Not Found

Posted: Thu Aug 31, 2017 12:12 am
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 8121 times
Command Definition
Test Command.PNG
Test Command.PNG (66.88 KiB) Viewed 8121 times
Business Object Commands
Object Commands.PNG
Object Commands.PNG (105.11 KiB) Viewed 8121 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?

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

Posted: Thu Aug 31, 2017 7:37 am
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.

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

Posted: Thu Aug 31, 2017 7:46 am
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 8107 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.

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

Posted: Thu Aug 31, 2017 8:14 am
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.

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

Posted: Thu Aug 31, 2017 8:46 am
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.