Loop in bpm

Hi,
In bpm which loop is used? ( for , while do etc) ?
Thanks ,
Somenath

Hi somenath,
in my documentation there is only one loop available, which is called "while loop".
So I think it works like its called
"The loop continues to run while the end condition returns true. To specify the end condition, use the condition editor"
reward every helpful answer
regards, Steffen

Similar Messages

  • Exit loop in BPM?

    Based on sap's documentation, loop in bpm works as While, Can anybody explain how to exit a loop in bpm similar to break statement in While loop? Is cancel the right step to use? will it cause potential issues then terminte the bpm normally(Stop)?
    Thanks,

    Hi,
    The "cancel process" option of the control step abruptly terminates the entire process and sets the status to "logically deleted" as per the documentation. Moorthy - if you have found a way to limit the scope of the control step to a block please advise - it does not work for me nor to I see any option for it (I am on SP16 so maybe it is in later SP).
    Anyway - when a bpm completes normally the status is set to "completed".
    I would suggest that the use of the "cancel process" in a control step is an extreme reaction to a catastrophic failure in your BPM that is unrecoverable. Not the situation that you have. Surely you can make use of local variables, switch statements and loop control to define the proper logical path through your BPM without resorting to canceling the process.
    Anyway - the short answer to your original question is this - There is nothing similar to a break statement in a loop control. Cancel process (or cancel step) is not the right way to terminate a loop or step in normal behaviour. It will most likely NOT cause any problems and it WILL terminate the BPM.

  • Synchronous RFC Receiver inside of a Loop in BPM

    Hi there,
    we have a RFC -> XI scenario where a BPM needs to receive messages from a RFC inside of a loop, to bundle these messages, just like the first example here: <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm</a>.
    But the problem is that the RFC is set as synchronous (best effort), thus we need to use a receiver in "Open S/A Bridge" mode, but this mode is not available for receivers inside a loop.
    Actually, we have managed to get the scenario working by creating another BPM which just receives the RFC messages in a S/A Bridge, sends the asynchronous message to the main BPM and sends a response back to RFC, closing the S/A bridge. But I think this solution is kind of "messy".
    Is there any other cleaner way of doing it?
    Thanks in advance,
    Henrique.

    Hi Henrique,
    Read this page carefully:
    http://help.sap.com/saphelp_nw04/helpdata/en/43/d92e428819da2ce10000000a1550b0/frameset.htm
    "Do Not Transfer Application Logic
    Do not use integration processes to transfer application logic from the application systems to the Integration Server.
    No Replacement for Mass Interfaces
    Check whether it would not be better to execute particular processing steps, for example, collecting messages, on the sender or receiver system."
    I so recommend to rewrite the sending interface to collect the messages before sending.
    Andother idea is sending the messages with an asynchronous call.
    Regards
    Stefan

  • ** To put Exceptional Branch in loop in BPM

    Hi friends,
    We have a scenario like SO, Delivery, Billing creation based on Purchase Order data. We designed this using BPM. Its working fine. We throw an alert whenever the error is happend in creating document.
    We put control step to throw alert in exceptional branch. So, when the BPM has error in particular step like SO / Delivery/ Invoice, we throw alert. Then the user correct the error and restart the BPM, it will work fine.
    But, after restart again the error is coming in same step, we want to throw alert. So, how do we set exceptional branch in loop ? ie. whenever restart the message, it should check whether any error is there again in the message, if it is there, it should throw alert again.
    Kindly tell me, friend. How do we set this in loop ?
    Kind Regards,
    Jeg P.

    can you be a bit clear
    " We put control step to throw alert in exceptional branch. So, when the BPM has error in particular step like SO / Delivery/ Invoice, we throw alert. Then the user correct the error and *restart the BPM, it will work fine.*
    But, after restart again the error is coming in same step, we want to throw alert. So, how do we set exceptional branch in loop ? ie. whenever restart the message, it should check whether any error is there again in the message, if it is there, it should throw alert again "
    your question has two contradicting statments.  can you be a clear in when you are receiving the error ? try using transactional behaviour .
    Edited by: Pramod Yadav on Jun 10, 2008 2:03 AM

  • How to Use Loop in BPM?

    Hi,
    I would like to use LOOP functionality in BPM until all the records are processed.
    Any Help would be appreciated.
    Regards,
    Ganesh Karicharla

    hi,
    what does it mean all records
    by payload loop, time loop?
    this page presents all sorts of loops jut check it:
    http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Designing the scenario of multiple BAPI call in a loop in BPM

    All,
    I need some help in designing this scenario. I do not have the luxury to write a custom BAPI. Here is my scenario. A typical async>sync>async with little modification
    1. Async call to BPM with input payload
    2. BPM calla BAPI_SALESORDER_GETLIST with customer number and sales organization from input payload and returns a list sales order items (Sync)
    3. I need to call the BAPI_SALESORDER_GETSTATUS for each sales order number that I got from the first call (Sync?). Not sure how this has to be designed
    4. Transfer the  data through HTTP adapter (Async)
    I am able to perform step 1, 2 and 4 (of course only line item data). I need some pointer help on how to incorporate it in step 3 of BPM.

    3. I need to call the BAPI_SALESORDER_GETSTATUS for each sales order number that I got from the first call (Sync?). Not sure how this has to be designed
    for this the BPM should have a block after the Sync send.......in the block have your send step....the mode of the block will be ForEach....
    Check this blog for more info: /people/milan.thaker/blog/2008/08/05/modes-in-block-step-of-bpm
    Check this similar example from help: http://help.sap.com/saphelp_nw70/helpdata/en/11/13283fd0ca8443e10000000a114084/content.htm
    Edited by: abhishek salvi on Jul 1, 2009 10:57 AM

  • Capturing of time taken by a while loop in bpm

    Hi ,
    I have a busniess process ,and my receive step is defined in a while loop.
    so it starts with a while loop.
    I want to keep a condition on the while loop that it should receive the messages only for a period of 1 hour ,and if it exceeds this period it should end up the process triggeringa mail.
    I mean to say if there are 12 records to be processed through the while loop ...and if I receive only 11 records ..it will be waiting for that final record in an infinite loop ..so I dont want that ...instead if the total no of records are reached then it should move forward ..If it is waiting for the missing records for an hour ..I should stop the process and trigger a mail to the queue monitor saying that record is missing...I have finished the process without this processing time condition successfully..
    I am new to XI and I dont have any idea on how to capture this processing time of while loop.
    can some one please help me out in this issue...
    Thank you in advance...

    Hi Latika,
    Yeah I understand we can go with fork but why I am going with this is ,I have already designed a Payload dependent loop ,by using while loop.so it makes my job simple ...
    Now I am converting it to time dependent loop,so only the final question I have is...In the time dependent loop documentation ..they have taken it as infinite loop and only kept the time limit in the deadline branch...so when the deadline reaches they trigger something.
    If you go to the documentation of time dependent loop(http://help.sap.com/saphelp_erp2005vp/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm) ..they took the infinite loop...in this loop if I mention the counter ..and if this record count triggers before the time limit...it should come out of the block...would it work this way ?
    Thanks a lot...

  • About condition for loop in BPM

    I design a loop, condition is counter<>3.
    It seems only receives 3 messages when I send more than 3.
    for example, I send 105 messages, for every 10 messages it will generate a file. and I totally have 11 files.
    What is the best way to end the loop?

    Hey,
           you need to have two loops in this.
           Have your send step(for the file) in the inner loop.
            The condition for this loop will be te number of messages that you need per file.
          The outer loop should terminate when all the messages are recieved.(recieve step will be in the outer loop)
       This is not possible with the no. of messages
    You can do one thing, provide a stop message as an input along with the other messages.
    And set the condition for the outer loop for the stop message.
    This will terminate the outer loop.
    regards,
            Milan

  • BPM finishes when reaching exception in loop block

    Hi everybody,
    we got a loop block in BMP. In the loop block we catch mapping errors by using an exception branch.
    What we can see is that when an exception is thrown the process steps into the exception branch an than is leaving the loop block!! So the remaining single messages are not processed!
    Is there a workaround?
    Regards Mario

    Hi Mario,
    Have you used the local correlation for block step.
    Can you please give steps you used in BPM, also try to see the below threads
    What is the use of block step in BPM? Please help!
    BPM ParforEach Loop
    BPM loop
    also,
    BPM Block step
    Using BPM (Blocks) when Incoming message has multilple rows
    Doubt in BPM
    BPM: Block Processing: ParForEach
    Regards
    Chilla

  • Problem in BPM with long loop

    Hi,
    I have "Integration Process" which reads data items from DB table and sends it to webserive.
    Webservice accepts only 1 item of data, so I have loop in bpm interating through every data item and calling webservice.
    The process works fine with no errors, but if number of loop iterations exceeds some number (like 100 or somthing close to that) the process cannot go to "completed" status. It goes through all iterations, sends all data and just hanging in system with status=started. When i'm trying to delete it with SWWL transaction i got dump. I also see same dump from user WF-BATCH occuered exactly the same time the process excpected to go to completed state.
    Error analysis
        Short text of the error message:
        "Exception CX_SY_NO_HANDLER triggered by CL_SWF_XI_INSTANCE============CP in
         line 1 with text: An exception with the type CX_SY_OPEN_SQL_DB occurred, but
         was neither handled locally, nor declared in a RAISING clause"
    Any ideas how to resolve this problem?
    Regards,
    Ilya.
    Edited by: Ilya Karnauhov on Oct 1, 2009 9:29 AM

    hi,
    >>an error code with 99
    check cache refesh and tell me if it gives any error!?
    regards,
    Felix

  • Calling a CAF program via web service generates QName cannot be null error, but only for 1/5 of the same call in a parallel for loop.

    I'm calling 5 identical web service calls using a parallel for loop in BPM. Obviously the data in each slightly differs. Why would this call suspend the process and give the following errors:
    handleCommunicationError( ErrorContextData, Throwable, TransitionTicket ): A technical error occurred.
    Interface namespace = myNamespace
    Interface name = myService
    Operation name = myOperation
    Connectivity type = WS
    Application name = myAppName
    Reference name = 8bd95deb-8cf1-453d-94e5-0576bb385149
    Message Id = null
    WS style = DOC
    Start time of WS call = 2014-02-26 17:51:23.297
    Return time of WS call = 2014-02-26 17:51:23.412
    Principal name = SAP_BPM_Service
    Root error message = local part cannot be "null" when creating a QName
    Error message = Could not invoke service reference name 8bd95deb-8cf1-453d-94e5-0576bb385149, component name myComp application name myappname
    com.sap.engine.interfaces.sca.exception.SCADASException: Could not invoke service reference name 8bd95deb-8cf1-453d-94e5-0576bb385149, component name
    myCompname
    at com.sap.engine.services.sca.das.SCADASImpl.invokeReference(SCADASImpl.java:341)
    at com.sap.glx.adapter.app.ucon.SCADASWrapperImpl.invoke(SCADASWrapperImpl.java:101)
    at com.sap.glx.adapter.app.ucon.UnifiedWebServiceCallObject.invokeWebServiceOperation(UnifiedWebServiceCallObject.java:101)
    at com.sap.glx.adapter.app.ucon.UnifiedWebServiceCallClass.invoke(UnifiedWebServiceCallClass.java:178)
    at com.sap.glx.core.dock.impl.DockObjectImpl.invokeMethod(DockObjectImpl.java:657)
    at com.sap.glx.core.kernel.trigger.config.Script$MethodInvocation.execute(Script.java:248)
    at com.sap.glx.core.kernel.trigger.config.Script.execute(Script.java:798)
    at com.sap.glx.core.kernel.execution.transition.ScriptTransition.execute(ScriptTransition.java:78)
    at com.sap.glx.core.kernel.execution.transition.Transition.commence(Transition.java:196)
    at com.sap.glx.core.kernel.execution.LeaderWorkerPool$Follower.run(LeaderWorkerPool.java:163)
    at com.sap.glx.core.resource.impl.common.WorkWrapper.run(WorkWrapper.java:58)
    at com.sap.glx.core.resource.impl.j2ee.J2EEResourceImpl$Sessionizer.run(J2EEResourceImpl.java:261)
    at com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator$1.run(ServiceUserManager.java:152)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:337)
    at com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator.run(ServiceUserManager.java:149)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:185)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:302)
    Caused by: java.lang.IllegalArgumentException: Could not process message for operation myOperation in web service plugin module.
    at com.sap.engine.services.sca.plugins.ws.WebServiceImplementationInstance.accept(WebServiceImplementationInstance.java:228)
    at com.sap.engine.services.sca.das.SCADASImpl.invokeReference(SCADASImpl.java:314)
    ... 19 more
    Caused by: java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
    at javax.xml.namespace.QName.<init>(QName.java:246)
    at javax.xml.namespace.QName.<init>(QName.java:190)
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DInterfaceImpl.getInterfaceInvoker(DInterfaceImpl.java:126)
    at com.sap.engine.services.webservices.espbase.wsdas.impl.WSDASImpl.<init>(WSDASImpl.java:43)
    at com.sap.engine.services.webservices.espbase.wsdas.impl.WSDASFactoryImpl.createWSDAS(WSDASFactoryImpl.java:39)
    at com.sap.engine.services.sca.plugins.ws.tools.wsdas.WsdasFactoryWrapper.createWsdas(WsdasFactoryWrapper.java:30)
    at com.sap.engine.services.sca.plugins.ws.WebServiceImplementationInstance.initWsdas(WebServiceImplementationInstance.java:256)
    at com.sap.
    Surely if it was the service group unassign then reassign issue then none of the calls would have worked?

    Hi David,
    While a random error is still an error it will be difficult for support to find a problem for an error which is not reproducible. It is always a faster resolution if you can determine how to provoke the error and provide those details. If we can reproduce an error on internal systems then we can fix the problem quickly and without having to access your system.
    regards, Nick

  • BPM Container operation not executed

    Hi
    We have a scenario where several Idocs are to be collected to one flat file. I have set up a time loop in BPM to receive idoc (abstract), map idoc to flat file, add flat file to flat_file_list (container operation, append). After 2 minutes the loop ends, and the flat_file_list is mapped to a flat file and sends the flat file to the connected legacy system, via the file adapter.
    Most of the process steps work just fine, but the files are not appended into one file. All mappings are correct, and the FTP adapter correctly sends the files to the FTP server.
    Using the Business Process Engine monitoring I see that all interfaces receive the messages, all mappings are done, but there are no steps for the container operation! Should this container operation be visible in the monitor?
    So it seems that everything is working except the bundling of messages. Does anyone have any experience with this?
    The container operation is setup as following:
    Step name: AddMsgToLst
    Target: FlatFileList
    Operation: Append
    Expression: FlatFile (which is the flat file I am mapping the idoc to)
    Any help is highly appreciated!
    Br
    Kenneth

    Hi Robin
    Thanks for your message. After I insert a new step and save the process, I can't activate the process from the sxi_cache. It says that the Cache entry for directory process is already up-to-date.
    I have tried both with activating first in repository and not activating the process, but in both cases the sxi_cache says it's up-to-date.
    Any suggestions?
    -Kenneth

  • Sync send step in a loop step

    Hi Gurus,
    I want to query a database and based on the return value I will proceed to the next step. For this I have a 'sync send' step where I am finding if the count(*) is 0 or greater than 0. If it is only '0' then only I will proceed to the next step.
    For this functionality I am using a loop step with in which I have this sync send step (querying the database). The control will come out of the loop only when the count is 0.
    But, I found that the response message container is not loading. That is the reason why the loop condition is always coming out as 'true'.
    I want to know if I can use the send step with in a loop in BPM.
    Please let me know your solutions.
    Thanks
    Kalyan

    Hi,
    see the counter variable , initial value is 0 ,then the loop always true.
    second thing is when you send the request for synchronously and the response message to receive step, is it correct,
    if so why do you want to maintain the loop, are more messages sending the messages in seqencially /syncrounously .
    I think you want to check the response interface value is it , check this correctly..
    See the below links for Sync Send .
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    Regards
    Chilla

  • It is possible to get a response of a asynchronous RFC call thru wait loop

    Hi Experts,
    The requirement is that i queue up all the requests from a web services ( One queue per plant for example) which i set in the HTTP sender URL ( i mean the queue name ). and i am posting the records thru a RFC call.
    1. Let the RFC call be synchronous and in case the R/3 system is done.. Will the XI queue keep the Call and keep on retrying it till the R/3 system is up.
    2. Otherwise if the RFC call be asynchronous, is it possible to introduce a wait loop in BPM to listen to the RFC till i get some response ( i think this is not possible).
    Need your suggestion on the same...
    The requirement demands that no single request from the web service should be lost.. in case of failure of R/3 they should be queued up and re tried.. Forget about the error because of exception in RFC this will be taken care manually..
    Thanks for your response in advance.

    Hi Rajesh,
    you can queue and restart only asynchronous messages. I think you can build a Business Process, where you repeat sending a message til you have success or maximum number of tries is reached. But no good idea, coz you will get timeout at HTTP sender. Aynchronous messages dont have a response.
    May be, XI can solve your task in the standard: In transaction SMQR you can just configure what you describe. All asynchronous messages will be queued and restartet in case of receiver not reachable. You can configure no of retries and intervall between.
    Regards,
    Udo

  • Compare two structures in BPM

    I have a BPM where I get two structures one from SAP
    and one from WebService.
    I have to compare these two strutures
    if no entry is found in web service structure for the correponding entry in  SAP Structure, then call other webservice else skip
    Is this possible using Loop in BPM
    Thanks
    John

    Hi Prasad,
      I got this strucure with data from the rfc call to SAP
    001
    002
    003
    004
    005
    I got this structure with data from a call to web service
    001
    002
    003
    I have these two strucures in my BPM
    Now, I have to compare these two structures and get
    004, 005 which are not in the web service strucure and pass this data by calling another web service
    I dont know how to loop over these two structures.
    Is it possible to do this
    Thanks for ur help
    John

Maybe you are looking for