The same admin_execute that is being performed in the ao_actions.mrl, you could call in an execute rule (or other rule phase).
This post has an example already written of executing the admin_execute in the Execute rule phase:
I am executing remote action for agent restart workflow. I have written below rule to execute remote action but at compilation getting below error :
where [ $SV.mc_object_class equals 'PROACTIVENET_COMPONENT' AND $SV.status equals 'OPEN' AND $SV.severity equals 'CRITICAL']
admin_execute(BEMGW,$SV,"Atrium_Orchestrator_Agent_Restart_Workflow",["false","normal","false","true","BMC Impact Manager"],YES);
ntadd($SV,'remote action test');
Please let me know if I am missing something.
Thanks in advance.
The 'triggers' clause is not valid syntax for the Execute rule phase. That is used only in the New rule phase. Here are the syntax details for the Execute rule phase:
Thank you so much.
Now I am able to Trigger remote action through execute rule for below workflow :
using admin_execute(BEMGW,$EV,"Atrium_Orchestrator_Agent_Restart_Workflow",["false","normal","false","true","BMC Impact Manager"],YES);
But unable to understand, how to call remote action for service restart workflow. It needs host,servicename and service action parameter to pass dynamically in admin _execute primitive.
admin_execute(BEMGW,$EV,"Atrium_Orchestrator_Service_Restart_ Workflow",[$CREATECHANGERQUEST, $CHANGEREQUESTTYPE,$UID,$HOST,$SERVICE,$SERVICE_ACTION],YES);
Thanks & Regards,