cancel
Showing results for 
Search instead for 
Did you mean: 

Container values not being passed from subworkflow to main workflow

Former Member
0 Kudos

Hi Guys,

I have changed an FIPP based workflow to suit my needs. In the subworkflow, there is a step which gets rejection text from the function module CATSXT_SIMPLE_TEXT_EDITOR. I am putting this text in a container RejectText. I export this from this step 'ZRELEASE' to the subworkflow. In the main workflow, I bind this container to the main workflow container in the subworkflow step. When I trouble shoot, I the container is filled only in the ZRELEASE step, but it is not filled in the subworkflow and in the main workflow.

I also have tried saving the text in a Z-table in the ZRELEASE step so that I can extract it in a step in the main workflow, but it doesn't work as well. But I have noticed that it works when I put debug point in the method of the main workflow step which gets the rejection text. The container is filled in correctly . This is weird to me because if it works in debug mode, then it should work in the normal process. Any ideas what is going on?

Regards,

Darlington

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

I am working on the same requirement & facing same issue but I think I am one step ahead of you.

Please see the thread-

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

I have the rejection reason value (got from the FM-CATSXT_SIMPLE_TEXT_EDITOR) in the main workflow(WS10000051) container element Rej_Reason.To achieve this, after getting the rej reason, I used FM- SAP_WAPI_GET_WORKITEM_DETAIL(passed MainworkItem Instance number) & SAP_WAPI_WRITE_CONTAINER to write to the main workflow.

I have value of rejection reason value in main workflow but I am unable to use it in the step 000132  Correct where the work item is sent back to the initiator to correct errors(takes user to FB02) after rejection. I am stuck here in this last step of the requirement.

former_member185167
Active Contributor
0 Kudos

Hello,

Don't use a ZTable. Can you see the values in the container in the workflow log? Does each side of the binding have the same type?

regards

Rick Bakker / hanabi technology

Former Member
0 Kudos

Hi Anjan and Rick,

Thank you both for your prompt replies.

Anjan, I have refreshed the buffer several times, with no luck.

Rick, I am no longer using the Z-table, but still the contents are not being exported from the subworkflow to the main workflow. The data type is the same both sides. The values are not appearing in the workflow log. They only appear for the step ZRELEASE only. It seems they are not being passed to the subworkflow from this step. Could it be that I set up Dynamic Parallel processing?

Regards,

Darlington

vimalv
Active Participant
0 Kudos

Hi Darlington,

Ensure the Bound attributes have both the IMPORT and EXPORT checkboxes checked in the Method, Step, Sub workflow and  Workflow containers.

Then Save, Active WF.
Run RSWWCLEAR.

Check again.

nabheetscn
Active Contributor
0 Kudos

Hi Darlington

Can you please check whether the comments are being binded back to sub workflow. Check in your business object method coding where you are setting back the container value. Try to run the comment method independenlty and check whether it returns the comments.Otherwise sometimerecreting the task also make things work.

Nabheet

Former Member
0 Kudos

Thanks Nabheet and Vidal for your input. I have tried both your suggestions but it still doesn't work. I even recreated the task and the bindings.

Since this is a rejection, when the rejection is selected, the other branches of the parallel branches and the subworkflow go into CANCELLED status. Could this contribute to this issue?But the 'experiment' I did with the Z-table also doesn't work as well, even though I'm sure the bindings are correct. Any ideas?

The method by itself returns values, Nabheet.

Regards,

Darlington

nabheetscn
Active Contributor
0 Kudos

Can you please paste the screen shot of workflow log task container plus binding between workflow and task container. 

Nabheet

Former Member
0 Kudos

I have attached some screenshots to give you an idea of what is happening. The main workflow is WS9000003 and it calls subworkflow WS90000005 as many times as an internal table entries implemeted for Dynamic Parallel Processing. The attached picture is a result of 3 parallel branches from 3 table entries. When you execute one branch to its end (i.e. you release or reject) the other branches are sent into status CANCELLED. The Get Rejection Text is the step in which I extract the rejection text from a Z-table which has been inserted in the ZRELEASE step. RejectText is the multiline container for the rejection text and RejectAgent is the container for the person who rejected the document.

Former Member
0 Kudos

Here are the other screenshots

anjan_paul
Active Contributor
0 Kudos

