Skip to Content
Apr 27, 2012 at 06:13 PM

PO workflow - Released event triggered


Our PO workflow is triggered off of BO BUS2012 event RELEASESTEPCREATED, standard stuff. Our process is that if an agent at a release code has authorization for release codes below, those release codes will be "automatically approved" in the workflow. For example, I have a PO with release codes 00, 01, 02, 03, 04. An agent is found for release code 00, workflow is executed, release code 00 is effected and a workflow is created for release code 01. The approver for release code 04 has approval for release codes 01, 02, 03 and 04. So the workflows for 01, 02, and 03 are all automatically approved, and then the workflow for release code 04 is created and sent to the agent. Our workflow also has a Wait for Event step waiting for the RELEASED event, that way if a user releases the PO outside of the workflow the workflow will complete.

Now for my problem, a timing issue. As the workflow for release code 03 is automatically approved, the release step 04 is created triggering that workflow. However, it appears that the database commits are a little off because the release for 03 is actually triggered after the 04 workflow is created. So the 03 release triggers the RELEASED event on the 04 workflow, processing the 03 workflow and closing the 04 workflow. I can see the 03 release code on the container of the RELEASED event on the 04 workflow. What I want to do is somehow compare the release code on the RELEASED event to the release code in the workflow container, and only process the RELEASED event if they match. Any ideas how best to accomplish that? I thought there would be a condition that I could use on the Wait event, but I don't see that I can compare the Event container to the workflow container.

Any ideas are welcomed.


Jeff Mathieson