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

Error in multiple switch condition

Dear All,

In my workflow i have a multiple condition step in which i am using SWITCH which on execution gives the following error :

1.Work item 000000004008: Object FLOWITEM method EXECUTE cannot be executed

->Error when starting a SWITCH branch.

This switch has 3 conditions: based on the parameter &decision&.

At this i am checking there is a value in the workflow container for the decision,still gives this error.

Please tell any possible resons for this.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 06:58 AM

    Hi Geet,

    Can you please elaborate the conditions that you are giving in the switch.

    I think the problem lies with the container elements that you are using for setting up the condition.

    Can you please check this and verify.

    Regards,

    Kanika

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Kanika,

      The conditions are :

      1. &DECISION& = 'A'

      1. &DECISION& = 'R'

      1. &DECISION& = 'V'

      where A-approved

      R- rejected

      V- reverted

      I have an element called decision in my container to which i am passing the decision.At the run time it has the value A and still it gives error.

  • Posted on Dec 23, 2008 at 07:26 AM
    Work item 000000004008: Object FLOWITEM method EXECUTE
     cannot be executed

    I think you are not passing the workitem ID to the BO flow item and to the method EXECUTE

    Make sure that you are passing the Workitem id because for the BO flowitem the key attribute is Workitem ID

    Add a comment
    10|10000 characters needed characters exceeded

    • I am using the RFC to trigger and after the approval step
       i am passing the value of the decision into the container.
      Now tell me where do i pass the workitem_id??

      What RFC you are using to trigger the approval step

      See all I want to say is for every BO you ll have a key attribute through which it will instantiate the BO so for FLOWITEM BO workitem id is the key attribute

      and

      For e;g

      in the FM

      SWE_EVENT_CREATE
      EXPORTING
      Business Object name = 'FLOWITEM'.
      Business Object Key  = '16033'.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 08:25 AM

    Hi,

    1. You can multiple conditions as a case.

    2. If you use Switch - define container elements in the workflow and assign the desired constant as an initial value and use these elements on the right hand side of the condition.

    Rgards,

    Ronit.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Geet,

      Please check whether you have given any default value to the Container Element Decision.

      If 'yes', Kindly remove that and set the propoerties of the Container Element as Import/Export, so that it can fetch the value dynamically.

      Since the Task is actually a multiple condition, so we do not expect Binding to be an issue but I think the Container Elements can give some problem.

      Kindly check and revert back.

      Let me know If u still face any issues.

      Regards,

      Kanika

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 09:02 AM

    since all your conditions are based on a single container element, you can use "Case" instead of "Switch".

    or if you use "Switch" then make sure that you have also mentioned an outcome for "Other values".

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 23, 2008 at 09:07 AM

    Hi Geet,

    Check the binding for your workflow item 000000004008. Cehck if you are passing the attribute correctly from the workflow container to your task container. If the value of workflow container is not passed correctly it would give an error.

    Hope this helps!

    Regards,

    Saumya

    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.