How to split a string variable in BPEL

Hello

I have a variable which I fetch it database with a delimiter. Need to separate this variable to obtain all the values in the BPEL.

For example, I get a column that contains data from a, b, c end,

I need all these values separately in the BPEL process as 'a' 'b' 'c' and 'end '.

In java, we can do this by using the below lines...
= String values "a, b, c, end;
String [] array array1 = values.split(",");

I don't find a split function in BPEL string functions. Could someone show some light on this please.

Kind regards
PS

No, there is not such a generation - in function for this. You could do:

-Create a Java class to do this. Wrap the Java class as a Web service, deploy it and call it from BPEL.
-Create a PL/SQL function to do this. Access the function from PL/SQL to the DB adapter.

Marc
http://orasoa.blogspot.com

Tags: Fusion Middleware

Similar Questions

  • How to split a string into several substrings parent using a delimiter

    Hello

    I am forced to split a string into several substrings parent using a delimiter.

    And insert these substrings in variuou of the columns of a table in a row.

    For example. The sting is: ABC * DEF * GHI * JKH *.

    where ' *' is the separator.

    Desired output:

    Col1 Col2 Col3 Col4 Col5

    -------     --------     --------     -------     ---------

    JKH GHI ABC DEF (null)

    Could you please guide me how can I achieve this.

    Thank you

    Bogoss

    Hello Salim,

    Leave the thread for reference... got this excerpt:

    with t as

    (

    Select "c: its: hgfd:1:23" Str

    )

    Select

    REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 1, null, 1) col1

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 2, null, 1) col2

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 3, null, 1) col3

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 4, null, 1) col4

    , REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 5, null, 1) col5

    t;

    This code snippet works well, but for the fixed columns. Here are 5 predefined columns.

    But I need to have a logic that I can browse the string any No.. sometimes.

    For example. If I get 3 secondary channels of the parent chain... I need to insert into 3 columns.

    And if I get 6 strings under... I need to insert into 6 columns.

    Could you please help me develop a logic like that.

    I use Oracle database 10g.

    And the data are currently being collected on external table... but I can store in a variable or a column of a database table.

    Thank you

    Bogoss

  • How to split a string into columns

    Hi all

    Have a strings like this, where the delimiter is
    10:00 | x1 | 2 | RO | P | Con ausilio  | y1
    10:10 | x2 | 1 | RO |  |  | y2
    10:20 |x3 | 3 |  |  |  | y3
    10:30 |x4 | 3 | RO | N | Con aiuto  | y4
    10:40 |x5 | 1 | RO |  |  | y5
     
    how can I break it up into columns, for example, the first char(before first pipe) insert in first variable, 
    then, after first pipe,  second characters in a other column ans so on
     
    col1 := '10:00';
     
    col2 := 'x1';
    col3 := '2';
    col4:= 'RO';
    col5 := 'P';
    col6 := ' Con ausilio ';
    col7 := 'y1';
     
     
    col1 := '10:10';
    col2 := 'x2';
    .. and so on
     
    Thanks in advance

    Hello

    If you want to split the string str into 7 columns :

    SELECT  TRIM (BOTH FROM REGEXP_SUBSTR (str, '[^|]+', 1, 1))     AS col1
    ,     TRIM (BOTH FROM REGEXP_SUBSTR (str, '[^|]+', 1, 2))     AS col2
    ,     TRIM (BOTH FROM REGEXP_SUBSTR (str, '[^|]+', 1, 3))     AS col3
    ...
    ,     TRIM (BOTH FROM REGEXP_SUBSTR (str, '[^|]+', 1, 7))     AS col7
    FROM     table_x
    ;
    

    If you want to split it inot 7 variables :

    col1 := TRIM (BOTH FROM REGEXP_SUBSTR (str, '[^|]+', 1, 1));
    col2 := TRIM (BOTH FROM REGEXP_SUBSTR (str, '[^|]+', 1, 2));
    col3 := TRIM (BOTH FROM REGEXP_SUBSTR (str, '[^|]+', 1, 3));
    ...
    col7 := TRIM (BOTH FROM REGEXP_SUBSTR (str, '[^|]+', 1, 7));
    
  • [JS] [ID4] How to parse a string variable

    I know it's the sort of thing that any competent writer should already know, but then again, I never claimed to be competent.

    I have a script that helps in indexing, and I want to add a feature. In some cases, InDesign sorts alphabetically differently that I would. For example, "applesauce cake' come before"Apple stuffing." (Can tell you I do cookbooks?) I think that the space must classify alphabetically before any letter, while InDesign treats space as if he were not there.

    So my script involves a generate a dialogue in which I can change the "sort by:' attribute of the entries." I try to catch each of these challenges alphabetiziation and replace the space with the number '1' so it will sort my way.

    The text box "sort by" in my dialog box is populated with the contents of the selection, I do before running the script. I want to do is to have the script change all spaces in 1 itself, and then present the results in the text box. I don't know how to change a variable of string in this way.

    Who wants to help the incompetent?

    There are several functions for string manipulation. Look in any JavaScript book for more details. For example, to replace all spaces in a string by 1s, follow these steps:

    myString = myString.replace (' ', '1')

    Other useful string functions are () .slice,. search() and. indexOf(). And as Michael mentioned, some simple rational expressions of learning is well worth the effort.

    Peter

  • How to split the string?

    Hello

    I get data like ~^1820|-93.13|+4.57|-3.20 | 183,62'

    any value assigned something like height, angle, etc...

    I want to divide this string could someone please help me how to do this.

    I would like in a similar.  1820

    a = 93.13

    b = + 4.57

    c =-3.20

    d = 183.62

    Thank you much in advance.

    With the best wishes,

    Ankit.

    Hi Pierre,.

    use SpreadsheetStringToArray:

  • How to split a string

    I have a string that is I get when running. its length is variable. Suppose that its "NUMBER = ABC1004457844 | "It's the number you wanted." I want to get the string between '=' and ' | '. It can be variable, as I get it when the server running. This trend is the same in each response from the server.

    Please help someone. Its urgency.

    Hi you can use the indexof and substring in this case methods indexof method takes on the character and returns the index of the provided character, now give your characters required to indexof() alternately and get these indexes, now use the substring (startingIndex, endingIndex) for your required string.

  • How to divide the string in bb-cascades

    1. I have a table of data as json

      {"RegistrationResult":"Registered Success:Empid:157:TableName:COMPANY156"}
      
    2. Now, how I want to split the show list view in qml and string as the follwing

      Success stories

      EmpID = 157

      TableName = COMPANY156

    3. Please tell the concept of cutting a string and show the result in qml

    I can get the result of the follwing method:

    {"RegistrationResult":["Registered Success","Empid":"157","TableName":"COMPANY156"]}
     
    

    But I do not know how to split the string for a first... Help, please...

    svmrajesh wrote:

    1. ,......"Registered Success:Empid:157:TableName:COMPANY156"}

    Take a look at QString docu

    Just do something like

    myString.split(':')

    and you get a QStringList and this QStringList is directly mapped to a table in QML JavaScript

  • Split a string into lines {< string1 >} | {< string2 >}

    I implemented the Oracle text search in my database. Now I have this query

    Select ctx_thes.syn ('RED', 'MY_THESAURUS') of double;

    the output is displayed as

    {RED} | {MIXTURE OF RED} | {TABLE RED} | {RED}

    and I want to get the words in separate lines, i.e.

    Red

    Mixture of Red

    Red table

    Red wine

    How to split the string into lines?

    SELECT *
      FROM (    SELECT DISTINCT
                       REGEXP_SUBSTR ('{RED}|{RED BLEND}|{RED TABLE}|{RED WINE}',
                                      '({)([A-Z]+ *[A-Z]*)(})',
                                      1,
                                      LEVEL,
                                      'i',
                                      2)
                          val
                  FROM DUAL
            CONNECT BY LEVEL <=
                            REGEXP_COUNT (
                               '{RED}|{RED BLEND}|{RED TABLE}|{RED WINE}',
                               '|')
                          + 1)
     WHERE val IS NOT NULL;
    
  • split a string into pl/sql

    Hello

    How to split a string and store in an associative array in pl/sql.function

    My string like this

    '1102,1101,1012,1011,1010,1009,1008,1007,1006,10005,1004,1003,1002,1001'
    and assign it to the array list. According to
    can someone please help

    concerning
    r

    You can try the following. Although I recommend, it would be better to write the function code php as a java stored procedure parser and use the result. We have a class defined in Java String Tokenizer.

    -- Define function to split string into tokens
    FUNCTION get_token(
        p_input_string IN VARCHAR2,            -- input string
        p_token_number IN PLS_INTEGER,         -- token number
        p_delimiter    IN VARCHAR2 DEFAULT ',' -- separator character
      )
      RETURN VARCHAR2
    IS
      v_temp_string VARCHAR2(32767) := p_delimiter || p_input_string ;
      v_pos1 PLS_INTEGER ;
      v_pos2 PLS_INTEGER ;
    BEGIN
      v_pos1     := INSTR( v_temp_string, p_delimiter, 1, p_token_number ) ;
      IF v_pos1   > 0 THEN
        v_pos2   := INSTR( v_temp_string, p_delimiter, 1, p_token_number + 1) ;
        IF v_pos2 = 0 THEN
          v_pos2 := LENGTH( v_temp_string ) + 1 ;
        END IF ;
        RETURN( SUBSTR( v_temp_string, v_pos1+1, v_pos2 - v_pos1-1 ) ) ;
      ELSE
        RETURN NULL ;
      END IF ;
    EXCEPTION
      WHEN OTHERS THEN
        RAISE;
    END get_token;
    
    -- Call the above function in loop for a string with N tokens
    DECLARE
          TYPE assoc_arr_str_typ IS TABLE OF VARCHAR2(100) INDEX BY PLS_INTEGER;
          str_arr assoc_arr_str_typ;
    
          v_str VARCHAR2(200) := '1102,1101,1012,1011,1010,1009,1008,1007,1006,10005,1004,1003,1002,1001' ;
          v_token   VARCHAR2(4) ;
          i          PLS_INTEGER := 1 ;
        BEGIN
          LOOP
            v_token := get_token( v_str, i , ',') ;
            EXIT WHEN v_token IS NULL ;
            dbms_output.put_line( v_token ) ;
            str_arr(i) := v_token;
            i := i + 1 ;
         END LOOP ;
      END ;
     /
    

    Published by: GG 24 March 2011 09:51

  • Simple question: how to divide the string into multiple lines concatenated?

    Hi people,

    Maybe it's an easy question.

    How to split a string that is concatenated into multiple lines by using the SQL query?

    ENTRY:
    select 'AAA,BBB,CC,DDDD' as data from dual
    Delimiter = ', '.

    Expected results:
    data
    ------------
    AAA
    BBB
    CCC
    DDDD
    I'm looking for something nice to feature "an opposite to «sys_connect_by_path»»

    Thank you
    Tomas
    with t as (select 'aaaa,,bbbb,cccc,dddd,eeee,ffff' as txt from dual)
    -- end of sample data
    select REGEXP_SUBSTR (txt, '[^,]+', 1, level)
    from t
    connect by level <= length(regexp_replace(txt,'[^,]*'))+1
    
    REGEXP_SUBSTR(TXT,'[^,]+',1,LE
    ------------------------------
    aaaa
    bbbb
    cccc
    dddd
    eeee
    ffff
    
  • How to split strings?

    Hello

    I'm using action made by Christophe (http://www.vcoteam.info/learn-vco/code-snippets-cancel-one-of-your-running-workflows.html) in order to cancel some workflows.

    Since the selection for tokens window does not display the parameters of the token, I created another entry for my workflow that is supposed to contain the name of the virtual machine, only for infomational purposes.

    I created an action to do this. When I use just "return myWorkflowToken.getInputParameters ();" then all settings are written to the input box.

    In my case, it looks like this:

    {ram = 3000.0, date = Mon Jan 24 16:25:16 THIS 2011, vm = < @id = FinderResult' VC:VirtualMachine/si0vm271/vm - 852' @name = "si0vm562" >, UC = 3.0}

    Since I need only the name of the virtual machine, in this case the part after @name (si0vm562), I need to retrieve it somehow off the chain.

    In the Orchestrator API, I found the String class with the method 'split '.

    At first, I tried to split the string into two parts using this code:

    var params_s = myWorkflowToken.getInputParameters ();
    var params_a_s = params_s.split ("name");
    return params_a_s [1];

    But when I run the workflow, the input dialogue tells me that the "split" function cannot be found.

    How can I retrieve the VM name on the report of a running workflow?

    Thank you

    Concerning

    Andreas

    Hi Andreas,

    I don't think that splitting strings works for your case.

    In fact workflowToken.getInputParameters () does not return a string. It is ch.dunes.scripting.jsmodel.JSProperties instead (you can check this of the Orchestrator client tools-> API Explorer). The split function is not found on the params_s variable.

    In order to achieve your goal, you can try the following:

    get the vm parameter

    Use the parameter name. This is the vm used according to the result of your message

    VM var = workflowToken.getInputParameters () .get ("vm");

    You can check for safety if the virtual machine is defined, except that the virtual machine is the required parameter

    If (vm! = null) {}

    return vm.name

    }

    The code snippet above you should return the value set for the parameter of the virtual machine.

    Hope this helps,

    Martin Marinov

  • split a string into separate variables

    Suppose I have a procedure that returns the following for the parameter,

    V_STR: = ' 10077500733 | 10077500733 | 14/04/2015 | Τ | AJ240557 | 2012 | GREECE | GR | MAN | 00108337640 | CLARKSON | DAVID"

    How to cut this string into separate variables?

    for example v1 = 10077500733

    v3 = 14/04/2015

    v4 = null;

    Thank you

    with qry (STR) as)

    Select ' 10077500733 | 10077500733 | 14/04/2015 | T | AJ240557 | 2012 | GREECE | GR | MAN | 00108337640 | CLARKSON | DAVID' the double

    )

    Select the level,

    RTrim (regexp_substr (str, ' [^ |] *(.| $) ', 1, level), ' |') ASPLIT

    of qry

    connect by level<= length="" (regexp_replace="" (str,="" '[^|]+'))="" +="">

    LEVEL ASPLIT
    1 '10077500733'
    2 '10077500733'
    3 April 14, 2015"
    4
    5 ' T '
    6 'AJ240557 '.
    7 '2012 '.
    8 "GREECE".
    9 "GR".
    10 "THE MAN".
    11 '00108337640'
    12 "CLARKSON."
    13 "DAVID."
  • How to read a string of file &amp; assign val to a variable in the batch file

    Hello

    How to read a string from a file and assign the value to a variable, then return the value on the screen in the windows batch file?

    Any suggestions?

    Thank you.

    Try again with

    off @echo
    for /F "delims =" % in ('findstr /i OPEN status.log") set var = %% a
    % Var Echo%

  • How can I get the contents of an object of Document (XMLDOM) in a string variable?

    Hello

    I created an XML document by using the Document and XMLElement classes and now I need to get the XML object and a string variable, so I can send by e-mail.

    I'm on 4.5 JDE

    Help!

    Hello

    Unlike some other posts, there is a solution.

    Document myDocument = pdocXMLDocument;  / * This is the document that you created that you want to convert to a string

    ByteArrayOutputStream OS = new ByteArrayOutputStream(); / * where you want the XML to go * /;
    XMLWriter writer = new XMLWriter (os);

    configure as you want using one or more of:
    writer.setPrettyPrint (); or setPrintCompressedOutput();
    writer.setPrintCompressedOutput ();
    writer.setPreserveSpacing ();
    writer.setExpandingEntities (boolean);
    writer.setEntityResolver (EntityResolver);
    try {}
    DOMInternalRepresentation.parse (pdocXMLDocument, writer);
    String myXML = os.toString ();        THIS IS THE STRING
    }
    catch (Exception ex) {}
    }

  • How to place a string in a movieclip timeline variable to a url within a class request?

    Hello

    I coded a class of audio player, I want to be able to reuse throughout my project to a different sound to each movieclip. The audio player works great and loads of sounds when I request the url from the class, but I can't ask the url encoded on the chronology of the parent movieclip.

    I have an instance of movieclip named musicPlayer in 4 different parent movieclips that is bound to a named MusicPlayer class that contains the code of my audio player.

    To test, in one of the parent movieclips, I placed the following code to set the path of the url to a string variable:

    var mp3url = "tuba.mp3";
    

    Then, in my class, I said the same variable as a string:

    public var mp3url:String;

    and I tried passing to my application url:

    mp3File.load (new URLRequest (mp3url));

    Then I get an error: "1151: there is a conflict with the mp3url definition in the internal namespace."

    As mentioned above, the sound is loaded perfectly when I set the url path to a string in my class variable as follows:

    public var mp3url:String = "tuba.mp3";

    Thank you in advance!

    use a function to pass this variable or you'll have a timing problem:

    in your class:

    private void urlF(urlS:String):void {}

    declare mp3url in your class

    mp3url = URL;

    You can now use mp3url

    }

    on your timeline:

    varF ("tuba.mp3");

Maybe you are looking for