While loop BPEL

hello,
I am getting a collection of 3 records from database adapter select query.
i am looping over the record and able to get hold of first record.
i want to insert this first record into another database adapter (Insert operation). For this to happen, I have created a variable (with my own custom xsd) myVar.
I use assign to ------ Assign this first record TO myVar
Then use Assign activity to assign each element of myVar TO the database adapter Insert_Input variable.
Thing is, this Insert_Input variable just does not get the variable value copied. It remains empty hence Insert keeps failing.
Now, I dont know whether the myVar itself is empty OR the Assign Copy operation keeps failing.
How to resolve this problem ? What am i doing wrong ?
I also tried using Transform activity instead of Assign. Taht too does not get the values to Insert_Input variable of adapter.

when you check the audit trail you can see the result of the first assign to myVar
see if that one is filled correctly
after that check if the assign to the Insert_Input variable is correct, see if it contains data after it.
if you assign myVar to Insert_Input variable at top level, you will have namespace issues if both variables have different namespaces
so the xpath on Insert_Input/your_element won't work in that case.
like Oracler said, either use an transformation in that case for mapping all elements in your var, or assign every element in it one by one, instead of the toplevel assign

Similar Messages

  • 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

  • BPEL While Loop Issues

    I have a BPEL process that polls a DB table for records. The DB Adapter has the both Database rows per transaction and Database Rows per XML set to 10. A While loop in the BPEL process loops over all the 10 records, applies suitable transformation and continues with processing. For testing purpose, I inserted 15 records into the table. As expected, 2 instances of the BPEL process were created. The first instance received 10 records and the second one 5. The second instance processed all 5 records but the first instance executes the loop just once, then the condition is evaluated to false and the rest of the records are not processed. Since the second instance is able to loop through all the records, the configuration is correct. I am not sure why the first instance is exiting the loop after just one iteration. I have a simple bpel process to reproduce this issue and I can share it. Following are the versions used:
    Jdev: 11.1.1.7
    BPEL: 1.1
    All help appreciated.
    Thanks,
    Divya

    I have uploaded the BPEL project as well as the sample DB:
    https://community.oracle.com/docs/DOC-893469?sr=stream
    https://community.oracle.com/docs/DOC-893468?sr=stream
    The input XML is below:
    <BpelTest><key>110</key><value>Lyndon Johnson</value><status>S</status></BpelTest>-<BpelTest><key>120</key><value>George Washington</value><status>S</status></BpelTest>-<BpelTest><key>130</key><value>Benjamin Franklin</value><status>S</status></BpelTest>-<BpelTest><key>140</key><value>Abraham Lincoln</value><status>S</status></BpelTest>-<BpelTest><key>150</key><value>Richard Nixon</value><status>S</status></BpelTest></BpelTestCollection>
    Thanks,
    Divya

  • How to use one single boolean button to control a multiple while loops?

    I've posted the attached file and you will see that it doesn't let me use local variable for stop button, but I need to stop all the action whenever I want but more than one single button on the front panel would look ugly... The file represents the Numeric Mode of
    HP 5371A. thanks for your time
    Attachments:
    NUMERIC.vi ‏580 KB

    In order to use a local variable, you can change the mechanical action of stop button (Switch When Pressed will work), or create a property node for it and select values. You'll also have to do a lot of work changing those for loops into while loops so that you can abort them.

  • While loop doing AO/AI ... Performanc​e?

    Hi!
    I have been trying to get a VI to do concurrent Analog
    data in and out and both the input and output rates and
    waveforms can change while the VI is running. My problem
    is this:
    (a) If I try putting the read and write operations in
    separate while loops, one or the other loop will
    die in a buffer over/underrun.
    (b) If I put both into the same loop, then this works
    but I am limited in the choice of data-rate parameters
    because eventually one or the other DAQ VI will take
    too long.
    At this point I have only one loop and the buffers are big
    enough to hold 10 iteration. Every time one of the loops
    dies I reset it. Still this seems awkward. Is there a
    way of improving on the loop overhead and putting t
    he
    input and output in separate loops? Or any other way to
    improve performance?
    Rudolf

    Ok, I knew that ocurences did something useful but I am
    still a bit confused:
    * Can you set an occurrence for an output event. None
    of the examples I've seen say so but it looks like
    it should work
    * How do occurrences actually help with the "hanging"
    problem. Does the compiler see the occurrence in
    a loop and change the wait parameters?
    I looked at devzone but most of the stuff I found there,
    even the promising looking stuff was all about
    synchronizing and triggering, not about occurrences.
    Rudolf
    JB wrote:
    : Once in the read function, the program "hangs" until the number of
    : data points is in the buffer. The same applies to the write function.
    : This means that most of the time, your program is waiting.
    : To sol
    ve this problem, you must use DAQ occurrences (--> hardware
    : events).
    : For examples for using daq occurrences, type "daq occurrence" in the
    : search of the LabVIEW help or even better, at
    : http://zone.ni.com/devzone/devzoneweb.nsf
    : Hope this helps

  • Can not pass data after while loop

    Hello.
    I have created a VI for my experiment and am having problem passing data outside a while loop to save on an excel file. The VI needs to first move a probe radially, take data at 1mm increment, then move axially, take data radially at 1mm increment, then move to the next axial position and repeat. It would then export these data to an excel file. The VI is a little complicated but it's the only way I know how to make it for our experiment. I have tested it and all the motion works correctly, however I can not get it to pass the data after the last while loop on the far right of the VI where I have put the arrows (Please see the attached VI ). Is it because I'm using too many sequence, case, and while loops?  If so, what other ways can I use to make it export data to the excel file?
    Any help would be appreciated. 
    Thank you,
    Max
    Attachments:
    B.Dot.Probe.Exp.vi ‏66 KB

    Ummmm .... gee, I'm not even sure where to begin with this one. Your VI is well .... ummmm... You have straight wires! That's always nice to see. As for everything else. Well... Your fundamental problem is lack of understanding of dataflow programming. What you've created is a text program. It would look fantastic in C. In LabVIEW it makes my heart break. For a direct answer to your question: Data will not show up outside a while loop until the while loop has completed. This means your most likely problem is that the conditions to stop that specific loop are not being met. As for what the problem is, I don't even want to start debugging this code. Of course, one way to pass data outside of loops is with local variables, and hey, you seem to be having so much fun with those, what's one more?
    This may sound harsh, and perhaps be somewhat insulting, but the brutal truth is that what I would personally do is to throw it out and to start using a good architecture like a state machine. This kind of framework is easy to code, easy to modify, and easy to debug. All qualities that your code seems to lack.
    Message Edited by smercurio_fc on 08-17-2009 10:00 PM

  • Why writes LabVIEW only every 2 seconds the measured Value to a Excel (In a while loop with 100 ms tact)?

    Hi everybody,
    I use the myDAQ to measure speed, ampere, and voltage of a battery driven motor. (For Current measurement, i use a Sensor which outputs a 0-10 V signal). I placed all DAQ-Assitants in a while loop with a [Wait until next ms multiple] clock and set a value of 100 ms. I thougt, Labview will now write into my text file 10 times a second all values. In fact, as you can see in the attached text file, Labview only writes in a unsteady interval of 1-2 seconds a value, which is too less.
    The question: Did I do anything wrong, how can you create VI that writes you lets say 10 values a second into text file? Or is simply the DigitalMultimeter input of the myDAQ not able to sample a rate of 10 Hz? I couldn´t find any information in the specification handbook about the sample rate of the DMM?
    If anyone can help me would be great! Thanx a lot, Markus
    Attachments:
    Measure Speed+Current+Voltage into Excel.vi ‏175 KB
    Test7.txt ‏1 KB

    File I/O is not very efficient. I recommend that you do you file logging in a parallel task. Have one task do your data acquision. This task would then pass the data to be logged to the logging task via a queue. That way your file operations do not impact your data acquision. Also, express VIs are not very efficient. You would be better off accessing that directly using the DAQ VIs. The express VIs contain lots of steps that do not need to be done every time you call it such as initializing the device.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • How can I reset the value of an indicator in a while loop, from another synchronous while loop?

    I am running 2 synchronous while loops, one which is keep track of time, and the other is measuring periods. In the while loop that is measuring periods, I have a boolean indicator displaying whether the signal is on or off. My problem is that when the signal is off, the VI I use to measure the periods is waiting for the next signal, and displays the boolean value from the previous period measurement. While this VI is waiting, I want the indicator to display false and not the value from the last iteration of the loop.
    I am using LV 5.1 for MAC.

    Two things you can try:
    In preface to the first, the most common (perhaps ONLY) use of local variables should be in transferring data between parallel loops. This is a matter of discipline, and creates programs that are easier to understand, take less time and memory, and are just plain cleaner. Having said that, to transfer data between loops, use a local variable.
    Second solution: Instead of setting the value to false, just hide the indicator in question by using control references (property nodes for prev. version of LabVIEW). Control references are a great way to control items on a dialog or HMI screen.

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Getting data from a while loop while running.

    Hello,
    I did a program that call a sub-VI which is doing experiment and have its own timer.
    The sub-VI is a while loop and the stop condition of this loop is the elapsed time of my timer.
    What I want to do is to be able to get the elapsed time in my main program during the execution of the sub-VI (every second of its execution).
    First I assign the elapsed time in the sub-VI as an output of it. But of course the elapsed time is only updated in the main VI only when the while loop has finished. So I tried several solution: property nodes, local variable, global variable.
    When I am using global variable, I can see the elapsed time being updated during the while loop when I open the global variable VI. But the result is always the same: in the main VI the elapsed time is only updated at the end of the while loop.
    I think that is the global variable is updated every time, I could be able to get its data to my main VI?
    Does anyone have an idea?
    Thank you,
    Meach

    I tried using shared variable and reference without succes.
    I will keep searching.
    I enclose my VI that I simplify the most but with still keeping the shape of my real program. If you can take a look I will really appreciate.
    The goal is on the top-level VI to be able to see the updating data time in real time.
    Thanks,
    Meach
    Message Edited by Meach on 07-23-2008 04:13 PM
    Message Edited by Meach on 07-23-2008 04:14 PM
    Attachments:
    Elapsed Time.zip ‏25 KB

  • How to stop execution in while loop without stopping execution of other loops in the same vi

    HI
    I am quite a novice in Labview.
    I have a problem in my project. I used a while loop inside my vi to build an array of ten values along with other loops. Then I used a stop button to stop manually the while loop. But it seems like the loop doesn't stop in the middle of the array building and so other loops in the vi doesn't work until the while loop finishes building the array and as soon as while loop execution is over, the complete vi stops. But all that I wanted was to build the array using the shift register along with the control to stop building array anytime. And not to stop execution of other structures when the while loop finishes.
    Can anyone help me?
    Rahul

    Hi Rahul,
    Modified ur Vi to work with single button.
    But the subtract case is not in any loop.
    So, once both the loops stop, the subtract case will execute only once. Depending on state of subtaract boolean at that time, corresponding case will be executed and the Vi will stop.
    so think of a logic where u can put this also in a new loop.
    Or you can also incorporate it in one of the two loops and pass the other loop's data to it.
    Let us know how you will proceed in this regard
    I am posting your VI as well a VI with my modifications VI in Labview 7.0 so that Thomas can give his suggestions too
    Plus, always keep a time delay in your while loops.
    Oh sorry, the "arrayinouttestnewfinal.vi" is the modified vi
    Regards
    Dev
    Message Edited by devchander on 01-10-2006 06:15 AM
    Message Edited by devchander on 01-10-2006 06:19 AM
    Attachments:
    arrayinouttestnewfinalnew4.vi ‏59 KB
    arrayinouttestnewfinal.vi ‏63 KB

  • Problem with DAQ in while loop and Graphs

    Hello,
    I'm new here so I apologize if I posted this on the wrong board  
    This is my "situation":
    I need to make a simple PID controller which takes information (process variable) from an outside source (a NI's DAC connected through the USB port ) which is accomplished using NI-DAQ as an input, and the PID's output goes to the second NI-DAQ which is also connected using DAC to an actuator which in my case regulates the air pressure. (VI attached)
    My problem is the following.
    Both of the NI-DAQ I placed using DAQ Assist, require to be in a while loop.
    -If I place them in separate loops, I have the problem of passing information between the Input NI-DAQ and the PID, and also between the PID and the Output NI-DAQ.
    -If I place them both in one big loop, an error occurs saying that the selected buffer size is too small (Error -200609).
    The timing settings for the DAQ's N samples, 100 samples to read at the rate of 1k (I also tried with Continuous samples and many different combinations of Samples to Read an Rate but without success).
    Should I wire them with the same dt(s)?
    The other thing I need to do (I'm also writing it here in order not to open new topics) is show the following 3 signals on a Graph (process variable (dynamic data type)(range 4mA - 20mA), PID output (double)(range 4mA - 20mA), and the Set Point (double)(range 0 to inf))
    Firstly, is it possible to show the first two on a scale from 0 to 100 without changing the PID's output which needs to be 4-20?
    Secondly, which graph should I use if I have different data types? (I tried the Waveform Chart, and succeeded in showing the first two; the third just messes everything up)
    I would also have to make a legend explaining which signal is which (I see that this is possible with the Mixed Signal Graph).
    I know this is probably too much to ask, but I'd be grateful for any help
    Thank you in advance
    Attachments:
    PID while.vi ‏100 KB

    My problem is the following. Both of the NI-DAQ I placed using DAQ Assist, require to be in a while loop.
    -If
    I place them in separate loops, I have the problem of passing
    information between the Input NI-DAQ and the PID, and also between the
    PID and the Output NI-DAQ.
    This is the best option---Use QUEUE or Functional global or something else to tranfer the data to and fro
    How  do I make that QUEUE or Functional global?
    -If I place them both in one big loop, an error occurs saying that the selected buffer size is too small (Error -200609).
    Have
    you tried increasing the buffer? Is the acquisition happening
    parallelly (means to say the first DAQ not wired (error terminal) to
    second DAQ)
    Well the buffer is, at least how I understood it, the option Number of Samples when in Continuous Samples mode. Concerning the parallel acquisition, do you mean I should wire the error ports of both of the DAQs?

  • Using while loops instead of for loops in arrays?

    I am new to java and doing a java tutorial on using arrays and for loops. What im trying to find out is how it is possible to use a while loop instead.
    I would be very grateful if anyone can suggest a way of changing my code to use a while loop.
    The code I have written is:
    public class DetermineGrade
    public static void main(String[]args)
    final char[] mark = {'A','B' ,'C' ,'D' ,'F' };
    char [] grade = new char[5];
    int [] Score ={95,35,65,75};
    for (int i=0; i<4; i++)
    if (Score >= 90)
    grade= mark[0] ;
    else if (Score >=80)
    grade = mark[1] ;
    else if (Score >=70)
    grade = mark[2] ;
    else if (Score >=60)
    grade = mark[3];
    else grade = mark[4];
    for (int i=0; i<4; i++)
    System.out.println("grade = " + Score + ", " + grade);
    Thankyou LB

    Im trying to underdstand the differences in the
    different loops. I can grasp the for loop but I dont
    see how a while loop works, or how it id different
    from the other?
    for (j = INIT; j < MAX; j++) {
        // do stuff
    }is the same as
    j = INIT;
    while (j < MAX) {
        // do stuff
        j++;
    }Lee

  • Action listeners and while loops

    Hi. I have a while loop, that runs for some condition
    in this loop, i'm adding as many buttons as the condition holds.
    for each loop, i adds an action listener.
    the problem is when i want to use the action listener. it, of corse, respond to the last button in the loop. how can i make all the buttons work? i dont know ho many loops there will be, ergo i don't know how many buttons there will be...
    read from file
    while (file is not empty)
    ImageButton = new ImageIcon (name from file);
    theButton = new JButton(imageButton);
    myPanel.add(theButton);
    theButton.addActionListener(this);
    buttonId = i++;
    in the action listener
    if (listener = theButton)
    //do something

    of corse it would only respond to the last button added, thats what you told it to do. In your while loop you assign the variable "theButton" to be a new JButton. Since "theButton" in reassigned with each iteration of your loop, it will always point to the last button you created. So, in your actionListener when you check if (listener = theButton) it will only know about the last button you added. You will need to find some other way of determining which button was pressed. One possible solution would be to have a unique actionListener for each button. Another option might be to cast the source of the action to a JButton. i.e.
    public void actionPerformed(ActionEvent e)  {
         if (e.getSource() instanceof JButton) {
              //do something
    }

  • Accessing Data within while loops

    I have LabView 6.0
    I have a while loop for my GUI that accesses various sub VIs. One of the Sub VI is a LED on/off thing, which basically checks the communication with the PIC board that I have. For turning the LED on or off, I have to sent a unique command.
    Since the Sub VI for the LED on/off is inside a while loop it continuously executes. I want the SubVI to execute only when the status of the boolean controlling the LED has changed from the previous value. I tried giving a feedback from the SubVI to indicate whether there is a change, but Labview will not allow such loops.
    I then took the SubVI outside the while loop, keeping the boolean control (so that it continuously checks) inside the while loop. I would like the SubVI to execute depending on the boolean control change. I tried using occurances, but I think these execute only once. I tried accessing the boolean control through a local variable, but the value of the local variable would not change outside of the while loop. (even tried property indicators).
    Any solution would be appreciated.
    I could post the VI, but there are too many sub VIs... Dunno if it would be appreciated.
    Thanks!

    If you need to post a VI, it is best to strip out those parts which do not have any effect on the problem you are facing. With subVIs, do a Save with Options..>>Development Distribution. This will create an .llb file with your VI and subVIs.
    Queues and global variables can transfer data between independent nodes. I am not sure when the datatypes of queues changed. In LV6 you may need to flatten your data to string typpe before passing it to a queue. The functional global or LV2 style global is a subVI consisting of a loop which executes only once and which contains the data in an uninitialized shift register. Many threads on this forum have discussed these options.
    Lynn

Maybe you are looking for

  • Releasing to Accounting Issue

    hi guys I raised or and lf and f2 and after that when i release to accounting error message appears. Even i made revenue account determination also.. Presently working on CIN.Even I created revenue account determination for Sales org for EXD  and G/L

  • Nano not communicating with my computer any more!

    I recently tried to sync my ipod nano with my computer...and it says that the device in the USB drive isn't recognized. It will charge, just not sync with iTunes. It has been working for over a year...why would it suddenly stop? I can't restore my iP

  • ITunes crashes on opening after update

    After an iTunes update today it crashes as soon as I open it. It seems like the same problem as discussed a few topics down, but Quicktime is working fine and I have no extra QuickTime files in the \Windows\system32\ directory. I've tried all the rem

  • Viewing a HTML document in my Java program

    Hi, My Java program has a JTextPane that can display plain text or HTML documents. This program can mark up certain parts of the document to draw the user's attention. However, I am having problems when it comes to marking up some of the HTML documen

  • XML.appendChild();

    how do I append a child to an empty xml. var myXML:XML = new XML(); var myOtherXML:XML = <Greeting> Hi <Greeting> var myOtherXML2:XML = <Name> James <Name> myXML.appendChild(myOtherXML) //TypeError: Error #1088: The markup in the document following t