Skip to Content
author's profile photo Former Member
Former Member

How to find correct user decision step and complete it?

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)

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on May 08, 2014 at 02:11 AM

    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-f50025578112?QuickLink=index&…

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

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

    Regards,

    Modak

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 08, 2014 at 03:46 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 09, 2014 at 07:06 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.