Bpel variable

HI,
I am trying to create a variable in the bpel and the variable is of type 'Element'.Imported the schema file from MDS.when i am trying to compile,it is showing error as *Error(40): XML element "{http://oracle.com/service/B2BHeader}B2BHeader" of variable "Variable2" is not defined*.
So,any suggestions would be great.
Regards,
Praveen

Hi Praveen,
Is the xsd you tried to use valid? Can you check by creating a dummy SOA composite in where a BPEL component is using a WSDL based on the xsd schema you try to use? Tried to deploy and see if this works. Of course in the BPEL component make sure you assign input to output to make it compile.
Is your MDS correctly configured in adf-config.xml file? If your local MDS is point to the database make sure the schema is deployed to MDS. In case of file based make sure the xsd is stored in the correct MDS file directory.
Thanks
Sander

Similar Messages

  • How to display a BPEL variable using Java Embedding

    Hi, hope someone can help, I'm sure this is something very simple but for the life of me can't seem to find it through the tutorials including the Dev guide.
    Question
    =======
    How can I display user defined and BPEL variables in the process activity "Java Embedding" ?
    ex: System.out.println(bpws:getVariableData("myDatabaseParameterVariable")
    This example doesn't work but this is basically what I am trying to achieve.
    I would appreciate any help with this.
    Rookie

    Actually that's all the code I have.... System.out.println(myDatabaseArg);
    myDatabaseArg is a simple parameter defined in the database adapter configuration wizard which is used as a criteria to retrieve data.
    Just before I invoke the Read I use the Java Embedding to display the content of the parameter.

  • BPEL Variables in to Transform activity (XSL)

    Hi,
    I need to access a BPEL variable from within a Transform activity (XSL).
    I need an output like this:
    <XML>
    <val1>1</val1>
    <val2>2</val2>
    <val3>3</val3>
    <val4>4</val4>
    </XML>
    Val1 and val2 is reachable from the xsd in the Transform activity (source variable). A DB-adapter is used to provide these data.
    Val3 and val4 is present in the BPEL, within BPEL variables.
    I have created a Transform activity with source = result of DP-adapter (val1 + val2), but will then need to get val3 + val4 (BPEL vars) from inside the Transform activity as well.
    How can I do this ?
    I have tried passing the variables in as parameters, but can't get this to work. I either only get the parameters, or only get the values from the DB-adapter, as it seems I only can have 1 source.
    Similar thread, but with no answer:
    Global Variables in to XSL

    Thank you for answering.
    The link you're referring to is the thing that I mentioned that I couldn't get to work.
    Works fine when just passing parameters, but when I already have a source (like my DB-adapter output), and want the parameters as well, it's getting tricky. Seems there can only be 1 source: Parameters or DB-adapter output.
    What I need is values from a source (DB-adapter output) + be able to send BPEL variables to the same Transform activity (XSL).
    Have you tried this ? Is it at all possible ?

  • How to set values to bpel variables from Java

    I have a java class to create files and populate some contents into it. On success it returnes "File Created"
    I used the following code to achieve it :-
    WriteFiles objWriteFiles=new WriteFiles();
    String para=((oracle.xml.parser.v2.XMLElement)getVariableData("inputVariable","payload","/client:FileTestProcessRequest/client:HO_ORG_ID")).getFirstChild().getNodeValue();
    String result=objWriteFiles.writeHeaderInfo(para);
    (writeHeaderInfo is a method in my java class)
    addAuditTrailEntry(result);
    I works fine..Now I want to assign this reult value to a bpel variable .. I tried doin it like below:-
    setVariableData("outputVariable","payload","/client:FileTestProcessResponse/client:result" , result)
    but its not working...I get a fault ...
    Can anyone help me out...
    Thanks,
    Githa.R.S

    In this example :
       <!-- Invoke the EmployeeStatus Java class instead of web service -->
       <bpelx:exec name="invokeJavaExec" language="java" version="1.4">
          <![CDATA[
             EmployeeStatus e = new EmployeeStatus();
                String firstName = ((Element)getVariableData(
                                 "EmployeeTravelStatusRequest", "employee",
                                 "/employee/FirstName")).getNodeValue();
                String lastName = ((Element)getVariableData(
                                   "EmployeeTravelStatusRequest", "employee",
                                   "/employee/LastName")).getNodeValue();
                String empStatus = e.getTravelStatus(firstName, lastName);
                addAuditTrailEntry("Employee status is: " + empStatus);
                setVariableData("EmployeeTravelStatusResponse", "travelClass",
                             "/travelClass", empStatus);
          ]]>
       </bpelx:exec>they dont use namespaces in the xpath-expression, can you try that ?

  • Accessing BPEL Variables in XSLT

    Hi All,
    In a BPEL PM process I need to be able to access a global BPEL process variable in the XSL transformation. When I use any functions in the "Transform" activity I do not see the BPEL variables in scope. Any idea on how can this can be done ?
    Regards,
    Venkatesh.

    This causes a problem with the XSL Mapper. If I try to add an XPath-expression component to use this function I get the Warning message :-
    "Function of name "bpws:getVariableData" not found."
    If I continue, the following XSL segment is generated :-
    <tns:comment>
    <xsl:value-of select="bpws:getVariableData(?,?,?)"/>
    </tns:comment>
    This compiles ok, but when I run the business process, I get the following error from the transformation component :-
    XPath expression failed to execute. Error while processing xpath expression, the expression is "ora:processXSLT("transformDimToRAN.xsl", bpws:getVariableData("invokeDimensionGateway_getFutOptTradesSelect_lastProcessedTradeRef_OutputVariable", "FutOptTradesCollection"))", the reason is Extension function http://schemas.xmlsoap.org/ws/2003/03/business-process/ : getVariableData is unknown. Please verify the xpath query.

  • Accessing BPEL variables in XSL

    Hi,
    Did anyone have success accessing BPEL variables in XSL? If so can
    you please let me know how you did it? I tried bpws:getVariableData
    without much luck.
    Any information will be of great help.
    Thanks
    Raj

    I don't think that's really what XSL is for. It's really about taking a single XML document, and generating another XML document, based on the first.
    If you want to pass in variables from BPEL, then write a complex type that contains the main XML document you need, plus all the other inputs you need.
    As an example, I was doing some XSL work and needed to also supply it with a default date to set when nothing else was present.
    My complex type would have been something like:
    <complexType name="ProcessDataInputType">
    <sequence>
    <element name="defaultDate" type="date"/>
    <element name="data" type="tns:MyDataType"/>
    </sequence>
    </complexType>

  • Couldnot initialize bpel variable.

    Hi,
    I have created a bpel based on a wsdl that is in MDS. The wsdl has call back interface also. I have some other services running fine based on the same wsdl.
    But I am getting 'Could not initialize bpel variable : inputVariable' when i compile my project. Kindly help me in this.
    Thanks,
    Sri

    Try the suggestions mentioned in the thread:
    Could not initialize variable. An error occurs while initializing BPEL .
    Thans,
    Navaneeth

  • How to put SOAP body in BPEL variable

    Hi everybody,
    I have a BPEL process which needs to pick up a SOAP-message from a queue, transform the body and send the result to a webservice.
    The process is running deployed and picks up the soap message. In the receive action I see the SOAP message - envolope, header and body - as expected (shown below).
    - <businessEventBody>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="body">
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    - <SOAP-ENV:Header>
    <wsa:To>
    http://testhost/CCS/Service_Endpoint
    </wsa:To>
    - <wsa:From>
    <wsa:Address>
    http://localhost/CCS/Service_Endpoint
    </wsa:Address>
    - <wsa:Metadata>
    - <device xmlns:hl7="urn:hl7-org:v3" xmlns="urn:hl7-org:v3">
    <id root="1.3.6.1.4.1.25208.20.100.50" extension="CCSMESSAGING"/>
    </device>
    </wsa:Metadata>
    </wsa:From>
    <wsa:Action>
    urn:hl7-org:v3:CCS_POCD_IN009010CS14
    </wsa:Action>
    <wsa:MessageID>
    MSG_ID1208340800216
    </wsa:MessageID>
    </wsse:Security>
    </SOAP-ENV:Header>
    - <SOAP-ENV:Body>
    - <CCS_POCD_IN009010CS14 xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <id xsi:type="II" root="1.3.6.1.4.1.25208.20.100.30" extension="com.scandihealth.ccs.NoteInformerCS14com.csc.hat.collaboration.Collaboration@127.0.0.1:1208340800190:0.9747211212965656"/>
    <employerCCS_IdentifiedOrganization classCode="ORG" determinerCode="INSTANCE">
    <id xsi:type="II" root="1.2.2.1" extension="18573" displayable="false"/>
    <id xsi:type="II" root="1.3.6.1.4.1.25208.20.20" extension="5234102" displayable="false"/>
    <code xsi:type="CE" code="ENTERPRISE" codeSystem="1.3.6.1.4.1.25208.20.10.20" codeSystemName="CcsOrgUnitType" displayName="Enterprise"/>
    - <name xsi:type="EN" use="L">
    <given>88</given></name>
    - <name xsi:type="EN" use="AL">
    <given>mnemo-88</given>
    </name>
    - <name xsi:type="EN" use="C">
    <given>Enterprise 88</given>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    </part>
    </businessEventBody>
    Now what I want to do is simply assign the body to a variable as a string (using a copy operation), however all I get is a few scattered excerpts from the body of the message (as shown here).
    <javaInput>
    http://testhost/CCS/Service_Endpoint
    http://localhost/CCS/Service_Endpoint
    urn:hl7-org:v3:CCS_POCD_IN009010CS14
    MSG_ID1208340800216
    88
    mnemo-88
    Enterprise 88
    81.1
    mnemo-81.1
    Unit 81.1
    88
    mnemo-88
    Enterprise 88
    </javaInput>
    My FormatMessageToGS.bpel file is as shown here:
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <process name="FormatMessageToGS"
    targetNamespace="http://xmlns.ccs.scandihealth.com/FormatMessageToGS"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:ns4="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:ns7="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:bees="http://xmlns.oracle.com/pcbpel/adapter/jms/BusinessEventErrorService/"
    xmlns:ns5="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:ns6="http://com.scandihealth.ccs.webservices.messaging.common/CCSMessageServiceRemote.wsdl"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:ns1="http://com.scandihealth.ccs.webservices.task.common/CCSBPELTaskServiceRemote.wsdl"
    xmlns:ccstypes="http://ccs.scandihealth.com/workflow/types/"
    xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
    xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:ns2="http://com.scandihealth.ccs.webservices.security.common/CCSSecurityServiceRemote.wsdl"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:jms="http://xmlns.oracle.com/pcbpel/adapter/jms/"
    xmlns:bes="http://xmlns.oracle.com/pcbpel/adapter/jms/BusinessEventService/">
    <bpelx:exec import="javax.xml.transform.*"/>
    <bpelx:exec import="javax.xml.transform.stream.*"/>
    <bpelx:exec import="java.io.*"/>
    <bpelx:exec import="java.util.*"/>
    <!--
    PARTNERLINKS
    List of services participating in this BPEL process
    -->
    <partnerLinks>
    <partnerLink name="BusinessEventService"
    partnerLinkType="bes:Consume_Message_plt"
    myRole="Consume_Message_role"/>
    </partnerLinks>
    <!--
    VARIABLES
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <variable name="businessEventBody" messageType="ccstypes:body_msg"/>
    <variable name="businessEventInboundHeader"
    messageType="jms:InboundHeader_msg"/>
    <variable name="javaInput" type="xsd:string"/>
    <variable name="javaOutput" type="xsd:string"/>
    <variable name="FirstXSL" type="xsd:string"/>
    <variable name="SecondXSL" type="xsd:string"/>
    <variable name="SimplerXML" type="xsd:string"/>
    <variable name="OutputToGS" type="xsd:string"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC
    Set of activities coordinating the flow of messages across the
    services integrated within this business process
    -->
    <sequence name="main">
    <receive name="ReceiveBusinessEvent" partnerLink="BusinessEventService"
    portType="bes:Consume_Message_ptt" operation="Consume_Message"
    variable="businessEventBody" createInstance="yes"
    bpelx:headerVariable="businessEventInboundHeader"/>
    <!-- <throw faultName="deliberateFault" /> -->
    <scope name="XSLT">
    <sequence name="Sequence_1">
    </scope>
    </sequence>
    </process>
    And my types.wsdl is like this:
    <definitions targetNamespace="http://ccs.scandihealth.com/workflow/types/"
    xmlns:tns="http://ccs.scandihealth.com/workflow/types/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <types>
    <schema targetNamespace="http://ccs.scandihealth.com/workflow/types/"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="stringElement" type="string"/>
    <complexType name="ccsExceptionType">
    <sequence>
    <element name="faultString" type="string"/>
    <element name="detail" type="string"/>
              </sequence>
    </complexType>
    </schema>
    </types>
    <message name="body_msg">
    <part name="body" element="tns:stringElement"/>
    </message>
    <message name="createTaskResponseMessage"/>
    <message name="ccsExceptionMessage">
    <part name="ccsException" type="tns:ccsExceptionType"/>
    </message>
    </definitions>
    Does anybody have any idea as to what I am doing wrong, and more interesting how I can make it right?
    Any help is truly appreciated.
    Kind regards
    Aagaard

    How did you define headerID?
    You can also see an example here:
    http://java.net/projects/oraclesoasuite11g/pages/BPEL
    Arik

  • Error in Passing BPEL variable Contents to BPEL Transform (XSLT)

    Hi,
    Problem Statement:
    ·     I want to Transform data, from schema1 to schema2.
    ·     Schema1 is basically a collection lets say collection of A. in XML terms, it has multiple same type of child elements under the root element.
    ·     Schema2 associated with each child element of Schema1.
    ·     In the Loop, I want to iterate through the schema1 data and iteration count would be as much as number of child elements in it.
    ·     Pick one child element (using index in XPATH) and use it to associate with Schema2 elements.
    ·     In this process I wanted to pass 2 parameters to BPEL Transform activity using properties datatype. (ref: http://blogs.oracle.com/rammenon/2007/05/07)
    ·     However it is not realizing the parameters passed to it.
    Please also suggest me a location to upload the related code for any verification.
    Please suggest the flaw in this and suggestions to rectify.
    Thanks
    Regards
    Joy

    Example counting nodes.
    ora:countNodes('Invoke_FileSyncRead_SynchronousRead_OutputVariable','Root-Element','/ns1:Root-Element/ns1:SiteInfo')
    Set that to Integer variable $count.
    Then set new variable type integer $interator = 1.
    That will give you a proper loop counter for your payload.
    AS far as mapping only certain elements, I would just transform 1st, then pick out what you need with an explicit assign activity to whatever you want to pass that to.
    Hope that helps.

  • Aassign xsi:nill values from element to BPEL variable - Urgent..Plz..

    Hi all,I have a BPEL process which calls a Webservice,and at the end it transforms the output of the Webservice to the Output Variable in my BPEL process,but the thing is this process retuns elements with xsi:nil="true" and I get an error which says
    *Could not initiate the BPEL process because the input xml is not well formed, the reason is :
    Error parsing envelope: (4, 3679) Namespace prefix &apos;xsi&apos; used but not declared. Please correct the input xml.*
    I have verified the WSLD,.bpel file,the xsd..they all have xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    Heres the code of the assign
    <from xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    variable="Invoke_P_getlV_OutputVariable"
    part="parameters"
    query="/ns7:getCViewResponse/ns7:getCViewReturn"/>
    <to xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    variable="outputVariable" part="payload"
    query="/ns1:GetOfferResponse/ns1:getCVResponse/ns1:getCViewReturn"/>
    Please temme how do I get this to wrk...I need to get this working immediatly..

    If you need to "clean" some xml from null values (empty tags) you can create an XSLT (like RemoveNullTags.xsl) with the following code:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <xsl:apply-templates select="@*|node()"/>
    </xsl:template>
    <xsl:template match="@*|node()">
    <xsl:choose>
    <xsl:when test="normalize-space(.)">
    <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
    </xsl:when>
    <xsl:when test="count(./*)">
    <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
    </xsl:when>
    <xsl:otherwise>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>
    This xslt will remove all the empty tags on your XML. So after you create this and paste it on your project, you need to use it into an ASSIGN activity like this:
    <assign name="Remove_Nulls">
    <copy>
    <from expression="ora:processXSLT('RemoveNullTags.xsl',bpws:getVariableData('inputVariable','payload'))"/>
    <to variable="inputVariable" part="payload"
    query="/ns2:writeCollectedDeleteElement"/>
    </copy>
    <copy>
    <from expression="ora:processXSLT('RemoveNullTags.xsl',bpws:getVariableData('inputVariable','payload'))"/>
    <to variable="inputVariable" part="payload"
    query="/ns2:writeCollectedDeleteElement"/>
    </copy>
    </assign>
    As you can see in this sample, i make 2 copy operations because i have xml arrays, so i need a copy operation for each child the xml element have.
    HTH,
    Andres

  • BPEL variable access problem - ORABPEL-02118

    Hi,
    I have a method which accesses the variable of a BPEL process. It worked well with the Soa Suite 10.1.3.1, but I re-install the SOA Suite with the Advanced installation and applied the 10.1.3.3 patch and now I have this error message:
    0 - ORABPEL-02118
    Variant not found.
    The variant "PatientRecordVariable" has not been declared in the current scope. All variants must be declared in the scope before being accessed.
    Please check that the variant "PatientRecordVariable" is properly declared; otherwise there may be a misspelling in the name of the variant.
    <2007-07-26 11:56:27,829> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "instance manager": [com.collaxa.cube.engine.EngineException: Variant not found.
    The variant "PatientRecordVariable" has not been declared in the current scope.  All variants must be declared in the scope before being accessed.
    Please check that the variant "PatientRecordVariable" is properly declared; otherwise there may be a misspelling in the name of the variant.
    ORABPEL-02118
    Variant not found.
    The variant "PatientRecordVariable" has not been declared in the current scope. All variants must be declared in the scope before being accessed.
    Please check that the variant "PatientRecordVariable" is properly declared; otherwise there may be a misspelling in the name of the variant.
         at com.collaxa.cube.engine.core.Scope.getVariantRV(Scope.java:522)
         at com.collaxa.cube.engine.CubeEngine.getFieldValue(CubeEngine.java:2956)
         at com.collaxa.cube.ejb.impl.InstanceManagerBean.getFieldValue(InstanceManagerBean.java:288)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:396)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:648)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at InstanceManagerBean_RemoteProxy_4bin6i8.getFieldValue(Unknown Source)
         at com.oracle.bpel.client.InstanceHandle.getField(InstanceHandle.java:229)
         at webUI.GetTaskData.doGet(GetTaskData.java:50)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    My code does the following calls:
    Locator locator = new Locator("default", "bpel");
    WhereCondition where = new WhereCondition(SQLDefs.CI_cikey + " = ?");
    where.setString(1, taskId);
    IInstanceHandle[] instances = locator.listInstances( where );
    IInstanceHandle instanceHandle = instances[0];
    System.out.println(instanceHandle.getTitle());
    HashMap inst = (HashMap)instanceHandle.getField("PatientRecordVariable");
    XMLElement dataXML = (XMLElement)inst.get("payload");
    String data = XMLHelper.printXML(dataXML);
    The problem is at the "getField" method. I was wondering if somebody encountered this error and know how to solve it. I think it should also be possible to access the variable directly from the database (I'm using XE) but I don't know in which table to look.
    Any help would be greatly appreciated. Thanks.
    Amir

    When I display the debugTrace message for the process instance using
    System.out.println(instanceHandle.getDebugTrace());
    it gives me this:
    <variant key="_$$process-start-time" type="long">1185481662531</variant>
    <variant key="_$$++is-sync-operation" type="boolean">false</variant>
    <variant key="++properties" id="1" ns1:type="ns2:HashMap">
    </variant>
    <variant key="_$$audit-trail-count" type="int">1</variant>
    <variant key="_$$audit-detail-count" type="int">0</variant>
    <variant key="_$$main-scope" id="2" xmlns:ns3="http://www.w3.org/2001/XMLSchema" ns1:type="ns3:string">BpPrc0.1</variant>
    <variant key="_$$operation-name" id="3" xmlns:ns4="http://www.w3.org/2001/XMLSchema" ns1:type="ns4:string">initiate</variant>
    <variant key="_$$variable-name" id="4" xmlns:ns5="http://www.w3.org/2001/XMLSchema" ns1:type="ns5:string">PatientRecordVariable</variant>
    <variant key="_$$++wi-global-table" id="5" xmlns:ns6="com.collaxa.cube.engine.core" ns1:type="ns6:WorkItemLookupTable2">
    <work-item ns1:type="ns2:WorkItem">
    <key ns1:type="ns2:WorkItemKey">
    <instance-id>70017</instance-id><node-id>BpRcv0</node-id><scope-id>BpSeq0.3</scope-id><count-id>1</count-id></key><state>closed.finalized</state></work-item><work-item ns1:type="ns2:WorkItem">
    <key ns1:type="ns2:WorkItemKey">
    <instance-id>70017</instance-id><node-id>BpAss1</node-id><scope-id>BpSeq0.3</scope-id><count-id>5</count-id></key><state>closed.finalized</state></work-item><work-item ns1:type="ns2:WorkItem">
    <key ns1:type="ns2:WorkItemKey">
    <instance-id>70017</instance-id><node-id>BpInv0</node-id><scope-id>BpSeq0.3</scope-id><count-id>4</count-id></key><state>closed.finalized</state></work-item><work-item ns1:type="ns2:WorkItem">
    <key ns1:type="ns2:WorkItemKey">
    <instance-id>70017</instance-id><node-id>BpInv1</node-id><scope-id>BpSeq0.3</scope-id><count-id>6</count-id></key><state>closed.finalized</state></work-item><work-item ns1:type="ns2:WorkItem">
    <key ns1:type="ns2:WorkItemKey">
    <instance-id>70017</instance-id><node-id>BpAss0</node-id><scope-id>BpSeq0.3</scope-id><count-id>2</count-id></key><state>closed.finalized</state></work-item><work-item ns1:type="ns2:WorkItem">
    <key ns1:type="ns2:WorkItemKey">
    <instance-id>70017</instance-id><node-id>BxExe1</node-id><scope-id>BpSeq0.3</scope-id><count-id>3</count-id></key><state>closed.finalized</state></work-item></variant>
    <variant key="_$$audit-event-count" type="int">16</variant>
    </scope><object-store></object-store></scope-context></cube-instance><work-items></work-items></debug-trace>
    There is a variant element with the attribute key whose value is "_$$variable-name" and the element has the value "PatientRecordVariable". I don't know if this is related to my problem, but if it is, I still don't understant why it could not get the data of this variable.
    Is there any way to get bpel processes' variable data from the database? I browsed the tables but I haven't found them. Hope somebody knows it.
    Amir

  • Alarms - using date in a BPEL Variable

    I have some BPEL Alarm script as below; where I am using the content of a variable (deadline) to hold a date;
    When I compile the WS I get the following error: 'XML parsing failed because Invalid content starting with element "onAlarm"'.
    Any ideas?
    Many thanks in advance
    Vince
    <onAlarm xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" until="bpws:getVariableData('deadline')">
         <bpeld:annotation xmlns:bpeld="http://schemas.oracle.com/bpel/eclipse/designer"><bpeld:meta map.label="untilDeadline"/></bpeld:annotation><throw name="throw-1" faultName="forcedTermination"><bpeld:annotation xmlns:bpeld="http://schemas.oracle.com/bpel/eclipse/designer"><bpeld:meta map.label="forcedTermination"/></bpeld:annotation></throw>
    </onAlarm>

    Hi,
    I Donno wat exactly is your requirement to write it in a switch activity....you can use the transform activity for this.
    Anyways...for your requirement u can use ...ora:countNodes('getTaskDetailsById_OutputVariable','getTaskDetailsById_OutputVariableCollection','/ns5:task/ns5:systemAttributes/ns5:assignees')
    and assign it to a int variable....and use a while loop and each time decrease the value of count by 1...and put a condition in the switch in the while loop as seomething like */task/systemAttributes/assignees[count]/id=bpws:getVariableData('OperatorCode').*

  • XPath, replace XML part in BPEL variable.

    Hi.
    Let's say i have a variable in BPEL which is filled with data :
    <group id="id1">
    <element name="name1" selected="N"/>
    <element name="name2" selected="N"/>
    <element name="name2" selected="N"/>
    <element name="name2" selected="N"/>
    </group>
    <group id="id2">
    <element name="name1" selected="N"/>
    <element name="name2" selected="N"/>
    <element name="name2" selected="N"/>
    <element name="name2" selected="N"/>
    </group>
    <group id="id3">
    <element name="name1" selected="N"/>
    <element name="name2" selected="N"/>
    <element name="name2" selected="N"/>
    <element name="name2" selected="N"/>
    </group>
    Im sending one of the groups to my web app which changes the data and returns 1 group.
    <group id="id2">
    <element name="name1" selected="N"/>
    <element name="name2" selected="Y"/>
    <element name="name2" selected="Y"/>
    <element name="name2" selected="Y"/>
    </group>
    And now i have to update the variable in BPEL becouse it is not up to date. So i want to replace my group with id="id2" with the one i received from my web app.
    I dont know how to do it :( can somebody guide me through it ? A simple copy operation doesnt work :(
    Thanks for help in advance.

    Thx, i already managed to do it. Im using Java Embedded :
    Element input = (Element)getVariableData("pageRequestInput", "payload", "/client:ConfiguratorWizardProcessRequest/client:productGroup");
    Element output= (Element)getVariableData("ProductCatalogInstance", "payload", "/client:KP");
    Node adoptedInput = output.getOwnerDocument().importNode( input, true );
    NodeList list = output.getChildNodes();
    Node oldChild = output;
    for(int i = 0; i < list.getLength(); i++){
    if ( list.item( i ).hasAttributes() ) {
    addAuditTrailEntry( list.item( i ).getNodeName() );
    NamedNodeMap attributes = list.item( i ).getAttributes();
    for( int j = 0; j < attributes.getLength(); j++){
    if( attributes.item( j ).getNodeName().equals( "id" ) ){
    if( attributes.item( j ).getNodeValue().equals( input.getAttribute( "id" ))){
    oldChild = list.item( i );
    break;
    }

  • Occasionally - BPEL variable is empty

    We have a process that prepares a large variable (purchase order) via transform for an invoke. Most of the time it performs with no problems but sometimes it gets in a state where that transform will create a totally empty output.
    This continues with each new instance until restarting the server which fixes the issue. Any ideas what would cause this sporadic problem?
    Thanks,

    Hi,
    I have seen very similar behaviour with variable initialisation in BPEL, and it does seem to clear out after a composite redeploy or a server restart.
    It looks like a bug, but I have no idea how to reproduce, so it's hard to investigate around something that happens only occasionally with unknown reason...
    Hope someone can find a way to reproduce it... Then it can possibly be fixed..
    Cheers,
    Vlad

  • Setting bpel variable using external java code

    Hi all
    I would like to ask if there is a way to set bpel process variable during process execution from external java code using java api without using java embedding code?!!
    Thnx in advance

    Hi, I wanna to know if it is possible at all to edit/update value of variables in a process instance via external java code?
    In fact I don't believe that we can set a variable remotely using java APIs.Am I right?
    For example,is it possible to change the value of a field in the user task form(that is sent to a user to fill and complete the task)?

Maybe you are looking for

  • M7747c

    The current SATA Hard Drive is having problems.  The message Hard Drive Failure is Imminent is appearing.  The drive is 320 GB.  What is the largest size this system can handle?  

  • HT2513 i cal on macbook pro no longer syncs with iphone

    i used to be able to sync i-cal on my macbook pro laptop with my iphone without a problem.  i changed the setting on my iphone to sync on the cloud.  i later reverted to the original settings after i found out that my laptop won't support cloud setti

  • XI Message Mapping

    Hi , I have updated an Idoc segment with a new field. I need to import the newly updated IDoc in Integration Builder. My question is, there is mapping for the previous version of Idoc and if i import the updated IDoc again will the mapping  be erased

  • My Verizon Tour is a disaster - how can I switch to Bold before my upgrade?

    For the last year, the Tour has been my living nightmare. I went through 4 different tours. Between bad track balls and poor reception, none of them have worked properly.  The phone drops out all the time in my home. I live in a sunny apt. My fiancee

  • Acrobat Pro XI won't update to 11.0.4

    I'm trying to update Creative Cloud Suite Acrobat Pro XI to 11.0.4. I've tried deinstalling and reinstalling. I've tried to update from within the APP itself and it starts, but an hour later it hasn't updated. I'm on a Mac with the most recent system