Hi Steven,
Is there a way you can stop the workflow followed by changing the status as a Single Transaction ? I am trying to do this via an Interface, it expects the Mboset associated with the wfInstance needs to be saved first before you can change the status, otherwise it gives the PVStatus error on status change
The reason i need to do it as 1 transaction, if for some reason the status changes fails, it would be a partial commit, as the mbo is out of the workflow.
I tried adding the WFInstanceMboSet to the MxTransaction, still did not work.
Thanks,
Pratap
------------------------------
Pratap Seetharaman
DTE Energy
------------------------------
Original Message:
Sent: 06-30-2021 08:29
From: Steven Shull
Subject: Does anyone know how to stop a workflow through automation script?
I haven't had to do this personally, so I'd look deeper into this and make sure it works as you intend. But I believe you just have to get the workflow instance MBO record that you want to stop and then invoke the stopWorkflow(memo) method. Something like:
wfInstanceSet=mbo.getMboSet("$EMXWFINSTANCE","WFINSTANCE","processname='MYWORKFLOW' and ownertable='WORKORDER' and ownerid=:workorderid and active=1")wfInstanceMbo=wfInstanceSet.moveFirst()if wfInstanceMbo: wfInstanceMbo.stopWorkflow("Stopped via script")
------------------------------
Steven Shull
Projetech Inc.
Original Message:
Sent: 06-30-2021 08:06
From: André Cordeiro
Subject: Does anyone know how to stop a workflow through automation script?
Does anyone know how to stop a workflow through automation script?
Thx
#Customizations
#EverythingMaximo
------------------------------
André Cordeiro
AQUASIS
------------------------------