cancel
Showing results for 
Search instead for 
Did you mean: 

Error in multiple switch condition

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (5)

Answers (5)

saumya_govil
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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".

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi All,

On providing the default value in the switch the wf proceeds to the next step but with the default value and not with the value passed to it.

When i debug the RFC i find out the container value as desired but as soon as the step gets executed the path followed is that of the other outcome.

The container decision has the value of the default value of the decision.

Regards,

Geet Bijlani

Former Member
0 Kudos

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

bpawanchand
Active Contributor
0 Kudos
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

Former Member
0 Kudos

Where do i pass the workitem id , i dint get u.

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??

bpawanchand
Active Contributor
0 Kudos
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'.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.