Executing Actions Programmatically
In some rare cases it might be necessary to execute server actions programmatically. This allows to substitute default implementations of UI procedures with some customized procedures and/or automated responses.
To execute an action programmatically:
- Get action's
Contextobject from aContextManager - Call
ActionsUtils.initAction()static method providing theContextand action name.ActionExecutionModeshould be set either toNORMALor toHEADLESSif no human operator is actually executing UI procedures.initAction()will return anActionIdentifierto be later used for stepping the action. - Call
ActionsUtils.stepAction()in a loop until it returns null. Every iteration ofstepAction()will return a certain UI procedure to be manually executed as aGenericActionCommand. Each call starting from the second one should include your manually formedGenericActionResponseto the previously receivedGenericActionCommand. - Process each
GenericActionCommandaccording to its type, parameters and title.
![]() | Each action is running as a separate Iotellect Server thread. If, for some reason, you will stop calling |
Was this page helpful?
