cancel
Showing results for 
Search instead for 
Did you mean: 

PO workflow - Released event triggered

0 Kudos

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.

Thanks,

Jeff Mathieson

Accepted Solutions (1)

Accepted Solutions (1)

former_member185167
Active Contributor
0 Kudos

Hello,

I don't understand the scenario.

"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. "

It seems to me you are assuming there is only one approver for 04 and that he will approve so you go ahead and pre-approve levels 01, 02 and 03. What if he doesn't approve? I would do it differently: wait for him to approve 01 and then automatically approve 02, 03 and 04.

I'll have to check if wait-for events can receive parameters. I suppose if they can and it fails the test you could generate another wait-for step.

regards

Rick Bakker / hanabi technology

0 Kudos

Rick,

You are correct, there is only one approver for 04.  If he doesn't approve, the workflow is routed back to the PO creator to make changes and the process starts over again.  That is the business process that we have.  I tried receiving in the release code from the release event, comparing it to the release code that created the workflow, if they don't match then creating another wait event.  My problem is that when the released event is triggered, all other parallel branches are closed.  I guess it may be possible to put this all in some sort of loop, and only exit the loop if the release codes match. 

Jeff

Answers (3)

Answers (3)

0 Kudos

If anyone is interested - I ended up binding the release code from the event to the workflow container (EventRelCode), put the Wait for Released inside a loop checking that the release code = EventRelCode, and then putting a condition on my Fork to check release code = EventRelCode.  This way the branches of the fork aren't completed until the correct release code is passed in, and a new wait event is created if the Released event isn't for the correct release code.  So far in my initial testing this is working.  Thank you all for your suggestions.

former_member185167
Active Contributor
0 Kudos

Thank you for the follow-up, always very useful.

Former Member
0 Kudos

Hi Jeff,

r u check on prerequisites on configuration. you asking where is maintain the workflow configuration on your MM functional lead.

i think this problem may maintain in user maintain Ztable or configuration part.

Regards

MSR

afsar_ashraf
Participant
0 Kudos

Hello Jeff,

Probably you can try this.

1. Wait for event step can receive values from the event container.Create a workflow container element "ReleaseCodeFromEvent", and bind this value to the event container value.

2. Make use of the conditions tab in wait step, to check whether "ReleaseCode" and "ReleaseCodeFromEvent" values matches & complete the workitem

Regards,

Afsar

0 Kudos

Afsar,

I tired that but the condition on the wait step is evaluated before the event container value is passed to the workflow container.  I didn't see any condition that can compare the event container to the workflow container.  Have you been able to do that?

Jeff

anjan_paul
Active Contributor
0 Kudos

Hi,

   You create an element suppose newrelease in workflow container.

  Then you bind the value in wait for event. Whenver event receives the element will receive the parameters value.

Then put a condition step where you check that is newrelease is equal to ReleaseCode or not.

afsar_ashraf
Participant
0 Kudos

Hi Jeff,

You are right, condition in the wait step is evaluated before the event container value is passed to the workflow container. I guess you dont have a choice but to keep the wait & subsequent steps inside a loop and recreate the wait step based on the release code received from the event container!!

Regards,

Afsar