cancel
Showing results for 
Search instead for 
Did you mean: 

How to find correct user decision step and complete it?

Former Member
0 Kudos

Hello All and Gurus! My question is not as complex, as difficult for me from logical point of view:
I have to develop one thing:
1. Create a user-decision task in a big workflow, to inform user, that process that was asked on the previous step was run and we are waiting for the result(the whole workflow should wait for it).
2. When custom function is finished(not in workflow), and files are attached to the BO, user-decision step from p.1 should be executed automatically with status "success".

I know about function SAP_WAPI_DECISION_COMPLETE, but I don't know how to transport WORKITEM_ID to a Custom code, that was not executed in workflow? And how decide for which BO user-decision should be executed(in case we have several similar waits for different BOs)?

Could you please suggest something? Other variants are also possible (may be send letter and wait for event, when attached- raise event)

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member16044
Active Participant
0 Kudos

Hi,

I agree with Rick. From the explanation above, I understand that there's a need to notify someone(an email) when some action is completed which is outside the workflow environment. Since a user decision is not required in this case, you can use the wait for an event step and send mail notification after the wait step and trigger an event at the end of action(at the end of file attachment in this case).

Regards,

Rahul

former_member185167
Active Contributor
0 Kudos

Hello,

"Create a user-decision task in a big workflow, to inform user, that process that was asked on the previous step was run and we are waiting for the result"

That is an email, not a user decision. There is no decision to be made.

regards

Rick Bakker

I042439
Employee
Employee
0 Kudos

Hi

You can use terminating events in a fork which is parallel to your decision task...make it 1 of 2 fork.

In your custom code, when everything is done, you just trigger the terminating event (without knowing the WI ID)....you just need to have the right key of the base object of the workflow.

When the system generates the terminating event, the system will also search for the "listening" instances which have the same key and will end them.

Some links to help you with Terminating Events and Forks (

http://help.sap.com/saphelp_erp2004/helpdata/en/c5/e4b590453d11d189430000e829fbbd/content.htm

http://scn.sap.com/thread/404983

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e038cc2d-0cde-2a10-e28e-f50025578...

Forks (SAP Library - Embedded Processes (SAP Business Workflow))

How to model parallel branching/fork in SAP workflow - YouTube

Regards,

Modak