NJ
Hi Team,
Can you please let mw know how to trigger APG through script ,I have requirement where need to trigger an email whenever models comes in deleted folder ,please help me out.
const APG_PROCESS_GUID = "12345678-9abc-def0-123456789abcdef0"; // GUID of BPMN workflow model in APG database
var g_oAPG = Context.getComponent("process");
var runresult = g_oAPG.run(APG_PROCESS_GUID, [o_Model]); // [o_Model] is the list of models/objects for the WF (just 1 model in this case)
if(runresult.getInstanceId ( ) != ""){ // get the ProcessInstanceID
// all is well
}else{
g_sMessage = g_sMessage + "\n" + o_Model.Name(g_nLoc) + " [" +o_Model.Type()+ "]: Could not start workflow. Please inform your administrator.";
}