So...the email which is generated has an incorrect work item ID in the URL which does not opens the right WD app for you ? Right?
If yes, You need to change the steps.
- Create a fork 2 of 2
- In one branch send the WI
- In the second branch, create an activity step to generate the URL
- But this step should start AFTER a minute (after the Dialog Step gets created in the parallel branch) - for that set the Requested Start to WI Creation date and time + 1 minute so that it starts a bit late (by that time the Decision Step would have been instantiated in the parallel branch)
- Then in the URL generation step - use the Main WF ID and call FM SAP_WAPI_GET_CHILD_WORKITEMS
- You will get the WORKLIST parameter will all WI IDS within that WF, filter it where:
- WORKLIST-WI_TYPE = 'W' - dialog Steps
- WORKLIST-WI_RH_TASK = TSxxxxxxxx - the decision step task
- WORKLIST-WI_STAT = 'READY' or 'STARTED'
- You will get the Work item ID of your actual decision step which just got generated .... in WORKLIST-WI_ID
- Use it to create the URL
- In the same branch - send the email
Regards,
Modak