Dynamic parallel processing using a multiline container element

Hi All ,
  I just wanted to how things work when we use "Dynamic parallel processing" for a decision step . I came across a situation wherein a Rule gets the approving user(s) and the work item should be sent to all those users . After getting an approval from all the users , the workflow should proceed or else it should terminate .
   I was just wondering whether "Dynamic parallel processing" will do this job or not . I had also thought of using forks but as the number of approvers are  decided at runtime , i dont think it is possible .
   Any inputs ?
  Edit : We are working on CRM 5.0
Thanks ,
Shounak M.
Message was edited by: Shounak  M

Hi Shounak,
Just do as Mike says:
use the multiline element for a subflow.
The subflow consists of your user decision, if someone rejects it, remember it (could be done by updating a small table using a method, or use an event, or what mike suggested, updating appending a table )
In the top flow, after the multiline element step determine if someone rejected it (wait for event, or reading the table).
Kind regards, Rob Dielemans
Message was edited by: Rob Dielemans

Similar Messages

  • Problem in Dynamic Parallel processing using Blocks

    Hi All,
    My requirement is to have parallel approvals so I am trying to use the dynamic parallel processing through Blocks. I cant use Forks since the agents are being determined at runtime.
    I am using the ParForEach block. I am sending the &agents& as a multiline container in 'Parallel Processing' tab. I have user decision in the block. Right now i am hardcoding 2 agents in the 'agents' multiline element. It is working fine..but i am getting 2 instances of the block.I understand that is because I am sending &AGENTS& in the parallel processing tab.. I just need one instance of the block going to all the users in the &AGENTS& multiline element.
    Please let me  know how to achieve the same. I have already searched the forum but i couldnt find anything that suits my req.
    Pls help!
    Regards,
    Soumya

    Yes that's true when ever you try to use  ParForEach block then for each value entry in the table a separate workitem ID is created, i.e. a separate instance is created that paralle processing is not possible like that
    Instead of that what you can do is create a fork with 3 branches and define a End Condition such that until all 3 branches are executed .
    Before to the fork step determine all the agents and store them in a internal table , you can access the one internal table entry by using the index value check this [wiki|https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/accessingSingleEntryfromMulti-line+Element] to access single entry from a internal table.
    For each task in the fork assgin a agent
    So, as we have defined the condition that until all the three branches are executed you don't want to come out of the fork step so, it will wait until all the stpes are completed.

  • Dynamic Parallel Processing using Rule

    Hello,
    I am using a User Decision within a Block (ParForEach type) step to send work-items to multiple Approvers parallelly.
    For this I have created a Multi-line container LI_APPROVERS and bound &LI_APPROVERS[&_WF_PARFOREACH_INDEX&]& to &_LI_APPROVERS_LINE& in the "Parallel Processing" tab of the Block.
    Now in User Decision I am using Agent as Expression = &_LI_APPROVERS_LINE&. This is working perfectly fine if I fetch the values in LI_APPROVERS via a background method before "Block" step is executed.
    I want to know if we can do this using a "Rule" within the User Decision? Meaning approvers are determined by the Rule(through a FM) at the run time instead of fetching them beforehand. I created a custom Rule and tried passing it under Agents but it didn't work. I do not know what bindings need to be done and how each line will be passed to User Decision to create a work-item for each user.
    Or
    I should remove the Block step completely and directly use the User Decision Task with Parallel Processing option under Miscellaneous tab?
    Can someone please explain how to achieve this using a Rule and exactly what bindings are required.
    Thanks.

    Hi Anjan,
    Yes, that's exactly what I want to know. I saw your below response in one of the threads but could not understand exactly how to do it. Can you please explain it.
    You have all  your agents in one multiline container element in workflow.
    Then you take a block step with perforeach.
    Then create a custom rule which will import multiline element of agents , and a line_no. Then in the rule you populate the actor_tab with agents from that multiline contaier elemens of agent. The logic will take the agent from the multiline container[line_no].
    Then you take a activity step . In agent use your custom rule usin prpoer bindin of multiline element of agents and for line_no you pass _***_line from block container. Then workitem will sent to n no of people parrallaly.
    This is my current design:
    Activity returns agents in LI_APPROVERS.
    At Block: I have binding &LI_APPROVERS[&_WF_PARFOREACH_INDEX&]& --> &_LI_APPROVERS_LINE&
    At UD: I have Agents as Expression = &_LI_APPROVERS_LINE&
    I want to remove the Activity step (to get Agents in background) and replace with Rule within UD. What binding do I need from Rule to Workflow? How to get the "Line_no" from rule as you mentioned above.
    Thanks for your response.

  • Multiline container element in workflow

    Dear all,
    I am using a multiline container element in workflow container.  Can anybody suggest how I can see the values of that element?  After workflow execution is COMPLETED and I go to SWI1, it shows only simple elements.  It doesn't show any of my multiline elements.
    Please help.
    Thanks in advance,
    Regards,
    Pranav.

    Hi Pranav,
    It does work in 6.20. I am not sure about 4.6C.
    Display Technical Details from the Workflow log for your WF instance. You can examine the Container values for each of the steps. See if the values show up (are you certain your multiline container has been populated?). If you are populating the multiline container from an object method, verify by testing your object method that the parameter are correctly defined and it is getting populated.

  • Dynamic parallel processing of the same object using asynchronous method

    Hi,
    Please can anyone help me?
    I have to send the same DMS document to several agents for parallel processing. The number of agents is not known until runtime. Each of them should process the document and at least change the status of it. In next step I check if he has changed it.
    I use dynamic parallel processing of subworkflows. Key task of this subworkflow uses standard method of object DRAW - DOCUMENT.EDIT  (standard transaction CV02N) which is asynchronous. The task is finished by event DOCUMENT.CHANGED. 
    During the parallel processing the appropriate number of workitems is generated. However, when the agent who processes the document as first completes his workitem the event DOCUMENT.CHANGED is generated and all parallel workitems are completed, even those of other agents that were not processed yet.
    Any help would be appreciated.
    Thanks.
    Eva Vahalova

    Hi all,
    The process is used to approve incoming invoices. Each scanned invoice is attached to a DMS document and than sent to one or several agents in parallel. People from several departments can approve the same invoice for instance energy or mobile phone costs. We have no HR module fully implemented. Each agent may write some remarks and has to sets the document status to either approved or rejected. This status is temporary therefore the others see the original status for approving.
    The process of incoming invoices was implemented by SAP consultants in 2003 on 4.6B and now runs on our 4.7 system.  Now new company was established running on a new SAP system ECC 6.0 and our accountant department and some agents will deal with invoices in both systems. Therefore, the process should appear the same or at least very similar. The majority of the old process was realized by programming while I would like to use workflow features that are available now and reduce the programming part.
    As I see, I will have to choose one of the solutions that Arghadip suggested.
    I wonder if there is a possibility to use asynchronous method and control the end of each work item by means of u201CComplete Work Itemu201D or u201CComplete executionu201D Conditions. I have never used them and I do not know how they work and what condition to use. Maybe program exit might be used as well. While controlling the agents I think I will have to do some programming anyway because the work item can be finished by a substitute too.
    Thanks for your help.
    Eva

  • Using Multiline Container element in sending mail

    Hi,
         I am sending mail with Multiline Container element APTEXT.
    I put &APTEXT##&  Is this right ?
    But when I have 2 lines of data, its sending mail with only one line.
    Thanks

    It is my personal observation that if the line size is more than 132 charecters then it will display like that.
    So do like this
    1. First make the row size as 125.
    2. and when you are selecting the multiline container element in the mail content, then it will ask you 3 options selct the option Print line by line then check the mail.
    It worked in my case.

  • Defining index in Dynamic parallel processing of workflow

    Hi all,
    I am using dynamic parallel processing feature in workflow for a particular multi-line element. But I am not able to define the index in that particular task.
    Consider that i have a multi-line element "Material". For this element, I need to loop that task for that n number of records. so i am using dynamic parallel processing. Now for each workitem generated, i need to show that particular material in the workitem. I remember that we need to use index, but i couldn't recollect how it is defined.
    Could anyone help me in this regard?
    Thanks in advance

    Nikhil,
    When you use dynamic parallel processing the index is available in <b>_Wf_ParForEach_Index</b>. A reference for the line of the multi line element is automatically generated for each work item created. You can see this in the Binding Editor for the step. In your case this will be "Material()". When you drag this element to the WF to Step binding window, it will be resolved as "&Material[&_Wf_ParForEach_Index&]&. Therefore you can get the material for each WI by defining "Material" in your task container (not as multiline) and doing the appropriate binding. If you in fact need the Index in your method, you can define a container element your task with reference to Type SWC_INDEX and bind to ]_Wf_ParForEach_Index.
    Cheers,
    Ramki Maley.
    Please reward points if the answer is helpful.
    For info on awarding points click on this link: https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm

  • Parallel processing using BLOCK step..

    Hi,
    I have used parallel processing with a BLOCK step. I have put a multiline container element. In the BLOCK step, I have visibily to another container element generated because of the block step (multilne container_LINE). Thus the number of parallel processes are getting created as in the requirement, but the problem is the value in multilne container_LINE is not getting passed to the send mail step. I have checked the binding, everything is ok. Please
    Sukumar.

    Hi
    When I am sure that I am doing properly a binding but it doesn't work then:
    1. I activate workflow template definition (take a joke).
    2. I write the magic word
    /$sync
    in the command line, to refresh buffers.
    3. I delete the strange binding defined with drag&drop and define it one more time using old method from former binding editors in R/3 4.6c systems. I take container elements from the lists of possible entries or I write their name directly. I don't use drag&drop.
    Regards
    Mikolaj
    There are no problems, just "issues" and "improvement opportunities".

  • Output of multiline container element in email not working

    I'm trying to display a multiline container element in an e-mail from workflow. The element container contains 2 lines. I can see these have been populated in the log in SWIA. However, when using &ITAB##& to output these lines nothing is diplayed. I've also tried &ITAB[]& and &ITAB& all of which return no lines in the e-mail.
    Does anyone know if this is something I'm doing wrong or is there an error in R/3. I'm on release 4.6c.
    Thanks
    Karen

    This is getting annoying. This was sednging e-mails and printing the table in the e-mail fine. Then I had to add more fields to the table ITAB. After this the table wasn't showing again in the e-mail. I recreated the workflow, tasks and even the BOM, but still nothing.
    As before I can see the ITAB entries in the details of the e-mail task. But, they don't get written into the e-mail even though I'm selecting &ITAB##& from the Expressions section to put into the e-mail.
    Is there anything I haven't tried. Is there something I'm doing wrong? Is this a SAP problem that can be fixed with a note. I've had a look, but can't find anything about it.
    Thanks
    Karen

  • Mail not send to multiple users even Multiline container element has value

    Hi,
    I have collected the AGENTS to send mail notification in a multiline container element using a background step. The method collect the agent and return in to a container. I use this container in the following mail step using expression. The type id is 'G'. The mail step fails .The address string is filled also with agents.
    Please guide me if u have come across this situation early.
    Regards,
    Richard A

    I think if you are passing SAP User Id then the SAP User Id should be concatenated with US in the front.
    If this is maintained in the container element and if still send mail is failing then it might be that one of the USER Id does not exist in the system.
    Hope this helps.
    Thanks
    Arghadip

  • Workflows : Multiline Container Element problem.

    Hi,
    I got a new problem. Well I got a requirement to collect <b>COMMENTS</b> from <i>MULTI-LEVEL Supervisors</i> and display them in the <i>work item preview</i>. So in these regards, I had declared a Multiline Container element in my Workflow and passed it to some method to get the comments. Well I had succeeded till this point. But there is a problem when I tried to display them in WORKITEM.
    Well, all the lines are getting displayed continously in the Work Item preview.
    Is there any solution for this ?
    Like I want to display the Multiline Container element line wise. Not as a concatenated single line which is happening right now.
    In the Work Item Text part I used it as ...
    Comments from Supervisor : &COMMENTS&
    This is FYI...
    Please help me.
    Regards,
    Raja Sekhar.

    Hi Vinod,
    Well, I tried including the MULTI LINE Element in a Mail step. It gave me all the three options of printing.
    First one is...
    Only first line of Container element can be printed using
    &COMMENT&
    Second one is...
    All the lines of Container element can be printed in a single line as &COMMENT[]&
    Third one is...
    All the lines of Container element can be printed in seperate lines as &COMMENT##&
    I used the third one. It worked even the same in Work Item also.
    Regards,
    Raja Sekhar

  • How to pass value to Multiline container element in workflow ?

    Dear Experts,
    I am using the BAPI "SAP_WAPI_WRITE_CONTAINER" to write into the workitem container elements. now i want to write the data into a multiline container element. i am unable to do the same. please guide me how to write the data into multiline container.
    I am getting the data from portal so i am using the BAPI to populate the container.
    Please help me out...
    Thanks & Regards
    Nigesh

    Hi,
    Use the following code:
    DATA:  lv_text             TYPE        string,
              lt_cont_vals        TYPE        swconttab,
              lt_cont_defs        TYPE        swbconttab,
              lo_oref             TYPE REF TO cx_root,
              lo_workitm_cntxt    TYPE REF TO cl_swf_run_workitem_context,
              lo_wi_conv          TYPE REF TO if_swf_cnt_conversion,
              lo_wi_cnt           TYPE REF TO cl_swf_cnt_container,
              lif_wi_cnt          TYPE REF TO if_swf_ifs_parameter_container,
              lo_exception_return TYPE REF TO cx_swf_cnt_container.
    ***--- Get work Item Context
       TRY.
           CALL METHOD cl_swf_run_workitem_context=>get_instance
             EXPORTING
               im_wiid     = im_wi_id
             RECEIVING
               re_instance = lo_workitm_cntxt.
         CATCH cx_swf_run_wim INTO lo_oref.
           lv_text = lo_oref->get_text( ).
       ENDTRY.
    ***--- Get Instance of the work Item Container
       CALL METHOD lo_workitm_cntxt->if_wapi_workitem_context~get_wi_container
         RECEIVING
           re_container = lif_wi_cnt.
    ***--- Type casting work item container into class CL_SWF_CNT_CONTAINRER
       lo_wi_cnt ?= lif_wi_cnt.
    ***-- Set the value
       TRY.
           lo_wi_cnt->if_swf_cnt_element_access_1~element_set_value(
             EXPORTING
               name             =  'ITEM'
               value            =  t_item[]
         CATCH cx_swf_cnt_cont_access_denied.    " Change Access to Container Not Allowed
         CATCH cx_swf_cnt_elem_not_found.    " Element Not Found
         CATCH cx_swf_cnt_elem_access_denied.    " Element Must Not Be Changed
         CATCH cx_swf_cnt_elem_type_conflict.    " Type Conflict Between Value and Current Parameter
         CATCH cx_swf_cnt_unit_type_conflict.    " Type Conflict Between Unit and Current Parameter
         CATCH cx_swf_cnt_elem_def_invalid.    " Element Definition (For Example, Type Name) Is Invalid
         CATCH cx_swf_cnt_invalid_qname.    " Qualified Name Invalid/Already Being Used
         CATCH cx_swf_cnt_container.    " Exception in the Container Service
       ENDTRY.
    * VERY IMPORTANT -- Save changes to DB
       TRY.
           lo_wi_cnt->save_to_database( ).
         CATCH cx_swf_cnt_invalid_por.    " Invalid Persistent Object Reference
       ENDTRY.
       lo_workitm_cntxt->publish( ).
       COMMIT WORK AND WAIT.

  • Multilevel dynamic approval process using precondition loop block

    HI,
    I am trying to create a multivel dynamic approval process using a precondition loop block. The structure of my process is,
    Process->1)Sequential Block containing requestor action->processor of requestor action is initiator
                2)Precondition Loop Block containing
                        i)Loop Decision action containing a business logic callable object
                        ii)Loop Body Block containing Approver action-processor of approver action is filled from context parameter
    The loop decision action implements the logic for loop decision. Can anybody help me by suggesting the proper target of each of these actions, and the processor for loop decision action?
    Whenever I am initiating the process, the requestor action is getting executed,  On completion of this action I am getting a message "No activity is currently selected", that is, it is not entering the precondition loop block.
    Please guide me with the proper process flow of this and how to adjust the roles and parameters
    Thanks,
    Swaralipi

    Posted another thread on the same issue

  • Use Multiline Container Element in User Decision

    Hi Gurus,
        I have a Multiline Container in my User Decision Task. I am able to pull the data in a Standard Text to the Multi Line Container Element if type RSTXT-TXLINE. But how do I display the total data in all the lines in that element to the User Decision Workitem Text.
    Thanx & regards,
    Kan

    You cannot insert all the table entries in the Decision step workitem Text. it wont allow you to display, one of the possible ways to fix it is please check this [blog|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417500)ID1574174750DB11406479040085832269End?blog=/pub/wlg/15666]

  • BPM: How to return the total number of lines in Multiline Container Element

    Hi all:
    I am trying to follow the following blog to do message splitting:
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    In the blog, total number of messages for Message1 was returned to Count in Message 2.
    If I do not want to create message 2, if there any way to return total number lines in multiline elements ? Because this number need to be used to specify in loop condition:
    While Indxe != TotalNumberOfLines
    Thanks
    Liang

    Hi, Matias:
    For the loop block option, your answer is passing message count in different message type is best option !
    I really do not know why SAP does not deliver a build-in function to return the number of items in multiline element at run time ?
    Now the question for the second option: ForEach block:
    When I leave current line of block properties empty, the compile does not pass
    I have to input a another element (Var_Cur) in current line
    Inside my block, I have one send step, it will send Var_Dest[Index],  followed by a container operation step to increment Index by 1.
    With above setup, I compile it, compile passed, but it says:
    "Container Element Var_Cur in Step Block1 is initialized but not used"
    then I added another containter operation step in block:
    Var_Cur = Var_Dest[Index]
    I modified send step to send Var_Cur rather than Var_Dest.
    Up to now, I can compile it without any warnings.
    But when I send message to IE, the message pass pipe line, but it seems does not pass the BPE.
    When I go to SXI_CACHE, to check the return code for my Integration process is 0, means no error.
    But my message does not reach my target system.
    Where do you think I made wrong ?
    Thanks
    Liang

Maybe you are looking for

  • Inserting values from a cursor to a table

    Hi, I need to insert the values from a cursor into a table,this i the part of code which trieds to do it...i get error stating "select stmt missing"...pls help out... OPEN  p_cursor for V_SQLSTATEMENT;         ---for i in p_cursor         LOOP       

  • Simple Question on SQL.

    I have three tables. Two entity tables and one relation table. Table A(AKey, priority, field3, field4) Table B(BKey, field5, field6) Table C(AKey, priority, BKey) The fields AKey and priority form the primary key for the Table A and the field BKey fo

  • After upgrading to Mountain Lion, launching iPhoto reboots MBP

    After upgrading to Mountain Lion, when I go to launch iPhoto, my MBP re-boots.  This happens every time I try to launch iPhoto.  The re-boot has occured randomly when using Safari and iMovie.  Looking for help.

  • HT4623 Help with logging in

    im trying to download an app but kept on rejecting my apple password. tried to reset it and succeded but still wont take it

  • Intermittent IP Address through Wireless

    I am having problems maintaining an IP address to PC's connected to network through wireless. Setup: Comcast cable modem into Linksys BEFSR11 cable router.  Three PC's connected through CAT 5 to this router.  Linksys WAP54G wireless routed connected