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

How to add outcome to activity step

Hello everyone. Does anyone know how to add a possible outcome to an activity step that is not of type user decision? I know this is possible as I have seen workflows like this. Please help. Generous points will be awarded!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 25, 2007 at 01:59 AM

    The outcomes of your activity should be ideally the export paramenter of your business object method. For that in the properties of the method you need to set it as "result type". The export parameter need to have domain with fixed values, which you need to have as outcomes. Once you use this method in your task, automatically all the values in the domain will be displayed as outcomes of the task.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Alexander,

      The third (and possibly simplest) way to add outcomes to a custom method is to define an exception on the BOR method. Exceptions are automatically possible outcomes in the WF builder (but must be activated in the outcomes tab).

      They work exactly like messages, in your code you can raise it with

      exit_return <exception number> <var1> <var2> <var3> <var4>.
      

      All three are valid ways, which one is suitable depends on your scenario.

      Hope that helps,

      Mike

  • Posted on Jun 24, 2007 at 10:45 AM

    Hi Alexander,

    In your single step task(standard task in which task you want branches) over there go to Terminating Events(next to Triggering Events) tab and give Element as WIOBJECT_ID , enter your BO and Event.

    Thanks and Regards,

    Prabhakar Dharmala

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 02, 2007 at 03:23 PM

    Hi Guys,

    I was able to get Frank's advice working for BOR objects but not with ABAP OO Classes. I have a method with an export parameter that has a data element with domain fixed values but the outcome does not appear in the workflow. I also tried a returning parameter but that also did not work.

    Additionally, in a task with an ABAP OO class as reference, I tried to add the result parameter to the task container but it does not seem to want to save my added parameter WIRESULT. Whenever I go back to the task the result parameter disappears from the task container. Hence, I cannot bind it to the workflow container...hmmm...am i doing something wrong?

    Thanks again!

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      I don't think OO does result parameters. To be honest, I've never really liked them due to the way that the outcome definition is so far removed from WF. This makes it easy for someone to change the domain without updating the WF and mess things up. There's no simple "where used" that tells an ABAPer about such usage in WF.

      So just bind back a value and check it in a separate condition step. Or use exception classes. If they are subclasses of CX_BO_ERROR they will automatically appear as outcomes. Which way you choose is a matter of semantics - if the results are 'nonstandard' situations then they could be exceptions. If it's a set of choices then a condition will do. There's no major performance hit for a condition or container operation step.

      Hope that helps,

      Mike

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.