BPEL 2.0: assessment of the values of node in the forEach loop

[With the help of BPEL 2.0, SOA Suite 11 (11.1.1.6.0) Linux Virtual Box on Windows 7]

It seems like it should be pretty simple, but for some reason that is eluding me. I run a database query to return a list of nodes in the network in a system. then I execute a forEach income statement using a number of XML nodes as a limit of loop. It all works very well.

That is the problem. now, I'm just (?) try to assign the value of the current node UID in the loop to a local variable, using concat and the loop index. Thus, the value should be something like "401" or "523". However, what I actually get back is concatenated XPath itself, as well as the iteration of the loop, my variable is as follows:

[< currentNetworkNodeID xsi: type = "def:string" > $networkNodesOutputVariable.ExecutionNetworkNodeCollection/ns6:ExecutionNetworkNode/ns6:executionNetworkNodeUid[1] < / currentNetworkNodeID >
...
[< currentNetworkNodeID xsi: type = "def:string" > $networkNodesOutputVariable.ExecutionNetworkNodeCollection/ns6:ExecutionNetworkNode/ns6:executionNetworkNodeUid[2] < / currentNetworkNodeID >
etc...

I tried to reach "/ text()" to the end, using ora:getNodeValue (...), etc., but nothing I tried to will give me my value of the current node. If I just use "$networkNodesOutputVariable.ExecutionNetworkNodeCollection/ns6:ExecutionNetworkNode/ns6:executionNetworkNodeUid", I get an error of multiple selection, as expected, because there is always more than one executionNetworkNodeUid.

How I can truly assess these XPath expressions to assign the node real value to my variable...? I can do this in a simple entitled, as I'm doing, or what I have to use a transformation...?

Here is the code:

< parallel forEach = "" counterName = "nodeCounter."
name = "forEachNetworkNode" >
< startCounterValue > 1 < / startCounterValue >
< finalCounterValue > count($networkNodesOutputVariable.ExecutionNetworkNodeCollection/ns6:ExecutionNetworkNode) < / finalCounterValue >
< name of scope = "Scope1" >
< variables >
< variable name = "currentNetworkNodeID" type = "xsd: String" / >
< / variables >
< name of sequence = sequence of '1' >
< assign the name = "assignCurrentNodeID" >
< copy >
([< to > concat('$networkNodesOutputVariable.ExecutionNetworkNodeCollection/ns6:ExecutionNetworkNode/ns6:executionNetworkNodeUid[',$nodeCounter,'] ') < / from >
< to > $currentNetworkNodeID < /pour >
< / copy >
< / assign >
< / sequence >
< / scope >
< / forEach >

Edited by: rhoward on April 3, 2013 15:08

Should not just $networkNodesOutputVariable.ExecutionNetworkNodeCollection/ns6:ExecutionNetworkNode/ns6:executionNetworkNodeUid[$nodeCounter] without using concat?

Hruthayah

Tags: Fusion Middleware

Similar Questions

  • Function to find the number of lines to display by the foreach loop?

    Hi all

    Is it possible to find the number of lines to display per the foreach loop in the rtf model?
    We need to get the number of rows without using the count() in the xml file.
    We do some calculations based on the count in the rtf model.

    Thanks in advance

    Paste your file xml here, patients show us how count.

    You can count the number of lines.

    use

  • How to get the value selected inside the forEach loop

    Hello
    I have foreach loop with a link inside command. It looks like in below:

    * < af:forEach items = "#{PagingBean.pages}" var = "item" > * "
    * < text af:commandLink = ' #{point} "id ="cl1. "
    * actionListener = "#{PagingBean.pageLinkClicked}" / > * "
    * < af:spacer width = "10" height = "10" id = "s1" / > *.
    * < / af:forEach > *.

    where PagingBean.pages is an array of integers.
    Now the links look like this * 1 2 3 4 5 * I want to get the value of the clicked link.
    Anyone please help me to get the value of commandlinks clicked in the bean

    Hello

    How about the text in the actionListener for the clicked commandLink and process accordingly?

    Ex:

     
                           
                           
    
    
        public void pageLinkClicked(ActionEvent actionEvent) {
            // Add event code here...
            System.out.println(((RichCommandLink)actionEvent.getSource()).getText());
        }
    

    Arun-

  • How to put a line inside the foreach loop number

    Hello

    I work in a nutshell, model, and I have a foreach loop. For each row of data, I would like to put a line at the beginning of the line number, i.e., 1,2,3,4, etc.

    How can I do this in Word?

    Thank you

    use

    
    
    
  • The foreach loop to see the result in richTextBox1 but only see the first result of the query. ?

    I have the table names in the list box to check if the same tables has same columns. For example

    listBox3 is the name of the EMPLOYEE table that my request must verify if the EMPLOYEE table has different columns.

    This query working as for example: table Employee UserA and UserB has Employee table too. After comparing the time user Employee table I get the altar of statements about richTextBox1.

    Depends on my EMPLOYEE table, I guess only to see the result as below;

    ALTER table EMPLOYEE add DESCRIPTION VARCHAR2 (15);

    ALTER table EMPLOYEE add CITY VARCHAR2 (10);

    but only seeing:

    ALTER table EMPLOYEE add DESCRIPTION VARCHAR2 (15);

    foreach (string Items in listBox3.Items)
      
    {
      
    using (OracleCommand crtCommand = new OracleCommand(
    "with src as(select src.table_name src_table_name, src.column_name src_col_name, src.data_type src_data_type, src.data_length src_data_len, src.data_precision src_data_precision, src.data_scale src_data_scale, src.nullable src_nullable,decode(T.Constraint_Type,'P', 'Primary Key','U','Unique','') as src_cons from all_tab_columns src left join (select Cc.Column_Name,Uc.Constraint_Type from user_cons_columns cc, user_constraints uc where Cc.Constraint_Name = Uc.Constraint_Name and Cc.Table_Name = Uc.Table_Name) t on T.Column_Name = Src.Column_Name where table_name = '" + Items + "' and owner='" + txtSrcUserID.Text + "'), tgt as(select tgt.table_name tgt_table_name, tgt.column_name tgt_col_name, tgt.data_type tgt_data_type, tgt.data_length tgt_data_len, tgt.data_precision tgt_data_precision, tgt.data_scale tgt_data_scale, tgt.nullable tgt_nullable, decode(T.Constraint_Type,'P', 'Primary Key','U','Unique','') as tgt_cons from all_tab_columns tgt left join (select Cc.Column_Name,Uc.Constraint_Type from user_cons_columns cc, user_constraints uc where Cc.Constraint_Name = Uc.Constraint_Name and Cc.Table_Name = Uc.Table_Name) t on T.Column_Name = tgt.Column_Name where table_name = '"+Items+"' and owner='" + txtDesUserID.Text + "'), col_details as(select src.src_table_name, nvl(tgt.tgt_table_name, first_value(tgt_table_name) over(order by tgt_table_name nulls last)) tgt_table_name, src.src_col_name, src.src_data_type, src.src_data_len, src.src_data_precision, src.src_data_scale, src.src_nullable,src_cons, tgt.tgt_col_name, tgt.tgt_data_type, tgt.tgt_data_len, tgt.tgt_data_precision, tgt.tgt_data_scale, tgt.tgt_nullable,tgt_cons from src full outer join tgt on (src.src_col_name = tgt.tgt_col_name))select * from (select case when tgt_data_type != src_data_type or tgt_data_len != src_data_len or tgt_data_precision != src_data_precision or tgt_data_scale != src_data_scale or tgt_nullable != src_nullable then 'alter table ' || tgt_table_name || ' modify ' || tgt_col_name || ' ' || src_data_type || ' ' || case when src_data_type in ('DATE') then null else case when src_data_type in ('VARCHAR', 'VARCHAR2') then ' (' ||nvl(to_char(src_data_len), ' ') || ') 'else decode(nvl(src_data_precision, -1), -1, null, nvl(to_char(src_data_precision), ' ') || ', ' || nvl(to_char(src_data_scale), ' ') || ')') end end || case when tgt_nullable = 'Y' then ' null ' else ' not null ' end || tgt_cons when tgt_col_name is null then 'alter table ' || tgt_table_name || ' add ' || src_col_name || ' ' || ' ' || ' ' || src_data_type || ' ' || case when src_data_type in ('DATE') then null else case when src_data_type in ('VARCHAR', 'VARCHAR2')then '('|| nvl(to_char(src_data_len), ' ') || ') ' else decode(nvl(src_data_precision, -1), -1, null, nvl(to_char(src_data_precision), ' ') || ', ' || nvl(to_char(src_data_scale), ' ') || ')')end end || tgt_cons when src_col_name is null then 'alter table '|| tgt_table_name ||' drop '||tgt_col_name end alter_statement from col_details) where alter_statement is not null", conn1))
      
    {
      
    var result = crtCommand.ExecuteScalar();

      
    if (result != null)
      
    {
      richTextBox1
    .AppendText(Environment.NewLine);
      richTextBox1
    .AppendText(result.ToString() + ";");
      richTextBox1
    .AppendText(Environment.NewLine);
      
    }
      
    else
      
    {
      
    continue;
      
    }

      
    }  
      
    }


    This is the same query:


    with the CBC as

    (

    Select src.table_name src_table_name, src.column_name src_col_name, src.data_type src_data_type, src.data_length src_data_len, src.data_precision src_data_precision, src.data_scale src_data_scale,

    CBC. Nullable src_nullable, decode (T.Constraint_Type, 'P', 'Primary Key', 'U', 'Unique', ") as src_cons

    all_tab_columns CBC

    left join (select Cc.Column_Name, Uc.Constraint_Type

    of user_cons_columns cc, uc user_constraints

    where Cc.Constraint_Name = Uc.Constraint_Name

    and Cc.Table_Name = Uc.Table_Name) t

    on T.Column_Name = Src.Column_Name

    where table_name = ' EMPLOYEE worker ' and owner = "ERHAN"

    ),

    As TGT

    (

    Select tgt.table_name tgt_table_name, tgt.column_name tgt_col_name, tgt.data_type tgt_data_type, tgt.data_length tgt_data_len,

    TGT.data_precision tgt_data_precision, tgt.data_scale tgt_data_scale, tgt.nullable tgt_nullable,

    Decode (T.Constraint_Type, 'P', 'Primary Key', 'U', 'Unique', ") as tgt_cons

    from all_tab_columns tgt

    left join (select Cc.Column_Name, Uc.Constraint_Type

    of user_cons_columns cc, uc user_constraints

    where Cc.Constraint_Name = Uc.Constraint_Name

    and Cc.Table_Name = Uc.Table_Name) t

    on T.Column_Name = TGT. Column_Name

    where table_name = 'EMPLOYEE' and owner = "SARIGUL"

    ),

    col_details as

    (

    Select src.src_table_name, nvl (tgt.tgt_table_name, first_value (tgt_table_name) more (order of nulls last tgt_table_name)) tgt_table_name;

    SRC.src_col_name, src.src_data_type, src.src_data_len, src.src_data_precision, src.src_data_scale, src.src_nullable, src_cons,

    TGT.tgt_col_name, tgt.tgt_data_type, tgt.tgt_data_len, tgt.tgt_data_precision, tgt.tgt_data_scale, tgt.tgt_nullable, tgt_cons

    the CBC

    outer join full tgt

    on)

    SRC.src_col_name = tgt.tgt_col_name

    )

    )

    Select *.

    BeO

    Select the case sensitive option

    When tgt_data_type! = src_data_type or tgt_data_len! = src_data_len or tgt_data_precision! = src_data_precision or tgt_data_scale! = src_data_scale or tgt_nullable! = src_nullable

    then 'alter table ' | tgt_table_name | 'Edit ' | tgt_col_name | ' ' || src_data_type | ' ' ||

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then ' (' |) NVL (to_char (src_data_len), ' ') | ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    ||

    cases where tgt_nullable = 'Y' then 'null '.

    of another end 'not null '.

    || tgt_cons

    When tgt_col_name is null

    then 'alter table ' | tgt_table_name | 'Add ' | src_col_name | ' ' ||  ' ' || ' ' || src_data_type | ' ' ||

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then ' ('| nvl (to_char (src_data_len), ' ') |) ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    || tgt_cons

    When src_col_name is null

    then 'alter table' | tgt_table_name: ' drop '. tgt_col_name

    end alter_statement

    of col_details

    )

    where alter_statement is not null;


    After reading the post, I could not understand if you mean that the problem is with your query or the code displays the result on your UI.

    The query returns a correct result when it is run on SQL Prompt?

    If this is the case, then perhaps problem exists with your logic to assign variables. Maybe, you need a loop in the set of results rather that by assigning them once. Or maybe not, because I do not know what language you are using.

    var result = crtCommand.ExecuteScalar();
    
       if (result != null)
       {
      richTextBox1.AppendText(Environment.NewLine);
      richTextBox1.AppendText(result.ToString() + ";");
      richTextBox1.AppendText(Environment.NewLine);
       }
       else
       {
       continue;
       }
    

    If you say, there is problem with the query, it's a good place to ask your question, but you must provide the Table definitions that can be replicated.

    If the query works fine, then maybe consider posting this question at an appropriate forum (c#).

  • store the value obtained in the while loop

    Hello

    I'm data acquisition (1,000 points every 0.1 s) in a while loop. I would like to calculate the average y of the first sample of 1000 points when I click on a Boolean 'calibrate', store that value somewhere (outside the while loop?) so that it can subtract from each new amplitude y. In the vi below, a new average value is calculated in each loop, although I would only use the first.

    You don't need to store the value outside the while loop. Keep the offset of the value when calibrate button is pressed and subtract the value with earned value. I modified your find VI the VI attached.

  • Error 401 during the passage of the assessment of the production environment

    Hello

    We recently moved our application for assessment of the production environment by using the credentials provided by the Push of BB Services, only to find out that we receive an "HTTP 401 - PushServiceId/password status invalid in the authorization HTTP header" whenever we try to send a push notification.

    We do not have change our code (which works very well using assessment data) at all except for his replacement by credentials. We use the URL https://cpxxx.pushapi.na.blackberry.com/mss/PD_pushRequest to send our push notifications, where xxx is the CPID provided by BlackBerry, and we're certainly using the password for the initiator to push (instead of the password for the portal content provider).

    Needless to say that we are base64 encoding app id and the password in the header, and as I said if switch back us to the environment assessment (change credentials), everything works fine.

    This becomes a problem, I would appreciate help if someone was faced with a similar problem.

    That's all. He works with the new credentials.

    Thank you.

  • BPEL 2.0: Normally answer the synchronization process, but the rollback transaction statement

    Did not know where to place the question

    BPEL 2.0: Normally answer the synchronization process, but the rollback transaction statement

    then post a link here as well.

    TIA,

    A.

    Hi there is community,

    just guessed myself. The solution is mentioned in the documentation - look @ https://docs.oracle.com/middleware/1213/soasuite/develop-soa/bpel-transaction-semantics.htm#SOASE85811 table 13-2 BPELCaller called BPELCallee that has bpel.config.transaction set to requiresNew.

    What I did:

    1A added another BPEL to call my the original (as mediator)

    2. my original BPEL has been configured with bpel.config.transaction = requiresNew. What original BPEL processes is to start its own global transaction, other than the one initiated by my caller process that has been suspended.

    3. in my original BPEL in the case of exceptions or abnormal situations I launch/recovery flaws of the company. According to the documentation, this cancels the new transaction (from my original BPEL). The exception is caught by the calling process and appropriate response is generated on my composite consumer. The data is correctly saved (not) in the DB.

    See you soon,.

    A.

  • An expression of EI is always assessed once the project is implemented in a .mov format?

    Hi all

    I am very new to AE and I m checking to see if it is possible to have an expression of AE assessed once the project is implemented in a .mov format?

    For example, I want the motion to be built to display the name of a computer of the person who plays the motion.

    Thanks for your help

    The video is video and video is not interactive. You can have interactive video players, but this isn't happening with AE. Think HTML5, javascript, or flash. You will need a custom video player and the external code.

  • BPEL process stopped polling after the displaced Table

    Hello

    Oracle 10.1.2
    SOA Suite 10.1.3.4

    We have a process BPEL has been deployed and working for a while. This process is defined to query a table in every 5 seconds and set the State on BPEL_POLLED once found. It was working fine until I dropped and re - recreates the table that was questioned. (No changes have been made to the structure of the table - I was mearly testing a build script).

    This table was recreated, the BPEL process stopped polling. I have re-deployed service, stopped and started the server and it is not the voting table.

    May I take it that drop and recreate the table being queried have an impact on the electoral process and I looked through the forums, but I don't really know what I'm looking for?

    I'm not a developer, BPEL, however I was left the task of working through this, any help would be appreciated.

    Concerning

    JB

    Hi James,
    This is an expected default behavior (in 10.1.3.4 MLR #7 from at least). The State of the process is set to 'stop' if the vote fails with a SQL error. If you look at the log file, after you turn on debugging, you'd be able to see an explicit message that indicates that the process is currently disabled.

    If you simply change the status of the process to 'On' even once, it would begin returning.
    Or to be on the safer side, if you want to change the structure etc. of the voting table, its best to withdraw from the process, modify the table and then activate the process.

    Hope this helps,
    Kind regards
    Yohanna.
    http://www.prshanmu.com/articles

  • How is it my local variable is not updated its value compared to what is happening in the while loop?

    Hello

    I am trying to extract data from a time that my statements updated in what concerns the number of loop iteration. I tried to use the two local variables and travel records, but without success.

    I also did the following example: http://www.ni.com/white-paper/7585/en and it works like a charm.

    I've attached the PNG file with declaration of the local variable circled in red. Join a VI in the next respnose.

    Thank you

    No, the two while loops are stacked and not parallel, which means the outer loop cannot go to the next iteration until all code in this document, including the inside so that the loop is finished.

  • global variable functional to read and write data from and to the parallel loops

    Hello!

    Here is the following situation: I have 3 parallel while loops. I have the fire at the same time. The first loop reads the data from GPIB instruments. Second readers PID powered analog output card (software waveform static timed, cc. Update 3 seconds interval) with DAQmx features. The third argument stores the data in the case of certain conditions to the PDM file.

    I create a functional global variable (FGV) with write and read options containing the measured data (30 double CC in cluster). So when I get a new reading of the GPIB loop, I put the new values in the FGV.

    In parallel loops, I read the FGV when necessary. I know that, I just create a race condition, because when one of the loops reads or writes data in the FGV, no other loops can access, while they hold their race until the loop of winner completed his reading or writing on it.

    In my case, it is not a problem of losing data measured, and also a few short drapes in some loops are okey. (data measured, including the temperature values, used in the loop of PID and the loop to save file, the system also has constants for a significant period, is not a problem if the PID loop reads sometimes on values previous to the FGV in case if he won the race)

    What is a "barbarian way" to make such a code? (later, I want to give a good GUI to my code, so probably I would have to use some sort of event management,...)

    If you recommend something more elegant, please give me some links where I can learn more.

    I started to read and learn to try to expand my little knowledge in LabView, but to me, it seems I can find examples really pro and documents (http://expressionflow.com/2007/10/01/labview-queued-state-machine-architecture/ , http://forums.ni.com/t5/LabVIEW/Community-Nugget-2009-03-13-An-Event-based-messageing-framework/m-p/... ) and really simple, but not in the "middle range". This forum and other sources of NEITHER are really good, but I want to swim in a huge "info-ocean", without guidance...

    I'm after course 1 Core and Core 2, do you know that some free educational material that is based on these? (to say something 'intermediary'...)

    Thank you very much!

    I would use queues instead of a FGV in this particular case.

    A driving force that would provide a signal saying that the data is ready, you can change your FGV readme...  And maybe have an array of clusters to hold values more waiting to be read, etc...  Things get complicated...

    A queue however will do nicely.  You may have an understanding of producer/consumer.  You will need to do maybe not this 3rd loop.  If install you a state machine, which has (among other States): wait for the data (that is where the queue is read), writing to a file, disk PID.

    Your state of inactivity would be the "waiting for data".

    The PID is dependent on the data?  Otherwise it must operate its own, and Yes, you may have a loop for it.  Should run at a different rate from the loop reading data, you may have a different queue or other means for transmitting data to this loop.

    Another tip would be to define the State of PID as the default state and check for new data at regular intervals, thus reducing to 2 loops (producer / consumer).  The new data would be shared on the wires using a shift register.

    There are many tricks.  However, I would not recommend using a basic FGV as your solution.  An Action Engine, would be okay if it includes a mechanism to flag what data has been read (ie index, etc) or once the data has been read, it is deleted from the AE. 

    There are many ways to implement a solution, you just have to pick the right one that will avoid loosing data.

  • How to stop the While loop in the Structure of the event with the same button?

    Hello

    I have a problem. I want to use a single control to activate an event in a structure of the event and the same control to end a while loop in this case.

    It is possible to use 2 controls to do this, but I need to be alone.

    Thank you

    You should NEVER place while loops inside the case of the event, and it is never necessary to do. Think about it: all you have to do is spin the code. You can easily use the outside while loop for everything. Simply place the code of the loop internal (without the inner loop) inside the case of delay and manipulate the time-out period between a pending finished and the infinite (-1), depending on the State of the Boolean value.

    A very simple example (LV 8.0)

  • Rate the triggered loop of the timed iterations of TTL

    Hi all

    I have a camera control VI that awaits the shutter of the camera TTL information and use it as a source of synchronization for a timed loop. In this timed loop, the camera is read and analyzed. Program should respond as soon as possible a new image and that's why I put the timed loop to "Throw missing items" so that it does not seek to catch up (events im trying to detect is quite rare and last several frames).

    The problem is this: when I put the camera for a certain numebr of frameworks (e.g. 10,000) sometimes due to discarded frames ever loop iteration number the last number of frame expected and do not remove (it remains to 9.998 for example). I noticed I can stop it by deselecting "maintain phase." However, it is clear to me what happens exactly with these settings in a situation of TTL triggered.

    It is true that the loop passes the new data directly but starts the next loop the correct number of iteration (+ 1)? Or something else happening?

    IM grateful for any help!

    Dear j.win,

    If you deselect the option 'Maintain the Original Phase', in fact you never will reject any iteration, whatever the value "Discard missed items." On the contrary, the loop will try to catch up the iterations of the end.

    Use of a source of external synchronization (for example your TTL) instead of a source of internal synchronization does not change. You can use the 'period' entrance (dt) of the loop timed to specify when the loop is supposed to go (the unit is the "ticks" in the case of an external synchronization source). A value of '1' means that test loop to iterate over all the graduations of external synchronization source. If for any reason any iteration lasts longer than that, you'll have an iteration "end". Also with a value of '1', it is not possible to change the "phase", then the parameter "Initial Phase to maintain" will be defined only weather or not ignore you the iteration. If 'Maintain initial Phase' is set to false, the loop will run immediately after an end iteration to run always, but a little of the latter. If the 'Maintain initial Phase' is true, the loop will run immediately after an iteraion end if the option 'remove point missed' is false otherwise the loop will jump the iteration.

    It's more clear now?

    Kind regards

  • How the entry changes with each iteration of the while loop

    Hello

    can anyone explain (clarify) to know how or what contribution will be fed like the d block of adaptive filtering for the first, second entry (n) and remaining iterations of the while loop as shown in the picture as an attachment...

    As I need to feed the e (n) out of the while loop as input d (n) to the Adaptive block for the first iteration for the next iteration of the previous output e (n) of the block Adaptive must be fed back as input (n) d and other x (n) of entry form the DAQmx.

    Thank you.

    You have a shift register on the edge of the loop, so for the first iteration, the input (n) d will get everything that feeds the shift register on the left of the outside. After that the adaptive filtering performed, e (n) is injected in the shift to the right, register to be read from the shift register on the left on the next iteration. And so on. This seems pretty much what you want.

    PatanGova wrote:

    As I need to feed the e (n) out of the while loop as input d (n) to the Adaptive block for the first iteration for the next iteration of the previous output e (n) of the block Adaptive must be fed back as input (n) d and other x (n) of entry form the DAQmx.

    If you need retain the value in calls, use a node that is initialized in the world of feedback to feed out of the while loop at the entrance.

Maybe you are looking for