Regular expression result into variable??

Im dealing with log files here...i use regular expression to detect the values...how can i save these values into variable, for example 25-07-2005 into "date"?
this is how my output statement look like
myOutput1.print(matcher1.group(1));
matcher1.group is the way i use to get the value using regular expression

thanx...actually i have already match it in groups and it works fine..the problem is im dealing with log files...what im trying to do is reformat back the log files collected...example.."8 Nov" change it to 8-11-2005
When i match it into the group its actually just finding the pattern, not saving it into variable..if its save in the variable would be easier..
how can i change "8 Nov" to 8-11-2005?? can anyone help me with a simple code???
thanks

Similar Messages

  • Empty variable/expression result. xpath variable/expression expression

    Hi,
    I am new to BPEL, I have created one Process and trying to Call Procedure with the help of Invoke Process Activity. Database Procedure having one input parameter and one output parameter. When i am trying to execute deployed webservice it gives me error like
    <Faulthttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>env:Server</faultcode>
    <faultstring>com.oracle.bpel.client.delivery.ReceiveTimeOutException: Waiting for response has timed out. The conversation id is 94218a8977e86d41:78a12598:12e474197b6:-7f6f. Please check the process instance for detail.</faultstring>
    </Fault>
    Server Trace for this: From Audit Instance
    receiveInput
    [2011/02/21 17:07:04] Received "inputVariable" call from partner "client"More...
    - <inputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    - <ns1:DBAdaptorParam2ProcessRequest xmlns:ns1="http://xmlns.oracle.com/DBAdaptorParam2">
    <ns1:input>wwww</ns1:input></ns1:DBAdaptorParam2ProcessRequest></part></inputVariable>
    Assign_in
    [2011/02/21 17:07:04] Updated variable "Invoke_DBService_DBAdaptor2_Service_InputVariable" More...
    - <Invoke_DBService_DBAdaptor2_Service_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/">
    <PARAM1>wwww</PARAM1></InputParameters></part>
    </Invoke_DBService_DBAdaptor2_Service_InputVariable>
    Invoke_DBService
    [2011/02/21 17:07:04] Invoked 2-way operation "DBAdaptor2_Service" on partner "DBAdaptor2_Service".less
    - <messages>
    - <Invoke_DBService_DBAdaptor2_Service_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/"><PARAM1>wwww</PARAM1>
    </InputParameters></part>
    </Invoke_DBService_DBAdaptor2_Service_InputVariable>
    - <Invoke_DBService_DBAdaptor2_Service_OutputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    - <db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/"><PARAM2>wwww Extra added</PARAM2></db:OutputParameters></part>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]</part>
    </Invoke_DBService_DBAdaptor2_Service_OutputVariable>
    </messages>
    Assign_out (faulted)
    [2011/02/21 17:07:04] Error in evaluate <from> expression at line "87". The result is empty for the XPath expression : "/ns2:OutputParameters/ns2:PARAM2".less
    oracle.xml.parser.v2.XMLElement@7cc53
    [2011/02/21 17:07:04] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
    - <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    - <part name="summary">
    <summary>
    empty variable/expression result.
    xpath variable/expression expression "/ns2:OutputParameters/ns2:PARAM2" is empty at line 87, when attempting reading/copying it.
    Please make sure the variable/expression result "/ns2:OutputParameters/ns2:PARAM2" is not empty.
    </summary></part></selectionFailure>
    I am not able to fix this issue please help me out.
    Thanks in Advance
    Thanks,Abhijit

    Hi,
    Thanks for reply.
    For the development guideline i had followed "http://www.erpschools.com/apps/oracle-applications/articles/Fusion-Middleware/SOA/BPEL/BPEL-Database-Adapter-Part-2/index.aspx" this document. Instead of using "select" query, here I am using database procedure to get output.
    For this I am giving input as "Abhijit" and database procedure "GETCONCATESTRING" is returning value as "Abhijit Extra added",
    but finally i am getting this error:
    Invoke_DBService
    [2011/02/22 12:55:08]
    Invoked 2-way operation "DBAdaptor2_Service" on partner "DBAdaptor2_Service".
    - <messages>
    - <Invoke_DBService_DBAdaptor2_Service_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/">
    <PARAM1> Abhijit </PARAM1> </InputParameters> </part> </Invoke_DBService_DBAdaptor2_Service_InputVariable>
    - <Invoke_DBService_DBAdaptor2_Service_OutputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    - <db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/ *GETCONCATESTRING* /">
    <PARAM2> Abhijit     Extra added </PARAM2></db:OutputParameters></part>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]</part>
    </Invoke_DBService_DBAdaptor2_Service_OutputVariable></messages>
    Please Guide me to use Receive Activity for output.
    Edited by: 815926 on Feb 21, 2011 11:41 PM
    Edited by: 815926 on Feb 21, 2011 11:42 PM

  • Regular Expressions and String variables

    Hi,
    I am attempting to implement a system for searching text files for regular expression matches (similar to something like TextPad, etc.).
    Looking at the regular expression API, it appears that you can only match using string variables. I just wanted to make sure this is true. Some of these files might be large and I feel uneasy about loading them into ginormous Strings. Is this the only way to do it? Can I make a String as big as I want?
    Thanks,
    -Mike

    Newlines are only a problem if you're reading the
    text line-by-line and applying the regexp to each
    line. It wouldn't catch expressions that span
    lines.
    @sabre150: your note re: CharSequence -- so what
    you're suggesting is to implement a CharSequence that
    wraps the file contents, and then use the regexps on
    the whole thing? I like the idea but it seems like
    it would only be easy to implement if the file uses a
    fixed-width character set. Or am I missing
    something...?You are correct for the most basic implementation. It is very easy to create a char sequence for fixed width character sets using RandomAccessFile. Once you go to character sets such as UTF-8 then more effort is required.
    While ever the regex is moving forward thought the CharSequence one char at a time there is no problem because one can wrap a Reader but once it backtracks then one needs random access and one will need to have a buffer. I have used a ring buffer for this which seems to work OK but of course this will not allow the regex to move to any point in the CharSequence.
    'uncle_alice' is the regex king round here so listen to him.
    :-( I should read further ahead next time!
    Message was edited by:
    sabre150
    Message was edited by:
    sabre150

  • Regular expression- insert into a string phrase "new" into correct position

    I have sample data in table T below, and i have sample output how i want the query to output over that data.
    with T as
    select 'CREATE OR REPLACE PACKAGE BODY "YYY"."PACKAGEONE" IS' s from dual union all
    select 'Create or REPLACE PACKAGE BODY "ZZZ"."PACKAGETWO" IS' s from dual
    select REGEXP_REPLACE(T.s, '^.PACKAGE BODY$','(\1)_new',1,1,'i') as s from T;
    Expected output:
    CREATE OR REPLACE PACKAGE BODY "YYY"."PACKAGEONE_new" IS
    Create OR REPLACE PACKAGE BODY "ZZZ"."PACKAGETWO_new" IS
    */All data has following pattern:
    CREATE OR REPLACE PACKAGE BODY "[owner]"."[name]" ISWhere [owner] can be any string. In sample data we have for example values XXX and YYY there.
    And [name] can be any string. In sample data we have for example values PACKAGEONE and PACKAGETWO there.
    Other parts of the string is fixed and stays as you see.
    As shown in expected output query should replace substring "[owner]"."[name]" to "[owner]"."[name]_new"
    How can i write such query?
    I think i somehow should in regular expression count the positions of double quotes to achieve the expected result, but i don't know how.

    Thx, but your solution doesn't work, it doesn't put phrase "new" into string. I use Oracle 10g.
    with T as
    select 'CREATE OR REPLACE PACKAGE BODY "YYY"."PACKAGEONE" IS...' s from dual union all
    select '...Create or REPLACE PACKAGE BODY "ZZZ"."PACKAGETWO" ..."a"."b" procedure a IS..' s from dual
    select
    RegExp_Replace(s,'(" IS$)','_new\1') as new
    from t;
    CREATE OR REPLACE PACKAGE BODY "YYY"."PACKAGEONE" IS...
    ...Create or REPLACE PACKAGE BODY "ZZZ"."PACKAGETWO" ..."a"."b" procedure a IS..
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • [Regular Expressions] Saving a variable number of matches

    I'm stuck with the following problem and I don't seem to be able to solve without lots of ifs and else's.
    I've got a program that you can pass patterns as parameters to. The program receives patterns as one single string.
    The string could look like this:
    a:i:foo r::bar t:ei:bark
    or like this:
    a:i:foo
    What I'm hinting at is that the string comprises of several parts of the same structure. Each structure can be matched and saved with:
    ([art]:[ei]{0,2}:.*)
    Now I want my regular expression able to match all the occurences without checking the string containing the pattern for something that could indicate the number of structures inside it. The following does not seem to work:
    ([art]:[ei]{0,2}:.*)+
    So now I'm looking for something that would match one or more occurence of the structure and save it for future use.
    I'd be really happy if someone could help me out here
    Last edited by n0stradamus (2012-05-03 20:27:02)

    Procyon wrote:
    --> echo "a:i:foo r::bar t:ei:bark" | sed 's/\([art]:[ei]\{0,2\}:[^ ]*\)/1/'
    1 r::bar t:ei:bark
    --> echo "a:i:foo r::bar t:ei:bark" | sed 's/\([art]:[ei]\{0,2\}:[^ ]*\)/1/g'
    1 1 1
    If [^ ]* is not usable (spaces are allowed arbitrarily), you need a non-greedy .* and non-consuming look-ahead of " [art]:"
    In python's re module, this is .*?(?=( [art]:|$))
    >>> import re
    >>> m=re.findall("([art]:[ei]{0,2}:.*?(?=( [art]:|$)))","a:i:foo r::bar t:ei:bark")
    >>> print(m)
    [('a:i:foo', ' r:'), ('r::bar', ' t:'), ('t:ei:bark', '')]
    Exactly what I was looking for! I didn't know that you could specify .* to stop at a certain sequence of characters.
    Could you please point me to some materials where I can read up on the topic?
    Back to the regex: It works finde in Python, but sadly that is not the language I'm using
    The program I need this for is written in C and until now the regex functions from glibc worked fine for me.
    Have I missed a function similar to re.findall in glibc?

  • Empty query result into variable? what's the result

    It's Null Value or What?
    i write a query like this.
    select name into variable from table where pk is null;
    /*this query return nothing*/
    /*Variable = Null or variable is empty ?*/

    Generally, the contents of the variable do not change if a SELECT..INTO.. returns no rows.
    It is safer to have your NO_DATA_FOUND exception handler set the variable to an appropriate value (eg null).

  • Parsing SOAP Results into Variables

    Can someone assist me in figuring out what way I need to go
    to parse SOAP results into an array?
    I have setup the <MX:WEBService> correctly, created my
    resultEvent(event) handler and faultEvenet(event) handler as
    needed. Below is the web service:
    <mx:WebService
    id="srvGetTagHistory" wsdl="{SOAP_URL}"
    result="CreateTagHistory(event)" fault="faultEvenet(event)"
    useProxy="false">
    <mx:operation name="GetTagHistory" resultFormat="e4x">
    <mx:request>
    <RSWID>{vRSWID}</RSWID>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    This works perfectly. I can return the results of the
    webservice to a text area control, and the complete SOAP results
    are displayed.
    My problem is I cannot and have not figured out how to make
    the SOAP results into some type of arraycollection for using in,
    lets say, a dataGrid.
    Here is an example of a SOAP result for the above webservice:
    <NS1:GetTagHistoryResponse
    xmlns:NS1="urn:myresaleworldserviceIntf-myresaleworldserver"
    xmlns:NS2="urn:myresaleworldserviceIntf" xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAP-ENC="
    http://schemas.xmlsoap.org/soap/encoding/">
    <NS2:return href="#1"/>
    <SOAP-ENC:Array id="1">
    <item href="#2"/>
    <item href="#9"/>
    <item href="#16"/>
    <item href="#25"/>
    <item href="#29"/>
    </SOAP-ENC:Array>
    <NS2:rswTagHistory id="2">
    <OrderDate>2005-12-08T11:15:24.857-05:00</OrderDate>
    <TagType>CB Tags</TagType>
    <NS2:ColorDetail href="#3"/>
    </NS2:rswTagHistory>
    <SOAP-ENC:Array id="3">
    <item href="#4"/>
    <item href="#5"/>
    <item href="#6"/>
    <item href="#7"/>
    <item href="#8"/>
    </SOAP-ENC:Array>
    <NS2:rswTagColorDetail id="4">
    <TagColor>Lavender</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="5">
    <TagColor>Light Blue</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="6">
    <TagColor>Green</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="7">
    <TagColor>Pink</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="8">
    <TagColor>Yellow</TagColor>
    <Total>1</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagHistory id="9">
    <OrderDate>2005-12-08T11:18:44.233-05:00</OrderDate>
    <TagType>CB Tags</TagType>
    <NS2:ColorDetail href="#10"/>
    </NS2:rswTagHistory>
    <SOAP-ENC:Array id="10">
    <item href="#11"/>
    <item href="#12"/>
    <item href="#13"/>
    <item href="#14"/>
    <item href="#15"/>
    </SOAP-ENC:Array>
    <NS2:rswTagColorDetail id="11">
    <TagColor>Lavender</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="12">
    <TagColor>Light Blue</TagColor>
    <Total>3</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="13">
    <TagColor>Green</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="14">
    <TagColor>Pink</TagColor>
    <Total>3</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="15">
    <TagColor>Yellow</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagHistory id="16">
    <OrderDate>2006-08-07T13:56:22.513-05:00</OrderDate>
    <TagType>CB Tags</TagType>
    <NS2:ColorDetail href="#17"/>
    </NS2:rswTagHistory>
    <SOAP-ENC:Array id="17">
    <item href="#18"/>
    <item href="#19"/>
    <item href="#20"/>
    <item href="#21"/>
    <item href="#22"/>
    <item href="#23"/>
    <item href="#24"/>
    </SOAP-ENC:Array>
    <NS2:rswTagColorDetail id="18">
    <TagColor>Lavender</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="19">
    <TagColor>Light Blue</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="20">
    <TagColor>Green</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="21">
    <TagColor>Orange</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="22">
    <TagColor>Pink</TagColor>
    <Total>1</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="23">
    <TagColor>Red</TagColor>
    <Total>2</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="24">
    <TagColor>Yellow</TagColor>
    <Total>1</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagHistory id="25">
    <OrderDate>2007-04-10T12:08:03.950-05:00</OrderDate>
    <TagType>CB Tags</TagType>
    <NS2:ColorDetail href="#26"/>
    </NS2:rswTagHistory>
    <SOAP-ENC:Array id="26">
    <item href="#27"/>
    <item href="#28"/>
    </SOAP-ENC:Array>
    <NS2:rswTagColorDetail id="27">
    <TagColor>Light Blue</TagColor>
    <Total>3</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagColorDetail id="28">
    <TagColor>Green</TagColor>
    <Total>1</Total>
    </NS2:rswTagColorDetail>
    <NS2:rswTagHistory id="29">
    <OrderDate>2007-12-19T12:52:30.883-05:00</OrderDate>
    <TagType>Thermal Tags</TagType>
    <NS2:ColorDetail href="#30"/>
    </NS2:rswTagHistory>
    <SOAP-ENC:Array id="30"/>
    </NS1:GetTagHistoryResponse>
    Any assistance to this issue would be greatly appreciated.

    If you have set resultFormat="e4x" than you can handle the
    result very easily.
    I guess you already find out that your result is in
    event.result.
    Your example is too hard to parse by human.
    You can read:
    http://livedocs.adobe.com/labs/flex3/html/help.html?content=13_Working_with_XML_01.html
    Especially: Traversing XML structures and Using XML
    namespaces
    I hope this will help

  • BPEL Process returns "empty variable/expression result."

    Hi,
    I have an Asynchronous BPEL Process which uses a DB Adapter (which in turn uses a custom SQL Procedure) to insert a value in to a table and return a sequence value generated in the procedure back to the BPEL Process. The process inserts the value in to the table but the sequence is not returned back and i get the below error,
    <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    <part name="summary">
    <summary>
    empty variable/expression result.
    xpath variable/expression expression "/ns2:OutputParameters/ns2:X_NO" is empty at line 94, when attempting reading/copying it.
    Please make sure the variable/expression result "/ns2:OutputParameters/ns2:X_NO" is not empty.
    </summary>
    </part>
    </selectionFailure>
    If i see the process flow the invoke activity shows the sequence value is returned from the procedure but when the invoke activity passes that value to the Assign activity its lost and the above error is displayed.
    The details i see in Invoke activity is below,
    <messages>
    <Invoke_1_DBProcWrite_InputVariable>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    <InputParameters
    xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/SUR_NEW_BPEL_PROC/">
    <P_NAME>Vivek</P_NAME>
    </InputParameters>
    </part>
    </Invoke_1_DBProcWrite_InputVariable>
    <Invoke_1_DBProcWrite_OutputVariable>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    <db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/SUR_NEW_BPEL_PROC/">
    <X_NO>9</X_NO>
    </db:OutputParameters>
    </part>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    name="response-headers">[]</part>
    </Invoke_1_DBProcWrite_OutputVariable>
    </messages>
    I use Jdeveloper version 10.1.3.3.0.4157. I did not recieve this error in Jdeveloper 10.1.3.1.
    Please let me know how to resolve this issue.
    Regards, Suresh

    I have exactly the same problem!!!! I would appreciate someone from Product or other to explain why I can see the incoming variable being created but when XPath expression is attempted to extract a value so I can do an assignment I get a "empty variable/expression result".
    Using JDEV10.1.3.3 and SOA 10.1.3.3 advanced install. My process is receiving a R12 Business Event listed here:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <WF_EVENT_T xmlns="http://xmlns.oracle.com/xdb/APPS/BES_EVENT/BES_EVENT">
    <PRIORITY xmlns="">50</PRIORITY>
    <SEND_DATE xmlns="">2008-04-30T13:40:33.000-05:00</SEND_DATE>
    <RECEIVE_DATE xmlns="">2008-04-30T13:40:40.000-05:00</RECEIVE_DATE>
    <CORRELATION_ID xmlns="" />
    - <PARAMETER_LIST xmlns="">
    - <PARAMETER_LIST_ITEM>
    <NAME>BO_ID</NAME>
    <VALUE>123456</VALUE>
    </PARAMETER_LIST_ITEM>
    - <PARAMETER_LIST_ITEM>
    <NAME>#CURRENT_PHASE</NAME>
    <VALUE>201</VALUE>
    </PARAMETER_LIST_ITEM>
    </PARAMETER_LIST>
    <EVENT_NAME xmlns="">oracle.apps.ar.hz.PersonBO.create</EVENT_NAME>
    <EVENT_KEY xmlns="">777666</EVENT_KEY>
    <EVENT_DATA xmlns="" />
    - <FROM_AGENT xmlns="">
    <NAME>WF_BPEL_QAGENT</NAME>
    <SYSTEM>VIS12.US.ORACLE.COM</SYSTEM>
    </FROM_AGENT>
    <TO_AGENT xmlns="" />
    <ERROR_SUBSCRIPTION xmlns="">TBo0FQQPy6ngQKjAuQAXWA==</ERROR_SUBSCRIPTION>
    <ERROR_MESSAGE xmlns="" />
    <ERROR_STACK xmlns="" />
    </WF_EVENT_T>

  • Error: empty variable/expression result

    Hi ,
    I am following the examples and initiating a bpel process(not the process given in the examples) through java. But when I execute the java code, I get the following error:
    com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.
    xmlsoap.org/ws/2003/03/business-process/}selectionFailure}
    messageType: {null}
    parts: {{summary=<summary>empty variable/expression result.
    xpath variable/expression expression "/client:helloProcessRequest/client:name" i
    s empty at line 30, when attempting reading/copying it.
    Please make sure the variable/expression result "/client:helloProcessRequest/cli
    ent:name" is not empty.
    </summary>}}
    com.oracle.bpel.client.delivery.ReceiveTimeOutException: Waiting for response has timed out. The conversation id is null. Please check the process instance for detail.
    I am sending the variable in the string with the following code:
    String xml = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><SOAP-ENV:Body><m:helloProcessRequest xmlns:m=\"http://xmlns.oracle.com/hello\"><m:name>revanth</m:name></m:helloProcessRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>";
    Locator locator = new Locator("default","bpel",props);
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to collaxa server
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload", xml );
    NormalizedMessage res = deliveryService.request("hello", "process", nm);
    Map payload = res.getPayload();
    Can anybody please tell me what is missing here?
    Appreciate your help.
    Thank you,
    Revanth

    Got it. Was sending the wrong string. Needed to send only the varaible and not the soap envelope. just for information, i had to send this string:
    String xml = "<m:helloProcessRequest xmlns:m=\"http://xmlns.oracle.com/hello\"><m:name>revanth</m:name></m:helloProcessRequest>";
    Sorry for any trouble.
    Rev

  • Variable/expression result error

    Hi,
    I am trying to run a BPEL process which reads data from an EDI file, transforms it and calls the Sales Order creation API. The process is giving the following error at runtime:
    <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>empty variable/expression result.
    xpath variable/expression expression "ora:processXSLT('EDI2Oracle.xsl',bpws:getVariableData('ReceiveEDI850XML_Dequeue_InputVariable','Transaction-850'))" is empty at line 69, when attempting reading/copying it.
    Please make sure the variable/expression result "ora:processXSLT('EDI2Oracle.xsl',bpws:getVariableData('ReceiveEDI850XML_Dequeue_InputVariable','Transaction-850'))" is not empty.
    </summary>
    </part></selectionFailure>
    Please can anyone help me resolve this issue. Also, does any one have a concise document on how to import an EDI and create 850 Purchase Order.
    Regards,
    Balu

    Hi,
    can you please provide some details of the ReceiveEDI850XML_Dequeue_InputVariable?
    What is the input before your transform?
    What value is in this Transaction-850 parameter and what is the namespace of the Input?
    Can you please check if the namespaces are set right?

  • Item Validation using Regular Expression

    Hi,
    I am trying to apply a Validation to a text field item, with the type as Regular Expression.
    The text input into the field should be in a HH:MM:SS format, ie 05:30:00 (for 5:30am).
    The text I am placing in the 'Validation Expression 2' box is:
    [0-2][0-9]\:[0-5][0-9]\:[0-5][0-9]
    This doesn't seem to work and I get an error message when I enter text in the correct format.
    I have even tried to use other comparisons, for example:
    or
    .{8}
    but these still give me an error message.
    Anyone have any ideas?

    Thanks for your help Flavio, the Regular Expression tool is really helpful.
    When I use this tool to compare strings with my regular expression, I get output = TRUE, which means I'm getting it right, but for some reason when I copy the same Regular Expression syntax into APEX, it doesn't work.
    I try to input correct strings into the field that is validated by the Reg Expr, but it still gives me an error.
    It seems to be something I am doing wrong within the application, but I can't figure out what I'm missing.
    I am creating an Item Level Validation with details:
    Type: Regular Expression
    Validation Expression 1: P23_BUS_DAY_COVERAGE_START
    Validation Expression 2: ^(([0-1][0-9])|(2[0-3])):[0-5][0-9]:[0-5][0-9]$
    Has anyone had similar problems using regualr expression validation in APEX?

  • OR ('|') in regular expressions (e.g. split a String into lines)

    Which match gets used when you use OR ('|') to specify multiple possible matches in a regex, and there are multiple matches among the supplied patterns? The first one (in the order written) which matches? Or the one which matches the most characters?
    To make this concrete, suppose that you want to split a String into lines, where the line delimiters are the same as the [line terminators used by Java regex|http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#lt] :
         A newline (line feed) character ('\n'),
         A carriage-return character followed immediately by a newline character ("\r\n"),
         A standalone carriage-return character ('\r'),
         A next-line character ('\u0085'),
         A line-separator character ('\u2028'), or
         A paragraph-separator character ('\u2029)
    This problem has [been considered before|http://forums.sun.com/thread.jspa?forumID=4&threadID=464846] .
    If we ignore the idiotic microsoft two char \r\n sequence, then no problem; the Java code would be:
    String[] lines = s.split("[\\n\\r\\u0085\\u2028\\u2029]");How do we add support for \r\n? If we try
    String[] lines = s.split("[\\n\\r\\u0085\\u2028\\u2029]|\\r\\n");which pattern of the compound (OR) regex gets used if both match? The
    [\\n\\r\\u0085\\u2028\\u2029]or the
    \\r\\n?
    For instance, if the above code is called when
    s = "a\r\nb";and if the first pattern
    [\\n\\r\\u0085\\u2028\\u2029]is used for the match when the \r is encountered, then the tokens will be
    "a", "", "b"
    because there is an empty String between the \r and following \n. On the other hand, if the rule is use the pattern which matches the most characters, then the
    \\r\\n
    pattern will match that entire \r\n and the tokens will be
    "a", "b"
    which is what you want.
    On my particular box, using jdk 1.6.0_17, if I run this code
    String s = "a\r\nb";
    String[] lines = s.split("[\\n\\r\\u0085\\u2028\\u2029]|\\r\\n");
    System.out.print(lines.length + " lines: ");
    for (String line : lines) System.out.print(" \"" + line + "\"");
    System.out.println();
    if (true) return;the answer that I get is
    3 lines:  "a" "" "b"So it seems like the first listed pattern is used, if it matches.
    Therefore, to get the desired behavior, it seems like I should use
    "\\r\\n|[\\n\\r\\u0085\\u2028\\u2029]"instead as the pattern, since that will ensure that the 2 char sequence is first tried for matches. Indeed, if change the above code to use this pattern, it generates the desired output
    2 lines:  "a" "b"But what has me worried is that I cannot find any documentation concerning this "first pattern of an OR" rule. This means that maybe the Java regex engine could change in the future, which is worrisome.
    The only bulletproof way that I know of to do line splitting is the complicated regex
    "(?:(?<=\\r)\\n)" + "|" + "(?:\\r(?!\\n))" + "|" + "(?:\\r\\n)" + "|" + "\\u0085" + "|" + "\\u2028" + "|" + "\\u2029"Here, I use negative lookbehind and lookahead in the first two patterns to guarantee that they never match on the end or start of a \r\n, but only on isolated \n and \r chars. Thus, no matter which order the patterns above are applied by the regex engine, it will work correctly. I also used non-capturing groups
    (?:X)
    to avoid memory wastage (since I am only interested in grouping, and not capturing).
    Is the above complicated regex the only reliable way to do line splitting?

    bbatman wrote:
    Which match gets used when you use OR ('|') to specify multiple possible matches in a regex, and there are multiple matches among the supplied patterns? The first one (in the order written) which matches? Or the one which matches the most characters?
    The longest match wins, normally. Except for alternation (or) as can be read from the innocent sentence
    The Pattern engine performs traditional NFA-based matching with ordered alternation as occurs in Perl 5.
    in the javadocs. More information can be found in Friedl's book, the relevant page of which google books shows at
    [http://books.google.de/books?id=GX3w_18-JegC&pg=PA175&lpg=PA175&dq=regular+expression+%22ordered+alternation%22&source=bl&ots=PHqgNmlnM-&sig=OcDjANZKl0VpJY0igVxkQ3LXplg&hl=de&ei=Dcg7S43NIcSi_AbX-83EDQ&sa=X&oi=book_result&ct=result&resnum=1&ved=0CA0Q6AEwAA#v=onepage&q=&f=false|http://books.google.de/books?id=GX3w_18-JegC&pg=PA175&lpg=PA175&dq=regular+expression+%22ordered+alternation%22&source=bl&ots=PHqgNmlnM-&sig=OcDjANZKl0VpJY0igVxkQ3LXplg&hl=de&ei=Dcg7S43NIcSi_AbX-83EDQ&sa=X&oi=book_result&ct=result&resnum=1&ved=0CA0Q6AEwAA#v=onepage&q=&f=false]
    If this link does not survive, search google for
    regular expression "ordered alternation"
    My first hit went right into Friedl's book.
    Harald.

  • Regular expression - variable

    I need to add a piece of code in each page in a directory with some info that is specific to that directory.  There are several hundred directories and about 10,000 pages.  My plan was to search and replace all files in each directory one at a time.  Then I remembered RegEx and thought there may be a better solution.
    The code I want to build off of looks like this:
    <?php
    setcookie("capital", "boston", time()+31536000, "/");
    ?>
    The only variable part is the the city name (i.e. boston could be denver, tampa, miami, etc.).  This bit of text will always be a word with only letters and no spaces.I'd like to search for this code, using regular expressions to capture the variable (i.e "boston"), then replace it with the exact same code, plus add another snippet using the stored variable.
    The end result should look like this:
    <?php
    setcookie("capital", "boston", time()+31536000, "/");
    $urlcookievariable = "boston";
    ?>
    My RegEx attempt looks like this:
    SEARCH:
    <?php
    setcookie("capital", "[^"]*", time()+31536000, "/");
    ?>
    REPLACE:
    <?php
    setcookie("capital", "[^"]*", time()+31536000, "/");
    $urlcookievariable = "$1";
    ?>
    However, it's not seeming to find the original line of code.  Since my search is working, my replace is obviously not working either.  However, with some testing on a more simple line of regex, that variable is not pasting as a variable.  It's just putting the literal symbol:  dollar sign and #1....$1, not "boston"
    thanks in advance for a point in the right direction

    The problem with your regex is that the original code includes metacharacters that have special meaning in a regular expression. Use this as the search value:
    (setcookie\("capital", ("[^"]+"), time\(\)\+31536000, "\/"\);)
    Use this as the Replace value:
    $1\n$urlcookievariable = $2;

  • Copy the result of Execute immediate result into a variable.

    Hi All,
    Is there any way to copy the result of execute immediate result into a variable.
    am doing following steps but am getting an error.
    varSQLstmt1:='select count(*) into'||vararch_ct||' from '||vararch_count;
    dbms_output.put_line(varSQLstmt1);
    execute immediate varSQLstmt1;
    But am getting sql statement as select count(*) into from SALES
    the variable(vararch_ct) is missing in select statement .
    please help me to solve this issue. Or is there any way to insert the count of records into any variable.
    Thanks
    Sree

    declare
    varSQLstmt1    varchar2(4000);
    v_count          number;
    begin
    varSQLstmt1:='select count(*) from '||vararch_count;
    dbms_output.put_line(varSQLstmt1);   
    execute immediate varSQLstmt1 into v_count;
    dbms_output.put_line('Coutn :: ' || v_count);
    end;

  • Mapping proc output to vars gets error extracting result into a variable of type (DBTYPE_UI2)

    Hi, we run std 2012.  I have a proc (sets nocount on) whose params r shown in the first block .   My execute ssis sql task mapping is shown in the block following that (same order as shown, the param sizes are all -1).  The variable
    characteristics and initial values are shown in the 3rd block.  The execute sql task command is
    exec usp_fileArrivalStatus ?,?,?,?,?,? output,? output,? output
    when I run the proc in ssms followed by a select on the output fields, I get stat 0, instance id -1 and file name empty string (aka tick tick aka '')
    The error is:
    [Execute SQL Task] Error: Executing the query "exec usp_fileArrivalStatus ?,?,?,?,?,? output,? ou..." failed with the following error:
    "An error occurred while extracting the result into a variable of type (DBTYPE_UI2)".
    Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Does anybody know what is wrong?
    CREATE PROCEDURE [dbo].[usp_fileArrivalStatus] @NewFilePattern varchar(500),
    @PkgName varchar (257),
    @appid int,
    @MsgHistCreateDate date,
    @messageFriendlyName varchar(500),
    @arrivalStatus int output,
    @instanceId bigint output,
    @fileName varchar(500) output
    VariableName Direction DataType ParamName
    User::TranFilePattern Input VARCHAR 0
    System::PackageName Input VARCHAR 1
    User::AppID Input SHORT 2
    User::todaysDate Input DATE 3
    User::TranFileArriveStatus OUTPUT SHORT 5
    User::TranFileInstanceId OUTPUT LARGE_INTEGER 6
    User::TranFileName OUTPUT VARCHAR 7
    User::TranFileFriendlyName Input VARCHAR 4
    User::TranFilePattern,string,tranfile05-Nov-2014
    User::fileDate,string,05-Nov-2014
    System::PackageName,
    User::AppID,int32,12
    User::todaysDate,DateTime, set by select getdate()
    User::TranFileArriveStatus,int32,0
    User::TranFileInstanceId,Int64,0
    User::TranFileName,string
    User::TranFileFriendlyName,string,Tran File

    I may have gotten past this.  The ui showed the first execution of that proc as the aborting component but when I looked at my error code (-1073548784), and component name in the
    message sent with notification email, I noticed the second component name.  It too executes that proc and still had ushort for appid in sql task mapping and long for instance id.  I changed these characteristics to match what I posted and got green
    on the seq container that runs both.
    I think I go thru this kind of adventure every time I try to map proc output to ssis vars.   

Maybe you are looking for