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

Similar Messages

  • Question about using for-loop to generate array from DAQmx. Thanks!

    I have a laser system with a frequency of 1kHz, I am using this 1kHz signal to trigger the DAQmx and get the data from a photodetector, e.g. I will get 1000 data points during 1 second from DAQmx, but I need to separate this 1000 data points into the even and odd list, which is two list of 500 data points, e.g.. The 1st, 3rd, ... 99th data is one array, the 2nd, 4th,... 10th data is another array, then I will do further calculations based on these two arrays.
    To seperate the even and odd data, the only way I can find is put these 1000 points into an array and then seperate them afterwards.
    Can I do things like this pic?
    I don't know the speed of the for loop, because the 1kHz trigger is always there, once it is triggered, the DAQmx read will give a data point, if the speed of the for-loop( the time from the end of a loop to the beginning of the next loop) is slower than the 1kHz trigger, then the for-loop will miss data point, then the ordering of the 1000 points in 1 second will be changed.
    Or I need to put everything, e.g. AI Voltage, Trigger, sample clock, into the for-loop and then return a Y? Thanks! 

    Clarification:
    The VI you have posted will work as following:
    1) The task will read 2 analog inputs (ai0, ai3).
    2) The acquisition starts, oncece digital signal (trigger) is detected on PFI0
    3) The sampling rate will be as specified in "rate" control - it is continuous analog input acquisition, which means that after trigger is received (point 2), the board will start to generate hardware clock with frequency you specify as "rate"
    4) with each rising edge of that hardware clock, the measurement is taken, and stored into buffer of driver.
    5) DAQmx read will try to read "number of samples per channel" number of samples each time is called - and if there is not enough measurement stored in buffer (step 4), then DAQmx read will wait until DAQ card will measure reaquested number of samples (or timeout occurs before requested number of samples has been acquired)
    6) DAQmx read will be then called 1000 times - so totaly you will read 1000 * "number of samples per channel"  number of samples.
    You do not have to be worried about speed of the loop. In fact, if you need to read just 1000 samples, with 1kS/s, then you can remove for loop and you can change measurement mode from continuous to finite samples, and specify number of samples to read to be 1000. You will read them all properly. I recomend you to read User Manual for your DAQ device - lets say M Series User Manual.
    I hope it is clear now.
    regards,
    stefo

  • Bug in conditional for loop with an empty array

    There appears to be a bug in the for loop with a conditional terminal.
    If an empty array is wired to an auto-indexed array input tunnel, an output array tunnel has one element instead of zero.
    The array constant on the left is empty.
    Top loop without the conditional terminal produces an empty array.
    The bottom loop with a never true conditional terminal produces an array with one element
    Using LabVIEW version 8.5
    Message Edited by TrevMrgn on 05-05-2009 02:01 PM
    Solved!
    Go to Solution.
    Attachments:
    For loop bug.png ‏3 KB

    Creating the example from scratch, I do not see the error.
    Neither do I.
    If I add one or more elements to the array (constant or control), then delete them all (using 'Delete Element') the bottom array has one element.
    Nup. Still empty.
    If I empty the array (using 'Empty Array') both are empty.
    Yep.
    Also if I create an empty array using 'initialise array' with zero elements, I get one element.
    Nup. Still empty.
    'Show constant folding' does not appear to change the behaviour, but including a random operation in the loop does.
    Agreed that constant folding doesn't cause any odd behaviour. Introducing a random operation (adding two constants) in the loop doesn't either.
    I've tried all your methods here Trevor, but I can't replicate this behaviour in 8.5.1 under WinXP SP3. Sorry!
     Maybe somebody else will be able to help, or find a useable workaround.
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • Question about "Enhanced for loop"

    public class NewLoopTest{
         public NewLoopTest(){
              int result=0;                      
              int[] a=new int[20];           
              for(int i=0;i<a.length;i++){
                   a=i++;
              for(int i:a){  
    System.out.println("i="+i+";"+"a["+i+"]="+a[i]+";result="+result+"+"+i+"="+(result+i));
                   result+=i;           
              System.out.println("-------------");
              result=0;
              for(int i=0;i<a.length;i++){
                   System.out.println("i="+i+";"+"a["+i+"]="+a[i]+";result="+result+"+"+i+"="+(result+i));
                   result+=i;
    This code counts sum of the elements of a array.
    At first I use the enhanced for loop and at second I use the traditional for.
    Enhanced for loop in sdk1.5 returns only even elements of array, am I right?

    Enhanced for loop in sdk1.5 returns only even
    elements of array, am I right?No. It covers them all.
    The i in the enhanced for loop is not the index. It's the element at the current index. You don't have access to the index in the new loop because you don't need it.
    for (int item : arr) {
        System.out.println(item);
    // is equivalent to
    for (int ix = 0; ix < arr.length; ix++) {
        int item = aa[ix];
        System.out.println(item);
    }The i in your new loop is the same as a [ i ] in the old loop.

  • Dynamic component in WHERE-condition for LOOP AT ?

    i want to make
    loop at itab where  (dynamic field) > 0
    how i can make it...
    Edited by: Thomas Zloch on Mar 2, 2010 2:47 PM

    I thought it's funny.
    And the problem can maybe be solved by using a completely dynamic where-condition, not just a dynamic component.
    http://help.sap.com/abapdocu_70/en/ABAPLOOP_AT_ITAB_COND.htm#!ABAP_ADDITION_4@4@
    Thomas
    P.S. meaningless subject enhanced, and please take the time to say hi and please when asking for help. Thanks.

  • While loop and for loop condition terminal

    Hello friends,
    I am using labview 8.6. The condition terminal of the while loop and conditional for loop is behaving in just the opposite way.
    When i wire a true to the condition terminal of my loop, the while loop continues to run when I click on run. when I wire a FALSE, it stops.
    Is there any setting change that I have to make it to get it work properly.
    Please suggest on this.
    Thanks and regards,
    Herok

    Please do NOT attach .bmp images with the extension changed to .jpg to circumvent the forum filters!
    Herok wrote:
    I am sending you the VI. I am not sure if this would help you because only in 2 computers this behaviour is seen. In others, it works as it is supposed to work.
    Whatever you are seeing must be due to some corruption or folding error. It all works fine here.
    To make sure there are no hidden objects, simply press the cleanup button which would reveal any extra stuff (which is obviously not there). Does it fix itself if you click the termination terminal an even number of times? What if you remove the bad loop and create a new one?
    Could it be you have some problems with the graphics card and the icon of the conditional terminal does not update correctly?
    Whay happens if you connect a control instead of a diagram constant?
    What is different on the computers where it acts incorrectly (different CPU (brand, model), #of cores, etc.) 
    LabVIEW Champion . Do more with less code and in less time .

  • For loop- seems to be just going to last value

    Hi guys, carrying on from the thread I created yesterday I have managed to get the socket working between my server and my client, but I am having an issue when re-constructing a string that is being sent from the client to the server. I am talking about the for loop in line 151, which seems to just going straight to the last value of the for loop and thus the board isn't being reconstructed properly.
    I'm including both the server and client code which just needs to compiled (host is set to localhost on port 4500) and you will see what I mean after inputting a move from the client. Can anyone spot the problem?
    Server code
    import java.io.*;
    import java.net.*;
    import javax.swing.JOptionPane;
    class Server
         public static void main (String []args) throws IOException
              try
                   Server();     
              catch (IOException ex)
         public static void Server () throws IOException
              ServerSocket serverSocket=null;
              int portNo=4500;
              System.out.println("Starting");
              try
                   serverSocket=new ServerSocket(portNo);     
              catch (IOException ex)
                   System.err.println("Could not create socket on port" +portNo);
                   System.exit(1);
              System.out.println("Socket listening");
              Socket clientSocket=null;
              try
                   clientSocket=serverSocket.accept();
              catch (IOException ex)
                   System.out.println("Accept failed");
                   System.exit(1);
              PrintWriter out= new PrintWriter(clientSocket.getOutputStream(), true);
              BufferedReader in=new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
              //coordinates
              String coordinates[] [] = new String [8] [8];
              for (int i=0;i<8;i++)
                   for (int j=0;j<8;j++)
                        if ((i%2!=0)&&(j%2!=0))
                             coordinates[i] [j]="#";
                        else if ((i%2!=0)&&(j%2==0))
                             coordinates[i] [j]=" ";
                        else if ((i%2==0)&&(j%2!=0))
                             coordinates[i] [j]=" ";
                        else
                             coordinates[i] [j]="#";
              coordinates[0][0]="R";
              coordinates[0][1]="N";
              coordinates[0][2]="B";
              coordinates[0][3]="Q";
              coordinates[0][4]="K";
              coordinates[0][5]="B";
              coordinates[0][6]="N";
              coordinates[0][7]="R";
              for (int i=0;i<8;i++)
                   coordinates[1]="P";
              coordinates[7][0]="r";
              coordinates[7][1]="n";
              coordinates[7][2]="b";
              coordinates[7][3]="q";
              coordinates[7][4]="k";
              coordinates[7][5]="b";
              coordinates[7][6]="n";
              coordinates[7][7]="r";
              for (int i=0;i<8;i++)
                   coordinates[6][i]="p";
              Board board1=new Board(coordinates);
              boolean gameStart=true;
              String coord="";
              String originX="";
              String originY="";
              String destinationX="";
              String destinationY;
              while (gameStart)
                   System.out.println("trying to read from client");
                   String input="";
                   try
                        input=in.readLine();     
                        System.out.println(input);
                   catch (IOException ex)
                        System.out.println("Read failed");
                        System.exit(1);
                   originX=input.substring(65);
                   originY=input.substring(66);     
                   destinationX=input.substring(67);
                   destinationY=input.substring(68);
                   coord=input.substring(0,64);
                   System.out.println(coord);
                   for (int p=0;p<64;p++)
                        System.out.println(p);
                        for (int i=0;i<8;i++)
                             for (int j=0;j<8;j++)
                                  coordinates [i] [j]=coord.substring(p);
                                  if (i==(Integer.parseInt(originX))&&(j==(Integer.parseInt(originY))))
                                       String piece="";
                                       piece=coordinates [i] [j];
                                       if ((i%2!=0)&&(j%2!=0))
                                            coordinates[i] [j]="#";
                                       else if ((i%2!=0)&&(j%2==0))
                                            coordinates[i] [j]=" ";
                                       else if ((i%2==0)&&(j%2!=0))
                                            coordinates[i] [j]=" ";
                                       else
                                            coordinates[i] [j]="#";
                                       for (int s=0;s<8;s++)
                                            for (int t=0;t<8;t++)
                                                 if (s==(Integer.parseInt(destinationX))&&(t==(Integer.parseInt(destinationY))))
                                                      coordinates [s] [t]=piece;
                   board1.printBoard(coordinates);
              out.close();
              in.close();     
              clientSocket.close();
              serverSocket.close();          
    class Board
         boolean gameStart=true;
         public Board()
         public Board(String [] [] coordinates)
              printBoard(coordinates);
         String [] [] getCoOrdinates(String [] [] coordinates)
              return coordinates;
         public static void update (String coordinates [] [])
              printBoard(coordinates);
         public static void printBoard(String coordinates[] [])
              for (int i=0;i<8;i++)
                   for (int j=0;j<8;j++)
                        System.out.print(coordinates[i][j]);
                   System.out.println();
    }Client code:import java.io.*;
    import java.net.*;
    import javax.swing.JOptionPane;
    class Client
         public static void main (String [] args) throws IOException
              Socket socket=null;
              PrintWriter out=null;
              BufferedReader in=null;
              String serverLocation="localhost";
              int portNo=4500;
              System.out.println("Starting");
              try
                   socket= new Socket (serverLocation,portNo);
                   out= new PrintWriter(socket.getOutputStream(),true);
                   in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
              catch (UnknownHostException ex)
                   System.out.println("Cannot find" + serverLocation);
                   System.exit(1);     
              catch (IOException ex1)
                   System.out.println("IO problem");
                   System.exit(1);
              System.out.println("Connected");
              //coordinates
              String coordinates[] [] = new String [8] [8];
              for (int i=0;i<8;i++)
                   for (int j=0;j<8;j++)
                        if ((i%2!=0)&&(j%2!=0))
                             coordinates[i] [j]="#";
                        else if ((i%2!=0)&&(j%2==0))
                             coordinates[i] [j]=" ";
                        else if ((i%2==0)&&(j%2!=0))
                             coordinates[i] [j]=" ";
                        else
                             coordinates[i] [j]="#";
              coordinates[0][0]="R";
              coordinates[0][1]="N";
              coordinates[0][2]="B";
              coordinates[0][3]="Q";
              coordinates[0][4]="K";
              coordinates[0][5]="B";
              coordinates[0][6]="N";
              coordinates[0][7]="R";
              for (int i=0;i<8;i++)
                   coordinates[1][i]="P";
              coordinates[7][0]="r";
              coordinates[7][1]="n";
              coordinates[7][2]="b";
              coordinates[7][3]="q";
              coordinates[7][4]="k";
              coordinates[7][5]="b";
              coordinates[7][6]="n";
              coordinates[7][7]="r";
              for (int i=0;i<8;i++)
                   coordinates[6][i]="p";
              Board board1=new Board(coordinates);
              boolean gameStart=true;
              String coord="";
              while (gameStart)
                   String originMove=JOptionPane.showInputDialog(null,"Client Origin Move","Enter in origin of piece",JOptionPane.QUESTION_MESSAGE);
                   String destinationMove=JOptionPane.showInputDialog(null,"Client Destination Move","Enter in destination of piece",JOptionPane.QUESTION_MESSAGE);
                   for (int i=0;i<8;i++)
                        for (int j=0;j<8;j++)
                             coord=coord+coordinates[i][j];
                   System.out.println(coord);
                   out.println(coord+originMove+destinationMove);
                   System.out.println("passed");
              out.close();
              in.close();
              socket.close();
    class Board
         boolean gameStart=true;
         public Board()
         public Board(String [] [] coordinates)
              printBoard(coordinates);
         String [] [] getCoOrdinates(String [] [] coordinates)
              return coordinates;
         public static void update (String coordinates [] [])
              printBoard(coordinates);
         public static void printBoard(String coordinates[] [])
              for (int i=0;i<8;i++)
                   for (int j=0;j<8;j++)
                        System.out.print(coordinates[i][j]);
                   System.out.println();
    }Cheers,
    Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    jverd wrote:
    p595659 wrote:
    1) I don't think that even compiles. Since you're catching IOException, your throws clause is bogus--that method can never throw IOE.I have removed the try and catch statements in the main method. I cannot, however get rid of the throws IOException in the main method other my program won't compile.Right. Don't catch it, since you're not handling it. Just declare that it throws it.
    Indeed, this is what I have done :)
    >
    3) Don't name methods the same as your class name.See answer to 4.
    4) Start method names with lowercase letters.
    try
    serverSocket=new ServerSocket(portNo);     
    catch (IOException ex)
    System.err.println("Could not create socket on port" +portNo);
    System.exit(1);
    ServerSocket is a part of the java.net package. I am just creating an instance of it. http://java.sun.com/j2se/1.4.2/docs/api/java/net/ServerSocket.html
    I don't know what you're talking about. You had a class named Server and a method named Server. That's confusing.Changed- I didn't spot it, so I have named it startServer now.
    >
    5) There's almost no point to ever calling System.exit. Here, again, since you're not
    actually handling the exception, don't bother catcing it.Sorry, but this was how I was taught when I started java. My understanding is that System.exit properly terminated applications so this freed up memory so it's abit of a habit of mine, is this wrong to do in this instance?Calling it in response to an exception is wrong. It's not that method's job to decide to shut down the VM. Just let the exception bubble up (or else handle it properly). You do not need to call System.exit to free up memory. It's freed up automatically when the VM exits. The OS takes care of that, without any help from you.Removed- thanks for clearing that up for me :)
    JacobsB wrote:
    line 151 of the server code or client code?Line 151 of my server code. My client is working fine up to this step of the programming I have done- it's just the server part I'm having issues with. You can compile and run the client fine- you can compile the server but as explained in the original post, I'm having a logical error when redrawing the board when it gets the 68 charecter string from the client (first 64 charecters are for the board, then the original position (x and y respectively), followed up the new position (x and y respectively again).
    I'm including an updated version of the code, after all the comments above so we have an updated version for trying to solve the problem I'm having. The client code does not need to be updated as it has not changed yet, so you can use the code in the original post.
    import java.io.*;
    import java.net.*;
    import javax.swing.JOptionPane;
    class Server
         public static void main (String []args) throws IOException
              startServer();     
         public static void startServer () throws IOException
              ServerSocket serverSocket=null;
              int portNo=4500;
              System.out.println("Starting");
              try
                   serverSocket=new ServerSocket(portNo);     
              catch (IOException ex)
                   System.err.println("Could not create socket on port" +portNo);
                   ex.printStackTrace();
              System.out.println("Socket listening");
              Socket clientSocket=null;
              try
                   clientSocket=serverSocket.accept();
              catch (IOException ex)
                   System.out.println("Accept failed");
                   ex.printStackTrace();
              PrintWriter out= new PrintWriter(clientSocket.getOutputStream(), true);
              BufferedReader in=new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
              //coordinates
              String coordinates[] [] = new String [8] [8];
              for (int i=0;i<8;i++)
                   for (int j=0;j<8;j++)
                        if ((i%2!=0)&&(j%2!=0))
                             coordinates[i] [j]="#";
                        else if ((i%2!=0)&&(j%2==0))
                             coordinates[i] [j]=" ";
                        else if ((i%2==0)&&(j%2!=0))
                             coordinates[i] [j]=" ";
                        else
                             coordinates[i] [j]="#";
              coordinates[0][0]="R";
              coordinates[0][1]="N";
              coordinates[0][2]="B";
              coordinates[0][3]="Q";
              coordinates[0][4]="K";
              coordinates[0][5]="B";
              coordinates[0][6]="N";
              coordinates[0][7]="R";
              for (int i=0;i<8;i++)
                   coordinates[1]="P";
              coordinates[7][0]="r";
              coordinates[7][1]="n";
              coordinates[7][2]="b";
              coordinates[7][3]="q";
              coordinates[7][4]="k";
              coordinates[7][5]="b";
              coordinates[7][6]="n";
              coordinates[7][7]="r";
              for (int i=0;i<8;i++)
                   coordinates[6][i]="p";
              Board board1=new Board(coordinates);
              boolean gameStart=true;
              String coord="";
              String originX="";
              String originY="";
              String destinationX="";
              String destinationY;
              while (gameStart)
                   System.out.println("trying to read from client");
                   String input="";
                   try
                        input=in.readLine();     
                        System.out.println(input);
                   catch (IOException ex)
                        System.out.println("Read failed");
                        ex.printStackTrace();
                   coord=input.substring(0,64);                    
                   originX=input.substring(64,65);
                   originY=input.substring(65,66);     
                   destinationX=input.substring(66,67);
                   destinationY=input.substring(67,68);
                   System.out.println(coord);
                   for (int p=0;p<64;p++)
                        System.out.println(p);
                        for (int i=0;i<8;i++)
                             for (int j=0;j<8;j++)
                                  coordinates [i] [j]=coord.substring(p);
                                  if (i==Integer.parseInt(originX)&&(j==(Integer.parseInt(originY))))
                                       String piece="";
                                       piece=coordinates [i] [j];
                                       if ((i%2!=0)&&(j%2!=0))
                                            coordinates[i] [j]="#";
                                       else if ((i%2!=0)&&(j%2==0))
                                            coordinates[i] [j]=" ";
                                       else if ((i%2==0)&&(j%2!=0))
                                            coordinates[i] [j]=" ";
                                       else
                                            coordinates[i] [j]="#";
                                       for (int s=0;s<8;s++)
                                            for (int t=0;t<8;t++)
                                                 if (s==(Integer.parseInt(destinationX))&&(t==(Integer.parseInt(destinationY))))
                                                      coordinates [s] [t]=piece;
                   board1.printBoard(coordinates);
              out.close();
              in.close();     
              clientSocket.close();
              serverSocket.close();          
    class Board
         boolean gameStart=true;
         public Board()
         public Board(String [] [] coordinates)
              printBoard(coordinates);
         String [] [] getCoOrdinates(String [] [] coordinates)
              return coordinates;
         public static void update (String coordinates [] [])
              printBoard(coordinates);
         public static void printBoard(String coordinates[] [])
              for (int i=0;i<8;i++)
                   for (int j=0;j<8;j++)
                        System.out.print(coordinates[i][j]);          
                   System.out.println();
    }Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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

  • For Loop

    Hi,
    I have a very simple problem, which I am almost embarrassed to ask, about numeric For Loop.
    I am trying to retrieve the first 5 rows from a table with a few selected columns without using a defined cursor. Any suggestion? Thanks in advance.
    Alan

    First, then post the other solution...
    Personally, I would use...but they are really quite similar.
    FOR i IN 1..10 LOOP
              BEGIN
             IF (i = 5) THEN
                RAISE le_continue;
             END IF;
                   common_func.display_output(i);
                   EXCEPTION
                        WHEN le_continue THEN
                             NULL;          
              END;
       END LOOP;Thanks,
    Jason

  • Cursor for loop in PlSql

    while i was studying about cursor for loop i found this statement in the web
    "A cursor FOR loop implicitly declares its loop index as a %ROWTYPE record"
    for example an emp table contain following columns empno,ename,sal,hiredate,deptno
    and let us consider an cursor for loop as
    for rec in select empno,sal from emp loop
    if cursor for loop declare loop index as a %rowtype our cursor statement should include all the columns and follow the data type compatabulity.
    But here our cursor statement includes only few columns,if we use %rowtype we have to select all columns but here we are not doing this.
    Can anyone please explain what is happening in cursor for loop?

    for loop cursor is also like the simple explicite cursor..
    the cursor variable will hold only the columns that are given in select statement of the cursor..
    if u declare a cursor as %rowtype, then it should include all the columns of that particular table..
    otherwise u should use only %type for each and every column seperately only...

  • For loop or while loop in process flow

    Hi,
    Is it possible to use a table as driver for a loop ?
    I want to loop (the number of records in my table ) times and use the value of a certain column as parameter in my loop.
    Thanks in advance
    Carolineb

    Carolineb,
    I think this is possible - develop three PL/SQL-procedures
    1) first procedure PR_GET_LAST_VAL - with one OUT parameter for getting ID of last record from your table (for example select max(id) from your_table)
    2) second procedure PR_GET_FIRST_VAL - with one OUT parameter for getting ID of first record
    3) third procedure PR_GET_NEXT_VAL - with one IN/OUT parameter for getting ID of next record (for example select min(id) from your_table where id>P_VALUE , where P_VALUE is a procedure parameter)
    4) define two variable for process - V_CUURENT (loop variable which will be chaned with third procedure) and V_LAST_VALUE
    5) in process flow before LOOP operator insert procedures PR_GET_FIRST_VAL and PR_GET_LAST_VAL and bind parameters to variables V_CUURENT and V_LAST_VALUE respectively
    6) define condition for LOOP operator as V_CUURENT <= V_LAST_VALUE
    7) in body of LOOP operator insert procedure PR_GET_NEXT_VAL and bind parameter to variable V_CUURENT
    Hope my idea is clear.
    Regards
    Oleg

  • Check condition in Loop step in BPM

    Hi All,
      Need urgent help... I have to specify the condition in loop in such away I need to receive and bundle IDOC1 till I get IDOC2.  Please let me know how to specify the condtion in loop.
    Thank you in advance
    Regards,
    Dhill.

    HI
    See the below link
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm - Collection of IDoc to Single File
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change - IDOC bundling
    Also we have Collection of messages based on the message a pattern in SAP BASIS see the BpmPatternCollectMessage and check for correct IP config..
    Regards
    Chilla

  • For loop initialization before another for loop commanded by an If condition

    Hello Everybody,
     I have made a program which sweeps the total range of the duty cycle of a command signal, for a MOSFET circuit. I use a for loop, and I measure the output power, find the maximum power and block my circuit at this value.
     But I want that this loop serves as an initialization and I would like to add another For loop which starts with an If condition and sweeps a smaller part of the duty cycle. I have a voltage command, and I want that the second loop starts when the voltage command decreases.
    So my question is about the structure to use? I can do it by using a formula node, but I need a very fast program. In fact, when the voltage command decreases, I need to find the maximum output power and to block my circuit at the value in 1s.
    And in general, have you got advices to have a really fast program? (not use graph, tables,....?)
    Thank you very much,
    Anthony

    NitinD wrote:
    What are the contents of the Formula node?
    That is the right question that I was also going to ask!!!
    Also can you put a version of the code you already have here?
    It will be easier to understand your needs with the code you have than with some literal description

  • Less or less than equal in the for loop condition

    Hi,
    What do you prefer, what is more common, which one is more easily readable, less or less than equal in the for loop condition?
    for (int i = 0; i < arr.lenght; i++){..}
    //or
    for (int i = 0; i <= arr.lenght - 1 ; i++){..}I know this is basic programming and nothing to do with Java, so if this forum is not for this purpose, could you please suggest a general programming forum?
    I would really appreciate it as I have many general questions :)
    Thanks in advance,
    lemonboston

    lemonboston wrote:
    Hi,
    What do you preferPersonal preference, which is useless to you
    , what is more common,Based on years of reading open source code, the first
    which one is more easily readable, less or less than equal in the for loop condition?Personal opinion, which is useless to you
    I would really appreciate it as I have many general questions :)If you don't want to think about it yourself (which you should be doing in stead of asking general questions), simply attack it lazily. Both examples achieve exactly the same, but the first one is less to type and to read.

  • [svn:fx-trunk] 11530: Fix ASC-3790 ( conditional expression in for loop causes verifier error) r=jodyer

    Revision: 11530
    Author:   [email protected]
    Date:     2009-11-06 13:23:05 -0800 (Fri, 06 Nov 2009)
    Log Message:
    Fix ASC-3790 (conditional expression in for loop causes verifier error) r=jodyer
    Ticket Links:
        http://bugs.adobe.com/jira/browse/ASC-3790
    Modified Paths:
        flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/ConditionalExpressionNode.java

