on 11-27-2014 8:20 PM
Dear SDNers,
I am facing problem in travel request workflow. I am using both CHANGE, REQUESTAPPROVED and CANCELLED events at wait step.
When request approved by manager, both events REQUESTAPPROVED and CHANGE are triggering at same time. But as per my requirement, when request approved, mail has to be sent to other level approvers and initiator of workflow. And when any change has happened on request, workflow has to complete.
But due to both events triggering at same time, workflow is getting completed with out sending mails to users as change event has been triggered. I also used dummy method to wait for 10 seconds after change event triggered. So that mails shall go to users through REQUESTAPPROVED event, even though luck. attaching below screen shots for reference. Kindly guide me.
First screen shot gives change event path and second screen shot refers the approved event path.
Both events triggered same time, but through change event workflow is coming out from fork.
Please put some light on this issue.
Thanks in Advance,
Regards,
Venkat
Hello Nath,
It is probably a bit more info required about the business requirements. But why are you using the event REQUESTAPPROVED at all? If the approval of the request is via the workflow only, you just need to implement proper logic after the approval task in the workflow. In the fork, you only need to have 2 branches then (and necessary branches set to 01):
1. for the CHANGE event that would, e.g., complete the current workflow instance or restart the workflow.
2. the actual approval logic with the approval task. Here you can implement the notification to other approvers etc.
Regards,
Shahram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Open the fork step. How many of the branches are required/necessary? If you have two branches (as it seems from the screenshot), then set 2 as required branches. This means that both of the branches of the fork need to be completed before the workflow can complete. I believe this will solve your problem.
The above method can cause another problem though. If in some cases only of the events get triggered, then the workflow will not complete, since it will be waiting for the second branch to get completed, and this might never happen depending on your business process, right? There are multiple different ways to solve this, but let's check first the above mentioned easiest solution.
Kind regards,
Karri
PS. Do not use any dummy steps with ABAP statement WAIT FOR n SECONDS. This is in 99% (or let's say 100%) cases wrong. Use the different workflow step types to achieve different "waiting functionality" (wait for events, wait for conditions, etc.).
You could also separate the logic from the other branch to a completely different workflow. For example if you just need to send some emails after the request has been approved, just create a new event linkage in SWETYPV (for the APPROVED event) and start a new workflow, and send the emails there.
It's really hard to say what is the best approach since I don't know what else is going on in the your workflow and what is the whole idea behind it. Normally it is perhaps best to try to include everything that is related to a same business process into one workflow (with perhaps some sub-workflows), but in some cases you can separate the functionality into separate workflows too.
Regards,
Karri
Dear Karri,
I implemented your mentioned first logic.i.e., i mentioned necessary branches to complete as 02. Even though "CHANGE" event branch is completing and "APPROVED" event branch not completing. Please find below screen shots
I can design another workflow, but i required attachments, approves which are available at this workflow.
Kindly suggest any other clue.
I also mentioned deadline time at wiat step, but no luck
If I understand correctly your screenshot (some critical parts are too unclear), you have fork already in the beginning of the workflow, and then again later. Did you change the necessary branches for the first fork? It looks like the right branch of the first fork gets completed, but now the workflow does not end, since it is still waiting for the second branch to get completed. So something has changed, right?
Are you sure that the workflow does not get into an error? In one of your screenshots (screen 3) I see something red? the graphical log that you are using is actually not the greatest tool for serious problem solving. It looks little bit like the wait for approved event step gets completed, but then something happens, and the green line stops in the first container operation step. Maybe you have an error in the email sending step that follows?
What is the status of the workflow?
Regards,
Karri
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.