VLF-ONE avSwitch Failed
Posted: Wed Aug 30, 2017 6:03 am
I am trying to switch from one object to another in VLF-ONE and execute a command. When I do I get an "avSwitch" failed error.
If I don't include the execute parameter the switch occurs fine and the other object's (Time Cards) filter is displayed. In this instance however, I have a specific time card identified and and I want to show the details.
Here is my object definition and the command definition The command shows that the COMMAND_DETAILS is enabled.
I am trying to execute it as such, eventually passing a "caller reference" that contains the required identifiers.
The docs are not specific on "which" user object name / type name to use. If I use CMG_TIME_CARD_DETAILS (from the object command) then I get the error shown above. If I use COMMAND_DETAILS I get an error saying its not enabled.
The trace output shows its trying to invoke the command
What am I missing? How do I switch to an object and execute a command?
EDIT
Following the examples in DF_DET54O it uses the user object name defined in the command definition not in the object's commands. So use COMMAND_DETAILS instead of CMG_TIME_CARD_DETAILS an I get the error
Further comparison with the example shows a difference between my command being an "Instance" command and the example being a "Object" command. Changing my command to be an "object" command fires up the details command, but breaks my Time Card object as its filter no longer triggers the details command.
So it looks like one has to be an instance command while the other has to be an object command.
Which means that I cannot reuse commands and I will effectively have two commands that do the exact same thing!
I can make that work and still keep my maintenance overhead low, just want to make sure that is how it is "supposed" to work.
Is that right?
Here is my object definition and the command definition The command shows that the COMMAND_DETAILS is enabled.
I am trying to execute it as such, eventually passing a "caller reference" that contains the required identifiers.
Code: Select all
#avFrameworkManager.avSwitch caller(#COM_OWNER) toobjectnamed(CMG_TIME_CARDS) execute(CMG_TIME_CARD_DETAILS)
The trace output shows its trying to invoke the command
Code: Select all
47:38.8 VF_SY001O HandleVLFSwitch:ToObjectNamed(CMG_TIME_CARDS)
47:38.8 VF_SY001O HandleVLFSwitch:Execute(CMG_TIME_CARD_DETAILS)
47:38.8 VF_SY001O HandleVLFSwitch:Caller(CMGCBDC01)
EDIT
Following the examples in DF_DET54O it uses the user object name defined in the command definition not in the object's commands. So use COMMAND_DETAILS instead of CMG_TIME_CARD_DETAILS an I get the error
EDITavSwitch failed. The command named COMMAND_DETAILS associated with the object named CMG_TIME_CARDS is not currently enabled.
Further comparison with the example shows a difference between my command being an "Instance" command and the example being a "Object" command. Changing my command to be an "object" command fires up the details command, but breaks my Time Card object as its filter no longer triggers the details command.
So it looks like one has to be an instance command while the other has to be an object command.
Which means that I cannot reuse commands and I will effectively have two commands that do the exact same thing!
I can make that work and still keep my maintenance overhead low, just want to make sure that is how it is "supposed" to work.
Is that right?