Dynamic parallel node numbers

hi,
is it possible to have a dynamic number of parallel branches determined at runtime and not at design time?
Christophe

Hi,
I suppose you were expecting 'no' as answer.
But there is probably a solution for your problem depending on the exact scenario you want to implement.
If you want to make simultaneous asynchronous requests to different systems and wait for the replies, you can separate the asynchronous node in a separate WLI process, which will be instanciated for each (virtual) branch you want to have.
P1: process which dynamically chooses the number of "parallel branches". It publishes (via a loop) a message to the channel for each virtual branch.
P2: process which makes the actually asynchronous request
P1
| ^
v |
[WLI channel]
| ^
v |
P2You'll need to correlate manuallly in P1 the request and responses to/from the channel. Take also care if there can be multiple P1 instances.

Similar Messages

  • Error creating dynamic context node in Webdynpro for ABAP. Plesae help!

    Hi
       I am getting the following error while creating a dynamic context node with 2 attributes. Please help me resolve this problem.
    Note
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    My code is like the following:
    TYPES: BEGIN OF t_type,
                CARRID TYPE sflight-carrid,
                CONNID TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
      dyn_node   type ref to if_wd_context_node,
      rootnode_info   type ref to if_wd_context_node_info,
      i_node_att type wdr_context_attr_info_map,
      wa_node_att type line of wdr_context_attr_info_map.
          wa_node_att-name = 'CARRID'.
          wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
          insert wa_node_att into table i_node_att.
          wa_node_att-name = 'CONNID'.
          wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
          insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
                                       attributes = i_node_att
                                       is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition

    Ok, I think I found a bug... It seems for adobe forms in WD4A, the root context node must be 1-1 and you must nest the 1-n node within that... Not sure why, but it worked. So in my case my context would look like this:
    FOO_NODE (1-1)
         Widget (1-N)
              -Widget_info (1-1)
                   *Name
                   *Sku
                   *Description
              -Widget_plant (1-M)
                   *Plant_Code
                   *Plant_State
                   *Plant_City
              -Widget_pic (1-1)
                   *Picture

  • Dynamic Parallel Authorization , IF APPROVE

    hi ppl,
              I am working on purchase order <b>BUS2012</b> in my scenario i need to use Dynamic Parallel approval. So if i use Dynamic Parallel Authorization wizard it says BUS2012 does not contain IF APPROVE what is this ? . Can anyone explain me in detail.

    HI Hari
    In order to implement Parallel processing use the the "Miscellaneous" or "Other" tab and provide the number of approvers in a multiline container element and mention in this tab. Now in the Binding from Workflow to Task of that particular step you will find a Par_For_Each_Index element in the Binding from Workflow to Task or subworkflow. Please use this  binding and this will ensure parallel steps. Please reward points if it is effective.
    Thanks
    Arghadip

  • 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

  • How get context value form a dynamic created node

    Hi all,
    I have build my own dynamic view. In this view I use also a dynamic created Node. When I have more rows in my Node I see every row with context of the last row of the dynamic Node.
    this is the source I use.
    for (int x = 0; x < dynTabNode.size(); x++)
      dynTabNode.setLeadSelection(x);
      IWDGroup group = (IWDGroup)view.getElement("Group_name");
      IWDAttributeInfo aiName = wdContext.getChildNode("DayNode", IWDNode.LEAD_SELECTION).getNodeInfo().getAttribute("Name");
      IWDCaption name = (IWDCaption) view.createElement(IWDCaption.class, null);
      name.bindText(aiName);
      group.addChild(name);
      for (int i = 8; i < 18; i++)
        int teller = i * 100;
        IWDGroup group1 = (IWDGroup)view.getElement("hour" + teller);
        for (int z = 0; z < 12; z++)
          IWDImage image = (IWDImage) view.createElement(IWDImage.class, "Image" + teller + "_" + x);
          image.setWidth("10");
          image.setHeight("24px");
          image.setBorder(0);
          IWDAttributeInfo att = dynTabNode.getNodeInfo().getAttribute("hour" + teller);
          image.bindSource(att);
          group1.addChild(image);
          teller = teller + 5;
    How can I read my Node row for row?
    Richard
    Edited by: Armin Reichert on Jul 28, 2008 5:03 PM

    The reason is that all these Caption UI elements are bound against the same context attribute. At runtime this will be resolved to the attribute value of the lead-selected node element. In this example you can fix this by not binding the "text" property but setting it to the attribute value of the iterated node element:
    for (int x = 0; x < dynTabNode.size(); x++)
      dynTabNode.setLeadSelection(x);
      IWDGroup group = (IWDGroup)view.getElement("Group_name");
      IWDCaption name = (IWDCaption) view.createElement(IWDCaption.class, null);
      IWDNode dayNode = wdContext.getChildNode("DayNode", IWDNode.LEAD_SELECTION);
      String text = (String) dayNode.getElementAt(x).getAttributeValue("Name");
      name.setText(text);
      IWDAttributeInfo aiName = dayNode.getNodeInfo().getAttribute("Name");
      name.bindText(aiName);
      group.addChild(name);
    (I assume here that the node "DayNode" has the same size as dynTabNode. No idea if this assumption is correct)
    But this would not help for editable elements where you need to bind the edited property.
    Armin

  • Random flow through parallel node ?

    How does the process engine determine the order of execution down parallel paths in a JPD?
    I have a JPD which has a parallel node containing 5 paths, and it appears that order of execution is completely random: The process engine seems to arbitrarily choose the order in which it executes each path, and it is a different order every time. Is this behaviour correct?

    A process is compiled into an EJB, which cannot be multi-threaded according to the specs. As said in the previous posting, parallel is only logical parallel.
    There is an algorithm for the execution path, but it depends also on what you are doing in the parallel tasks (blocking conditions).
    if you want physical parallelism, you have to spawn asynchronous child processes, which then execute in different threads.
    -Kai

  • To access a dynamic context node defined in a Used Component

    Hi Gurus,
    I need your help with something.
    I have a dynamic context node in ComponentA. I want it in Component B too.
    Component B uses Component A, but I am not able to get access to the context node.
    Is it possible to do this? Any suggestions how to proceed.
    PS: I am trying to do a dynamic mapping. The initial scenario was here, Set data into Model Node on Navigating from a View
    Thanks in advance,
    Anjana R.
    Message was edited by:
            Anjana Raghav

    Hi Gurus,
    Its working now. Earlier, the code was something like this....
    IWDNodeInfo compNode = wdThis.wdGet<i>Comp</i>Interface().wdGetAPI().getContext().getRootNodeInfo().getChild(nodeNm);
    viewNodeInfo.setMapping(compNode,true);
    and was trying to map it using
    iewNodeInfo.addMappedAttribute("order",".<i>Comp</i>."+ nodeNm + ".order");     
    Now, I am mapping like this.
    viewNodeInfo.addMappedAttribute("order","order");
    Thanks,
    Anjana R.

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

  • Adding dynamic context node

    Hello,
    I having problems with creating a dynamic context node.
    How can i add a new node to the context on runtime and not on design time.
    Best Regards,
    Smadar.

    Hi,
    IWDNodeInfo nodeinfo=wdContext.getNodeInfo();
    /* This will add a ValueNode */
    IWDNodeInfo customerNode=nodeinfo.addChild("Customer",null,true,true,true,false,false,true,null,null,null);
    /* This will add  a Attribute to the above Node */
    IWDAttributeInfo custAttr=customerNode.addAttribute("AttribName","com.sap.dictionary.string");
    Regards, Anilkumar

  • 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

  • Dynamic Parallel Approval for HCM Process and Forms

    Hi everyone,
    I have a scenario where I need to use the "Dynamic Parallel Approval" (or to keep it simple, initially I tried using the "Parallel Approval" wizard)for a workflow used in the HCM Process and Forms.
    The standard task for approval in process and forms is TS17900101. I have mentioned a multiline container in the Miscellaneous tab of this task. However,I was unable to use this task in the wizard. There are no results attahced to this task unlike any other standard approval task (like TS30200147). I need to use the task TS17900101 in the workflow assigned to process and forms, but not sure how to handle this scenario (parallel approval).
    If this is not the right way of doing it, Is there any workaround for "Parallel Approval" in HCM Process and Forms.
    Could anybody throw some light around this area.
    Thanks for your help.
    - MM

    Thanks Anuj. But I believe, the container element that I add in the miscellaneous tab does not necessarily have to be used in the agent assignment. The multiline container is just to instantiate the workitem 'n' number of times. Correct me if I am wrong.
    My concern is that I was unable to use this approval task (TS17900101) in the workflow wizard for dynamic paralle/parallel approval.
    Arghadip - Thanks for your suggestion. I have seen some your nice contributions in the WF forum.
    I actually tried using the 'Blocks'. But this is what I ran into. When I send multiple approval requests (say 3), if one person has approved it and the second has rejected it,I need to take out the workitem from the third person's list (because it has been rejected by someone in the group). I am not sure if this is possible using Blocks. And in my case the third person is still having the workitem, but gets a dump/error when he tries to open it.
    Also, if any one has rejected the request, I do not have to wait for the rest to take any action on the workitem and proceed further. But I guess in 'Blocks' it will not let you go out unless every workitem has been processed.
    To summarize,here's what I need - I need to come out of the block for two conditions. One, if everyone has approved, comeout of the block with an apprval flag. Two, if anyone has rejected (even if some have not processed their workitem), delete the workitems from others inbox and come out of the block with a rejection flag.
    So, any kind of input or suggestions on how this could be handled would be highly appreciated.
    Thanks
    MM

  • Create dynamic context node

    Hi Experts,
    I have tried the given example for Dynamic Context Node in Webdynpro ABAP
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783
    But getting the Error when executing this application
    Note
    The following error text was processed in the system ISP : Adapter error in &VIEW_ELEMENT_TYPE& "TABLENAME" of view "ZWD_SACHIN_DYN_ALV.MAIN_VIEW": Context binding of property VALUE cannot be resolved: Node MAIN_VIEW.1.INPUT does not contain any elements
    The error occurred on the application server usirs254_ISP_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE_FOR of program CX_WDR_ADAPTER_EXCEPTION======CP
    Method: RAISE_BINDING_EXCEPTION of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
    Method: GET_BOUND_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
    Please resolve this issue because when I am mapping the Attribute TableName in the InputGroup, it is throwing above Error.
    Thanks in advance
    Regards
    Sachin

    Hi Sachin,
    I am unable to understand why you are getting an error. I have tried the same tutorial myself and it works fine for me. Make sure that the TABLENAME attribute (which is of string type) is properly binded to the value property of the input field.
    Regards
    Arjun
    Edited by: Arjun Thakur on Mar 17, 2009 1:46 PM

  • Delete Dynamic context nodes?

    I have created Context nodes dynamically,, I want to delete few nodes dynamically itself.
    wdContext.getContext().reset(true)   would delete entire dynamically created nodes..... but i want to delete particular nodes...
    can any 1 help me regarding this....
    thanku

    Try
    wdContext.removeElementAt(index)
    or
    wdContext.removeElement(IWDNodeElement)
    Regards, Aldo.

  • Parallel nodes can't enclose in client request Nodes

    Hi,
    I have a parallel node in my JPD.
    I want to add a clientRequest-Response node which will take a input xml and will return an response xml. But having a parallel node its not allwoing to have a single clientrequest-response node. It works only if I add 2 saperate ( 1 client request node and 1 client response node( calkback).
    But when I try to call the clientrequest node from my webservice it has a return type as void. but i need it to be responsedocument?
    How can we solve this problem?
    <b>ERROR: MyProcess.jpd:84: 'parallel' nodes cannot be enclosed within 'clientRequest' nodes.
    ERROR: 1 error(s), 0 warning(s).</b>

    This question has been moved to
    <pre> weblogic.developer.interest.integration group
    http://forums.bea.com/bea/thread.jspa?threadID=600010081&tstart=0
    </pre>

Maybe you are looking for