Maybe you are looking for

  • I-Pod Nano and I Tunes on Windows XP

    I have just bought my I Pod today and have managed to send 40 songs to the I POD but now I have just sent over 300 other songs to my I POD but mysteriously I tunes decided to crash itself and none of the music files are on my I POD. I have tried to r

  • XML DB: XMLType encoding

    Hi I am new in using XMLDB. I extract XML data from the db using a query like this: select XMLElement(...).getClobVal() from... and everything works fine. I encontered a problem with the encoding: e.g. by default apostrophe is encoded as &apos ; whil

  • How do you send images to MSWord

    I'm trying to figure out how to insert a graph or chart image into a MSWORD document using ActiveX. Can anyboby provide some pointers? Does anybody have an example? P.S. I.m still stuck using LV6.0.2

  • Touchpad freezes windows 8

    Hi I have an Hp envy m4 with windows 8 preinstalled. When I try to use the multiouch gestures, the touchpad freezes and I can't move the mouse during a few seconds. I've tried everything, reinstalling drivers, updating them, etc,etc. Nothing seems to

  • PSE 8 photo uploader freezing HELP

    I have pse8 running on windows 7. Within the last 4 weeks my photo uploader has not been able to upload my photos from camera or phone in standard nor advance mode. I connect my device and click (in organizer) get photos from camera and the dialog bo