on 05-22-2016 1:08 PM
Hi all,
I have built a custom PO release workflow for event BUS2012 ReleaseStepCreated but we have got some business scenarios and we don't know how to handle them.
I know the below question would have been asked a lot in the forum but i am not getting appropriate answers.
1.Workflow is created whenever release strategy is created and the event is triggered.So when a PO is created a workflow is created.
But when the same PO is changed and for some reason the release strategy is triggered again ,then a new workflow is triggered again.
So how to logically delete or remove,or complete the previously created workflow .
2 . After approval of work item at user decision, i am calling BUS2012 Release method in a task .But if the release fails due to any reason(for eg ,the PO is in edit mode by another user),then the entire workflow goes into error.
We can ask the initiator to restart the workflow from SWPR but how to notify the initiator in case of error.
We dont have a workflow admin on the client side :(.
Any advice would be very helpful.
Regards
Suman.
The issue has been fixed.
PFB the solution.
Writing the event is Version dependent part in Workflow will not work because the same event will get triggered when User rejects the PO release.
So I had to create in the workflow to check for SignificantlyChanged event in one branch and the remaining workflow process in the other branch.
In the waiting branch , I am checking if no action taken by user ,then cancel workflow,
else wait for a local event.
I am raising a local event after all the steps are complete in the other branch..
Hope I am clear in explaining the solution.
Regards
Suman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
After doing the suggested changes the workflow is getting cancelled whenever the event Significantly changed gets triggered and the workflow gets cancelled
But now a new issue has cropped up.
Whenever the work item is approved or rejected ,then the event gets triggered ,and the workflow gets logically deleted.
Kindly advise,
Regards
Suman.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The solution to maintaining events at version dependent in workflow version is not working.
The old PO workitem is not getting deleted even when the PO is changed.
Do we need to do any other settings apart from maintaining the events?
Attached the snapshot for workflow.
Kindly advise if I have missed anything.
Regards
Suman.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Former Member,
yes i put a trace ,checked it. Whenever I am changging the amount to trigger the release strategy then first SignificantlyChanged event is triggered and then ReleaseStepCreated event is triggered.
One more thing when i am creating the event mapping as per snapshot I am getting the warning Local event <event name > not used.
Any idea what needs to be done?
Regards
Suman.
For point 2 you either not allow user to change the PO once release workflow is triggered and completed or you can return a flag in your task method in any error occur while approving, based on that flag you can send a mail to notify initiator.
Thanks,
Rajeev Goswami
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did you maintain the Terminating event with proper binding with SIGNIFICANTLYCHANGED event of Release of Purchase order step task. Then whevenever Significantly change happend, old workitem will deleted from inbox of agent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Workflow will complete or not depends on the design. If there is no further foreground step, then it will complete like in WS20000075.
If you do it other way, then go to basic data - >Version Dependant -> Events. Maintain the SIGNIFICANTLYCHANGED event there and select Cancel Workflow in Receiver Tyep. Then directly workflow will cancel
Hi Anjan,
I have further background steps after the task .
Also one quick question.
If we maintain the event as suggested by you ,will it delete the older workflow.
For eg. If I create a PO the workflow gets triggered.
If i change the workflow then significantly changed event will be triggered ,which in turn will trigger the ReleaseStepCreated event and a new workflow will start.
So if I maintain the settings as suggested how would the workflow know to delete the old workflow and not the new one ?
Regards
Suman
Hi,
Does your Custom workflow has 2 start events? (ReleaseStepCreated & Changed).
If not, i think when you change the PO, Significantly changed event is triggered which inturn triggers ReleaseStepCreated. So according to me, keep a wait step for 'Significantly Changed'. This will complete the existing instance of the workflow.
Check SWEL and get to know about the events triggered while creating, changing the PO.
Thanks,
Anas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.