Dynamic Parallel Processing Question

Bratzler, Loren loren.bratzler at nscorp.com
Fri Feb 21 12:11:57 EST 2014


Thank you Rina and Kjetil for your suggestions.  After thinking about what you said, I came up with this idea that worked pretty easily:



First I defined an Index field of type SWC_INDEX in the local container of the block step.



I modified the binding between the workflow and the block step to pass the PARFOREACH_INDEX to this new INDEX field:

[cid:image003.png at 01CF2EFE.137B1CC0]



I then modified the binding of the User Decision step within the block to pass the WI_RESULT back to the original Table_of_Approvers.User_decision field indexed by the new INDEX in the block's local container:

[cid:image002.png at 01CF2EFC.C8EC4F40]



This allowed me to capture the user decision back in the original multiline element without having to define a new table or changing the order of the original table:

[cid:image004.png at 01CF2EFD.8C7846D0]



Thank you again for helping me to "think outside the container"!!



Loren





-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Kjetil Kilhavn
Sent: Thursday, February 20, 2014 8:55 AM
To: SAP Workflow Users' Group
Subject: Re: Dynamic Parallel Processing Question



Onsdag 19. februar 2014 09.32.15 skrev Bratzler, Loren:

> I have a question about Dynamic Parallel Processing.  I am wondering

> if it is possible to pass results back to the multi-line element in

> the main workflow container from the LINE element in the individual parallel tasks?

You can change the assignment type from ASSIGN VALUE to APPEND TO TABLE in the binding from the parallell task back to the workflow container, that should do the trick I believe.

I think the easiest solution would be to create another table container element and append to that - depending on how you plan on using this.

In a separate step (after processing of the parallell task was complete you could then replace the contents of the original table with the content of the return values table.



> Here is my test example:

>

> I created a simple test workflow with a Dynamic Parallel Block (this

> is the only step in the test workflow):

> [cid:image005.jpg at 01CF2D55.799EBCF0]<mailto:[cid:image005.jpg at 01CF2D55.799EBCF0]>

>

>

> The Parallel Block is designated as ParForEach because I want the

> approval tasks to go to all approvers at the same time:

> [cid:image002.png at 01CF2D4E.28612D70]<mailto:[cid:image002.png at 01CF2D4E.28612D70]>

>

> The Parallel Processing for the block is based on the multi-line

> element

> TABLE_OF_APPROVERS: [cid:image003.png at 01CF2D4E.28612D70]<mailto:[cid:image003.png at 01CF2D4E.28612D70]>

>

> The TABLE_OF_APPROVERS element is a structure that has an Agent, an

> Item Number, and a Result field: [cid:image004.png at 01CF2D4E.28612D70]<mailto:[cid:image004.png at 01CF2D4E.28612D70]>

>

> I have set up the binding to pass the indexed multiline element of the

> workflow container to the LINE element in the step container.  I also

> set up a return binding to pass the LINE element back to the indexed

> multiline element.  This was what I was hoping would allow me to

> update the multiline element in the workflow container but it does not appear to be working:

> [cid:image007.png at 01CF2D4F.14A88B10]<mailto:[cid:image007.png at 01CF2D4F.14A88B10]>

>

> For the User Decision step within the block, I have defined the Agent

> to be the Approver from the LINE element:

> [cid:image008.png at 01CF2D51.56F1ECD0]<mailto:[cid:image008.png at 01CF2D51.56F1ECD0]>

>

> And in the binding for the User Decision step, I am passing back

> _WI_RESULT to the User Decision field on the LINE element:

> [cid:image009.png at 01CF2D51.56F1ECD0]<mailto:[cid:image009.png at 01CF2D51.56F1ECD0]>

>

> When I test this in SWUS, I define two entries in the

> TABLE_OF_APPROVERS multiline element:

> [cid:image010.png at 01CF2D52.3E14C330]<mailto:[cid:image010.png at 01CF2D52.3E14C330]>

>

> The workflow runs and correctly creates two approval tasks as

> expected.  One user Rejects and the other user Approves:

> [cid:image011.png at 01CF2D52.3E14C330]<mailto:[cid:image011.png at 01CF2D52.3E14C330]>

>

> If I look at the containers for the individual Parallel Block steps, I

> can see that the LINE elements are getting updated with the User Decision:

> [cid:image012.png at 01CF2D53.999D6BC0]<mailto:[cid:image012.png at 01CF2D53.999D6BC0]>

>

> [cid:image013.png at 01CF2D53.999D6BC0]<mailto:[cid:image013.png at 01CF2D53.999D6BC0]>

>

> But when I look at the main workflow container, the multiline element

> did not get updated with the User Decisions:

> [cid:image014.png at 01CF2D54.5689D4D0]<mailto:[cid:image014.png at 01CF2D54.5689D4D0]>

>

> So is it possible to do what I am trying to do here?  Can I pass

> results from the individual parallel steps back to the multiline

> container element in the main workflow?

>

>

> Loren Bratzler

> Norfolk Southern Corporation

> Email: loren.bratzler at nscorp.com<mailto:loren.bratzler at nscorp.com<mailto:loren.bratzler at nscorp.com%3cmailto:loren.bratzler at nscorp.com>>



--

Kjetil Kilhavn / Vettug AS (http://www.vettug.no) _______________________________________________

SAP-WUG mailing list

SAP-WUG at mit.edu<mailto:SAP-WUG at mit.edu>

http://mailman.mit.edu/mailman/listinfo/sap-wug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20140221/c79b26dc/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 13260 bytes
Desc: image002.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20140221/c79b26dc/attachment-0003.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 11383 bytes
Desc: image004.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20140221/c79b26dc/attachment-0004.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 12282 bytes
Desc: image003.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20140221/c79b26dc/attachment-0005.png


More information about the SAP-WUG mailing list