How I break while loop activity in BPEL process

Hi Guys,
I want to do a polling action in my bpel process, I put in the polling code in while activity ,
I try two way to do the break :
1. use the Flow activity , one sequence for while loop activity , one sequence for timeout flow , put waiting activity in it ,config timeout ... but Flow activity complete only when all branch complete . so it seems there is no way to break Flow from one branch.
2.use onalarm branch of scope ... put while activity code in a scope activity , create onalarm branch for this scope ,config the timeout time ... but onalarm branch can't bypass the scope sequence...
Any advice ?
Thanks
Kevin
Edited by: kyi on Oct 29, 2009 1:01 PM

The on-alarm branch of the scope should work.
Maybe not so neat but you could try to do a scope with a flow within that. Put in one of the flow-branches a wait. After the wait throw an exception.
You can catch that exception in a catch branch of the surrounding scope.
Regards,
Martien

Similar Messages

  • How to use the compensate activity in bpel flow

    Hi
    Can anyone please let me know how to use the compensate activity in bpel flow. Like i have 4 DB adapters in a flow if any one fails i want do the roll back by using compensate activity.
    I am femiliar with transactions proparties, I want to do it from compensate
    Any suggestions would be appricite.
    Thanks in advance.

    Hi,
    wrong forum, please try the SOA forum SOA Suite
    Frank

  • Invocation error in Java Embedding activity of BPEL process in 10g

    Hi,
    I am facing an issue as below in Java embedding activity of BPEL process in 10g...
    Could not invoke: "GTM servlet URL" with verb: POST and context: null
    and the code in java embedding activity is as below...
    // create a new rest invoker stub
    RestInvocation invocation = new RestInvocation();
    org.w3c.dom.Element callOtm_process_InputVariable = (org.w3c.dom.Element)getVariableData("Variable_GTMTransmission");
    // get the result el - so we can derive the namespace needed
    org.w3c.dom.Element callOtm_process_OutputVariable = (org.w3c.dom.Element)getVariableData("Variable_GTMTransmissionAck");
    String GTMURL = "GTM servlet URL";
    try
    callOtm_process_OutputVariable = invocation.invoke
    (callOtm_process_InputVariable, "GET", GTMURL, null,
    callOtm_process_OutputVariable.getNamespaceURI());
    setVariableData("Variable_GTMTransmissionAck", callOtm_process_OutputVariable);
    } finally
    addAuditTrailEntry(invocation.getAuditAsString());
    If anybody is aware of this error, please help me to resolve this issue.
    Thanks in advance.

    Try copy the code from java embedding and paste it to eclipse and run it from there. you will find the exact issue.
    Thanks

  • How to call an  encrypted webservice in  BPEL process?

    If i need to call a J2EE webservice which need to authenticate,like need to provide the username and password,or need to provide the signature,how can i discribe it in a BPEL process? Is there any article addressing this problem?
    Thank you!

    OWSM can mange both ways. You have the option of using the gateway or using the OWSM gateway. The gateway is easier to configure but data is decrypted between the gateway and the SOA Suite / BPEL so depending on your use case and security you may need to use agents.
    cheers
    James

  • How to give multiple inputs to syn BPEL process in Jdeveloper

    Hi,
    I am new to BPEL . I have created programs which takes single input and after processing displays single output. I want to give more than one input at run time (for ex. employee name,age, salary ) and want to display Multiple output after processing them Instead of Just one that I am doing currently. How I can do that using Synchronous BPEL process . Can some one tell that What will be learning time for BPEL using google and forums, for a 3 year exeperienced person in JAVA and new to BPEL.
    Yogendra Rishishwar

    Hi,
    You just need to change the XSD of your process.
    Someone posted something similar last week : How to change the input and output schema in BPEL process
    Hope it will help you ..
    romain.

  • Loop activity in BPEL

    I am new BPEL process
    I am getting the following data to call the other service in the loop activity of the BPEL process
    After using assign activity -> copy operation
    <record>
    <department>IT</department>
    <name>David</name>
    </record>
    <record>
    <department>GS</department>
    <name>John</name>
    </record>
    <record>
    <department>HR</department>
    <name>Joey</name>
    </record>
    My question is how to combined these records
    <records>
    <record>...</record>
    <record>...</record>
    </records>
    Please help me. I appreciate your help.
    Thanks
    Sdev

    Thank your help.
    After while loop I am getting
    <eventcodes>
         <eventCode>
              <partner_source>IT</partner_source>
              <event_code>EC2345</event_code>
              <partner_source>GS</partner_source>
              <event_code>EC3456</event_code>
              <partner_source>HR</partner_source>
              <event_code>EC1234</event_code>
         </eventCode>
    </eventcodes>
    but I want to be like
    <eventcodes>
         <eventCode>
              <partner_source>IT</partner_source>
              <event_code>EC2345</event_code>
         </eventCode>
         <eventCode>
              <partner_source>GS</partner_source>
              <event_code>EC3456</event_code>
         <eventCode>     
         <eventCode>     
              <partner_source>HR</partner_source>
              <event_code>EC1234</event_code>
         </eventCode>
    </eventcodes>
    Please help me.
    Thanks,
    Sdev

  • How to stop while loop

    I can't figure out how to stop a while loop in my labview program. 
    When the user presses the Run arrow in the toolbar I want my program to begin reading the serial port for GPS messages.  These messages should be displayed on the front panel.  Currently I have this read/display in a while loop.  The program is also waiting for an extrenal trigger.  When that trigger arrives, I want to grab the current string from the serial port and save it and continue reading and displaying the serial/gps string.  This trigger starts the other parts of the program- signal generation, recording, and saving data which need to run concurrently with the serial/gps reading/displaying.  Once the AO and AI have finished and the data have been written to disk, I want the program to stop.  The serial/gps messages should be updating this whole time.  Only when the data are written to disk should the whole program end.  This whole sequence of events should only be done once when the user preses the Run arrow. 
    So far I'm unable to pluck the serial string when the trigger comes in if I'm watching the serial port all the time.  The program also doesn't stop when it finishes writing to disk because the read serial while loop is still running.  I don't want to use a front panel stop button.  The program should stop itself when the data havebeen written. 
    I'm really stumped on this one but I'm new to LabVIEW so I'm sure there's an easy solution to this. 
    Thanks for any and all help. 
    Attachments:
    SPoleLakeChirp.vi ‏199 KB

    Dennis and altenbach-  Thank you both for your patience. 
    I was trying to do just what Dennis suggested-"As I said, setting a local variable is one way." even before posting to this forum, but I couldn't get my local variables to reflect changes made elsewhere in the program and I wasn't able to wire from them because they were writes.  The critical part I was missing was how to change a local variable from a write to a read.  It was staring me in the face the whole time- just right click.  When I finally found it, my problems were solved. 
    altenbach- thank's for putting the figures together.  I do understand the logic and wiring there, but I was really trying to avoid stop buttons.  The program should be smart enough to figure out when to stop.  And using local variables turns out to be one way of solving this.  I still have some clean up to do, but I've included my current working version just so you can see how I implimented your suggestions.  There's still a lot of clean up to be done, but I'm delighted to be able to watch the serial/gps messages until I'm done reading in data.  At first I had this stop variable set in the final sequence frame.  That didn't work because I wasn't getting to the final frame because the loop wasn't finishing.  Once I placed the stop variable in the same frame as the while loop it began stopping when it should. 
    If you have other comments/critiques about the wiring diagram I'm earger to hear them.  I'm considering the structure finished, however.  It still needs cleaning up and commenting, but I'm satisfied with the functionality. 
    Thanks,
    Peter
    Attachments:
    SPoleLakeChirp.vi ‏210 KB

  • ReadObject - how to break "while" or "for

    I want to read some (I don't know exactly how many) objects from file "data.csv" and question is: how to break "for" or "while" (in other words: how can I know there is an end of file)?
    FileInputStream istream = new FileInputStream("data.csv");
    ObjectInputStream p = new ObjectInputStream(istream);
         while (int y=0; y<??? ; y++){
                        MyClass  my_object= (MyClass)p.readObject();
                        catalogue.add(y,my_obect);
    istream.close();greetings :)

    You could always define your 'readObject()' method so that it returns null if it cant return anything useful.... just to make your incorrect code work? Apart from the objection above, that would also remove the present ability to serialize and deserialize a null.
    The API is already correctly designed thanks.

  • How to use while loops to implement a simple climate control.

    Hi,
    I am currently a 4’th year computer systems engineering student in South Africa doing a primitive climate control project in LabVIEW 8.0. Although my knowledge and skill level of LabVIEW is far from that of an expert, I really enjoy working with it. The project consists of a motor driving some fan blades, a resistor heater and an analog temperature sensor. The basic functionality entails that a user specifies a desired temperature and then the program will heat if the current temperature is lower than desired or cool if the current temperature is above the desired temperature.
    What I want to add is an acceptable temperature difference so that the fan and heater do not switch constantly as the threshold temperature is reached. Rather leave the current temperature to linger between the maximum (current + acceptable difference) or minimum (current – acceptable difference) allowed temperature before heating or cooling it to the desired temperature once again.
    I have attached 2 VI’s:
    Final Assignment: I tried to achieve the sensible climate control by making use of a formula node. As soon as I substituted the if statements in the formula node with while statements, the VI did not respond. It did not give any errors, it just didn’t respond.
    Final Assignment2: I tried the same but by making use of while loop structures. The while where my Input DAQ is works fine, but none of the other while loops work.
    Please advise me on possible solutions for my problem/project.
    Thank you in advance.
    D. Weppenaar
    Attachments:
    Final Assignment1.vi ‏254 KB
    Final Assignment21.vi ‏256 KB

    1. Your VI does not respond because your formula node is trapped in an infinite loop and cannot exit if you're out of the deadband. Replace the words "while" with "if" (or similar) and you might be getting somewhere. Sorry, I don't have DAQ installed, but what determines the loop rate?
    2. You have a dataflow issue. Only the inner loop on the left will run. All other loops must wait because they depend on data from the first loop. data is only available at an output tunnel of a loop once the loop finishes and a loop cannot start until all input tunnels contain data. Also the first loop can never stop, because the stop button is outside the loop and will never get read once the inner loop starts. The stop button needs to be in the innermost loop.
    Most likely, all code segments should run synchronized, so delete all the inner loops. They serve no purpose. All yon need is the big outer loop as in the first code.
    There are many ways to directly observe what is going on. For example you could run the VI in execution highlighting mode while watching the diagram.
    Clearly, you need to become more familiar with LabVIEW basics. Maybe do a tutorial? Right now you might think that dataflow is a hindrance while in fact it is one of the most powerful advantages of dataflow programming. You simply need to be familiar with its logic.
    LabVIEW Champion . Do more with less code and in less time .

  • How to stop while loop when a specified function is terminated?

    I want to make a program which has 2 thread, one of which is to control some devices, and the other is to measure outputs of the devices.
    To do that, I should make a 2 independent loops, but there comes a problem here.
    I want to terminate 2 loops at the same time, but it's difficult for me to do that, because when I try to notify upper sequence's termination to lower loop by some value change, they have some dependency.
    That's why I need your help. I want to know how to stop lower loop when the upper sequence's termination keeping their independency.
    Please let me know. Thank you.
    Attachments:
    help.JPG ‏200 KB

    Is the upper loop commanding the lower loop at all?  I would think you would have some type of communication between the loops.  Just use that communication to send a stop command.  Or the next best way is to just simply use a notifier.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to stop While Loop in Event Structure with same button?

    Hello,
    I have a problem. I want to use one control to activate an event in a event structure, and the same control to terminate a while loop in that event.
    It is possible to use 2 controls to do this, but I need it to be only one.
    Thank you  
    Message Edited by Heinen on 02-19-2009 06:16 AM
    Message Edited by Heinen on 02-19-2009 06:20 AM
    The Enrichment Center is required to remind you that you will be baked, and then there will be cake.
    Solved!
    Go to Solution.

    Hello,
    I have a bit different problem.
    I have a tab control, with several buttons on different pages.
    In the current situation, we can talk about two pages, where one page ("Settings") in the Image, has a START and EXIT button, while second page ("Wait") has an EXIT button.
    In a while loop, I have event structure, which handles events of the START and EXIT buttons of the Settings page. This is fine. But I also want to control the Exit button of the Wait page.
    The control works like this:
    When I click on Start in the Settings page, the front panel shows Wait page and attempts to connect to a datasocket server on the remote computer. If the user wants to stop this process, he can click on Exit on Wait page too. But, this doesn't give any immediate effect. On the even of Start button, the front panel is not locked, so the user can actually click the Exit button on the next page when it's visible. But it's of no immediate effect. Means, what the LabVIEW does is, finishes the execution of event in Start button's click, and while this executes, it doesn't consider the Exit button's refreshed value (shown in Red circle in the block diagram).
    Simple question: Is there any way to check the updated (latest/live) value of a control during some event's execution? Or if I write an Event "Value Changed" for the Exit button and pass it to some variable. Is it the only solution?
    Thanks ahead.
    Vaibhav
    Attachments:
    terminate event_diagram.jpg ‏200 KB
    terminate event_front_1.jpg ‏63 KB
    terminate event_front_2.jpg ‏63 KB

  • How to stop while loop from looping

    Hi, need a little help in the respect to while loops. Basically i have a while loop within an while loop within another while. So what i want to do is run the program within the outer while loop. The problem is that when i start the program it runs once, which is ok, but its the runs again and again and again. I need it to only run once untill i press the inner while loop bolean to set it going and to stop and to restart, but i can not manage to keep the inner loop from initerating. I just wonder if its a problem with the field point? because i know it works, but using a different example. Any help greatly appreciated.
    Thanks Stuart
    Attachments:
    examplealib.llb ‏199 KB

    Use case structures around your middle and inner loops tied to the booleans you want to control the loops. Inside each loop, use a local variable of the boolean tied to the continue terminal of the loop.
    You need to use local variables because an input to a loop (wired from outside the loop) is read only on the first loop iteration. Any subsequent change to a control terminal outside of the loop is not seen by the loop.
    To create a local variable, on the diagram, right click on the terminal of interest, then select Create >> Local Variable. Then right click on the local variable and select Change to Read.
    P.S. You know your stop button is wired to an empty case and doesn't do anything.

  • How to stop while loop for particular time

                    public void test()
                   new Thread(new Runnable()
                        public void run()
                             //Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
                             System.out.println("test");
                             //System.out.println("test ..."+i);
                             try
                                  Thread.sleep(3000);
                             catch (InterruptedException e)
                   }).start();
            public void startTest()
                    while(i < marquee_Str1.length)
                   marLbl1.setValue(marquee_Str1); //set value to textbox for perticular id
                   marLbl2.setValue(marquee_Str2[i]);
                   marLbl3.setValue(marquee_Str3[i]);
                   test(); // call thread function
                   i++;
    in this code while loop don't stop
    plz help me to stop while loop for certain period by using thread or other technique                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Yes.. the original problem would be your test() method put the sleep in an entirely separate thread of execution. So the thread is created then the method just keeps waiting. The while loop should directly call Thread.sleep... which you have apparently figured out!

  • Looping thru entire BPEL process

    I have a Synchronous BPEL process that uses the task manager. Based on the response from the Task Manager it has to loop through the process all over again - basically, go back to the initiate/process operation again (similar to a "GOTO" operation). How do I achieve this?
    Thanks in advance,
    Mrigasira

    For now, you have to do a while loop and explicitely rerun the logic. This is a very common feature request: we are working on adding a ReplayFault which will for the engine to fault a scope and recreate an instance of it. That should find its way into the 2.1 end of september release. -Edwin

  • How to make sure one instance of BPEL process runs at a time.

    Hello,
    we have a BPEL web service and would like to run the BPEL processes serially. below is our senario
    Process "A" kicks of ( 100's of them via file polling)
    at some activity (not at the beginning) the BPEL process should check if there are any other BPEL instances of same Process "A" are running? If so then it should wait until the process completes.
    is there an API to check what other instances are running and if so if they completed or not?

    Have a look at metalink note 779136.1, you have to be on
    10.1.3.3.1 MLR#14 or above
    10.1.3.4 MLR1
    There is a note saying model on a synchronous pattern. There is no instructions on how to do this you need to create a new message definition to the wsdl
    <message name ="Dummy">
    <part xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Dummy_element" type="xsd:string"/>
    </message>
    in the port type add an output definition
    <portType name="Read_ptt">
    <operation name="Read">
    <input message="tns:payload_msg"/>
    <output message="dummy_output"/>
    </operation>
    </portType>
    here is an example
    <definitions
    name="GetFile"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/file/GetFile/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/file/GetFile/"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:pns1="http://xmlns.oracle.com/ComplexFile/correlationset"
    xmlns:pc="http://xmlns.oracle.com/pcbpel/"
    xmlns:imp1="http://TargetNamespace.com/GetFile"
    xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/file/"
    >
    <import namespace="http://xmlns.oracle.com/ComplexFile/correlationset" location="ComplexFile_Properties.wsdl"/>
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/file/" location="fileAdapterInboundHeader.wsdl"/>
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://TargetNamespace.com/GetFile" schemaLocation="sample_1.xsd"/>
    </schema>
    </types>
    <message name="payload_msg">
    <part name="payload" element="imp1:payload"/>
    </message>
    <message name="dummy_msg">
    <part name="dummy_string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string"/>
    </message>
    <portType name="Read_ptt">
    <operation name="Read">
    <input message="tns:payload_msg"/>
    <output message="tns:dummy_msg"/>
    </operation>
    </portType>
    <binding name="Read_binding" type="tns:Read_ptt">
    <pc:inbound_binding/>
    <operation name="Read">
    <jca:operation PhysicalDirectory="c:\temp\inbound\ComplexFile" ActivationSpec="oracle.tip.adapter.file.inbound.FileActivationSpec"
    DeleteFile="true" IncludeFiles=".*\..*" PollingFrequency="10" MinimumAge="0"
    Sorter="oracle.tip.adapter.file.inbound.listing.TimestampSorterDescending"
    OpaqueSchema="false"/>
    <input>
    <jca:header message="hdr:InboundHeader_msg" part="inboundHeader"/>
    </input>
    <output/>
    </operation>
    </binding>
    <service name="GetFile">
    <port name="Read_pt" binding="tns:Read_binding">
    <jca:address location="eis/FileAdapter" UIincludeWildcard="*.*"/>
    </port>
    </service>
    <plt:partnerLinkType name="Read_plt">
    <plt:role name="Read_role">
    <plt:portType name="tns:Read_ptt"/>
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    cheers
    James

Maybe you are looking for