Hi,

   I saw the ZFIPP parameters in binding1.gif. There it is taking some import parameters other than rejection text and  reject agent. But in binding2.gif you pass only rejecttext and rejectagent parameter. you did not pass other parameter as import parameters.

Please check it .

Former Member
0 Kudos

Hi Anjan,

Thanks for your reply. The other import parameters are not of concern at the moment. RejectText and RejectAgent are the ones I am concerned with at the moment. Does it have any effect on  RejectText and RejectAgent if the others are not imported? Because they are not really needed anyway.

Regards

anjan_paul
Active Contributor
0 Kudos

Hi,

  If it is giving you the right RejectText and  Reject user without passing other parameter, then it is ok.

So it should come back to workflow contianer. Could you please give screenshot of the container value after subworkflow step

Former Member
0 Kudos

Hi Anjan,

The container is filled at the step where the values are determined (ZRELEASE - FM CATSXT_SIMPLE_TEXT_EDITOR), but it seems they are not passed to the subworkflow itself from this step. See attached.

Regards

anjan_paul
Active Contributor
0 Kudos

Hi,

  Yes in sub workflow reject text and reject agent   is not there. So check in subworkflow step binding with the method. And try to test the method if it working fine.

The binding between workflow and subworkflow seems ok.

Former Member
0 Kudos

Hi Anjan,

This is not making any sense to me. The method is working perfectly fine, and the bindings seem ok (see attached). Could it be what I mentioned earlier that the step is logically deleted (maybe together with the containers contents) after a rejection.

Regards,

Darlington

anjan_paul
Active Contributor
0 Kudos

If it is logically deleted then binding operation will not execute. So please in the log that it is logically deleted or not.

Former Member
0 Kudos

Hi Anjan,

Yes it is logically deleted. Please see attached. How can I overcome this? I mean, how can I preserve the container contents and enable binding to execute?

Regards,

Darlington

vimalv
Active Participant
0 Kudos

Hello ,

Enable event log(SWELS) and check SWEL if any event if triggered during FIPP Rejection. I do not have system access now, but I think there should be an event triggered.

Since this would logically delete your existing WF, you create another Workflow and bind it to the Rejection event and get your work done.

Also, this might help:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70c047fa-e64a-2e10-fda1-9ee0f7c24...

anjan_paul
Active Contributor
0 Kudos

Hi,

Please share the graphical design screen shot of the workflow.

Former Member
0 Kudos

Thanks Vimal. Will consider that idea and implement it and get back to you.

Anjan, please find attached the workflow graphics: WS90000003 is the main workflow and WS90000005 is the subworkflow.

Regards,

Darlington

nabheetscn
Active Contributor
0 Kudos

Hi

In your main workflow we can see in Fork you have sub workflow call as wel as wait for reject event. What is the condition for fork to get complete..? I think as soon you reject an event for reject is triggered and it set call to your subworkflow branch obsolete. Please check in log if this is the case then you need to play with reject event.

Please confirm if this is the case

Thanks

Nabheet

anjan_paul
Active Contributor
0 Kudos

HI,

  Ya check the fork condition to complete if it is depend on any rejection event or not. Then put a condition after subworkflow step and in condition check the container value of rejection. If it is reject then complete the fork. 

Former Member
0 Kudos

Hi Guys,

There is no End Condition in the fork.

I have now put the get rejection text step in the rejection branch of the fork, after the wait for rejection step. But this branch does not complete, there are errors that say:

Error handling for work item 000000012651

Error during result processing of work item 000000012654

Error when starting a CASE branch

Error when defining successor for node 0000000213

Error when starting a CASE branch

Work item 000000012651: Object FLOWITEM method EXECUTE cannot be executed

What could be the issue now? Please see attached screenshots.

Regards,

Darlington

anjan_paul
Active Contributor
0 Kudos

share the 'get reject text' binding screenshot.

Former Member
0 Kudos

Hi Anjan,

Thanks for the quick response. Please find attached the screenshot.

Regards

former_member185167
Active Contributor
0 Kudos

Hello,

Get rid of the WHILE loops and replace them with UNTIL. They don't work.

regards

Rick Bakker / hanabi technology

anjan_paul
Active Contributor
0 Kudos

Hi,

Try to refresh the buffer SWU_OBUF