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.

Similar Messages

  • Accessing BPEL Variables from XSLT

    How can I access the BPEL process vaiable values from an XSL transformation

    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>

  • 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

  • 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 can I access global variables in a loaded Applescript?

    How can I access global variables in a loaded script, in Xcode, ApplescriptObjC? Basically, I have a global variable defined in my parent script using "property", and I need to modify objects connected to those variables inside of a loaded script.
    Example:
    Parent script:
    script AppDelegate
    property myTextField : missing value
    //linked to a text field object
    tell myScript to myAwesomeHandler_()
    end script
    Loaded script:
    on myAwesomeHandler_()
    myTextField's setStringValue_("The new Xcode is so glitchy ugh")
    //changes value of linked text field of parent script
    end myAwesomeHandler_
    The problem is, the variable is undefined in the Loaded script, and I need it to have the same value as the parent script, and I don't want to pass the variable through the Handler. Any ideas?

    I think want you are looking to do will need to be done in two steps. Because myTextField needs to be a property for the ObjectiveC part of the code you cannot turn it into a global.
    However if you make a temporary variable global assign the string to it in the handler then set myTextField off of it.
    global myTextFieldGlobal
    script AppDelegate 
    property myTextField : missing value 
    //linked to a text field object 
    tell myScript to myAwesomeHandler_() 
    myTextField's setStringValue_(myTextFieldGlobal)
    end script 
    on myAwesomeHandler_() 
    set myTextFieldGlobal to "The new Xcode is so glitchy ugh"
    //changes value of linked text field of parent script 
    end myAwesomeHandler_ 
    I know you stated you did not want the handler to return a value but I have to ask why? Global's, imo, are not a good idea and really should be used as a last resort.
    One other possibility is to pass a reference to the property to the handler. Not sure if that works in AS of if that would satisfy our requirement of not passing the variable through the handler
    <edit>
    Another though have you tried to define the property outside the script?  That is
    property myTextField : missing value
    script AppDelegate
    Not sure if that will work.
    You might also want to have a look at Scope of Properties and Variables Declared in a Script Object

  • Access a variable in the Adobe form for Java Scripting

    Hi,
    I am unable to know how to access the variable in a Adobe form.
    The variable is field of an internal table. My adobe form structure is as follows
    MAIN_PAGE->FORMSET->FirstFORM->EXT.
    in the EXT subform the variable(cust)  exists.
    The cust is in turn an internal table.

    Hello Sreelatha,
    I think we cannot hide a page.  as in, page is the main container.  In a container, we can hide any field using some scripting.  Even though if we hide the field, it is present on page but not visible. 
    but if some logic is there, please let me know.
    Thanks,
    Rakesh.
    Edited by: rakhi966 on Sep 8, 2011 8:54 PM

  • Access custom variable value in web.xml context-param?

    My requirement or need is to access a variable value either in a class in my Model project or a backing bean in my View project. For example, one variable I need to access is an application server I am integrating with - 'testserver' or 'productionserver' - I want to be able to configure this within an external file so that I do not have to re-compile my application to change the variable.
    I was thinking about placing this variable in the web.xml <context-param> section as:
    <context-param>
    <param-name>servername</param-name>
    <param-value>testserver</param-value>
    </context-param>
    I need to access this value within a class (not a servlet) on an Application Module service method, though if needed, I could access it from a backing bean and pass it to the service method (less desirable.) Is this a good approach and how do access this variable from within a Java class including any imports I need to do (code example)?
    Thanks and Happy New Year!
    Hopefully most everyone is out spending time with friends and family versus stuck trying to complete a project like me...

    I found an example from SRDemo that provides what I was looking for:
    String serverhostaddress =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("param-name-var-in-webxml");

  • Why can't I access the variables in my threads?

    hello.
    another question about threads..
    ==========================
    I have an inner class that implements Runnable (i.e. a thread) and has a variable in it. I want to be able to access that variable from outside the thread class so that I can set or retrieve the variable.
    here is the code for the program
    class myClass
         public static void main(String[] args)
              myClass c = new myClass();
         myClass()
              Thread t = new Thread(new myThread());
              t.number = 1;
              t.start();
         class myThread implements Runnable
              int number = 0;
              public void run()
         }//end myThread
    }//end myClassthe line
    t.number = 1;
    where I try to set the number variable to 1 gives me an error (in the MyClass constructor)
    This is my error
    AccessThreadVars.java:11: cannot find symbol
    symbol  : variable number
    location: class java.lang.Thread
              t.number = 1;
                        ^
    1 errorif I put a method in myThread, and then try to call that method from myClass (via t.MethodName()) it gives me that same error telling me it can't find it..
    what am I doing wrong? how can I get access my thread's variables and methods??

    1. Type names should start with an uppercase letter
    2. t is defined as a Thread, not as a myThread
    (which, may I insist, should be "MyThread"), so the
    compiler has no means of detecting that "number" is
    an accessible field of the object... which wouldn't be accessible anyway, cause you're trying to get attributes from your Runnable after wrapping it inside a Thread.
    Why don't you do something like :
    MyThread t = new MyThread();
    t.number = 1;
    new Thread(myThread).start();?
    I bet you don't use Thread's own methods anyway...

  • Accessing the variable in field symbol of nested internal table

    Hi,
    I am unable to access the variable in field symbol.
    The data in field symbol has nested structure. We need to access a variable in nested structure.
    Please find the code below:
          LOOP AT <i_fincorp> into <fs_fincorp>.
            l_madefor = <FS_FINCORP>-data_UI-ZZ0010.
          ENDLOOP.
    datatype of <i_fincorp> is type any table and <fs_fincorp> is type any.
    there is a structure 'data_ui' in <i_fincorp> and we need value of field 'ZZ0010' in data_ui structure.
    But, we are getting syntax error for statement in loop stating "There is no component like 'data_ui' in <fs_fincorp>".
    Can anyone please help me solving this issue.
    Regards,
    Santosh

    So simply access it dynamically
    data: nested_field type c length 50.
    field-symbols <nested_field> type any.
    "build the nested field name dynamically
    concatenate
           'DATA_UI'    "first give structure name
           'ZZ0010'  "then give field name (all in uppercase!)
    into nested_field
    separated by '-'.  "now you have DATA_UI-ZZ0010
    "so assing this nested field
    LOOP AT <i_fincorp> into <fs_fincorp>.
       assign component (nested_field) of structure <fs_fincorp> into <nested_field>. 
    ENDLOOP.
    Regards
    Marcin

  • Accessing container variable of BPM in Message Mapping function

    Hi,
    I have a scenario in BPM where i have a container variable that is used as a loop counter.I want to access that counter defined , every time when i go around the loop and perform certain actions based on that counter. so how can i access that variable in my message Mapping function.

    Hi Sudharshan,
    check these links, hope they give you the required information (i think there is some problem with SDN site, check these links after a while)
    Re: How to use Container Variable across Maps
    Container object in Message Mapping
    Copy value of container (abstract interface) to an other container
    Regards
    Vishnu

  • Access global variable in fpga from rt-target

    Hi All,
    I have a realtime PC with NI-FPGA 7852R.
    Generally I used programmatic front panel communication to access variables from FPGA to rt-system since I need the data for control and not for data logging.
    The thing is, I bumped into a tutorial and suggested me to use global variables to save resources of your FPGA. My question is, is it possible to access global variable that belongs to FPGA from rt-system? As far as I tried, this does not seem possible.
    Thanks,
    Auralius

    Could you point us towards this tutorial?
    Chris
    Certified LabVIEW Architect
    Certified TestStand Architect

  • Define Global Variable in XSLt

    H,
    Please let me know how to define Global Variable in XSLT.
    I have define a variable under for-each and i want to use that variable after for-each.
    Please suggest on the same.
    Thanks,
    Pradeep

    Hi Pradeep,
    IN XSL design, right click on target node and then select --> Add Variable. Give the name you desire to that variable and click OK. You can use that variable anywhere in that particular XSLT. In the source xsl you will see entry like this after adding your variable
    "<xsl:variable name="your variable name">value you want to give</xsl:variable>".
    Hope this helps.
    Regards,
    Karan

  • How to access a variable from within a symbol.

    How do I access a variable set outside a symbol from within that symbol?
    Thanks

    If you set a variable on stage ,say
    sym.setVariable("stageVariable", "I am stage variable");
    You can access it from within  a symbol using :
    var myVariable = sym.getComposition().getStage().getVariable("stageVariable");
    Basically you need to get handle to the symbol in which the variable is defined.

  • How to access a variable in if clause?

    Hi Friends,
    I have declared a varialbe like this
    <?xdoxslt:set_variable($_XDOCTX, ’cnt’, 10)?>
    Now if i want to access the variable in "if" clause ,something like
    <if:cnt=10?>
    How can i access it?

    Hi,
    try the following
    <?if:xdoxslt:get_variable($_XDOCTX, 'cnt')= 10?>
    Your logic goes here
    <?end if?>
    regards
    Rupesh

Maybe you are looking for

  • Help please. My mac book pro did a java update and now will not boot  oot.

    As it says above. Since doing a java update automatically and then shutting down on me.. my mac book will not boot properly. I can get it to boot in safe mode eventually, usually after 5 to 10 mins of waiting, but will not boot into mormal mode. How

  • Windows 7 64-bit - how do I install Photoshop CC 64-bit, because the 32 bit version was installed automatically?

    I am running window 7 64-bit and the version of photoshop that CC installed is 32-bit. I want to install a 64-bit version of photoshop so that I can access all of my RAM (I keep getting error messages). Apparently CC should install the correct versio

  • Running forms without ias

    Hi, what has to be done to run forms (9i) without installing the whole ias. I'd like to have a simple install. Is it possible to run it just with oc4j. How can I do that. It does not matter if it is not supported! Thanks Günther

  • Mouse pointer turns into hand (10.8)

    Dear Mac community, On my MacPro, the cursor often turns into the hand icon, andclicks on web site buttons and links do not work. For example, I can't click on "add to cart" when on Amazon. Does anyone know of a fix? Oddly enough, the cursor resumes

  • Employee Photos - Recommended Size and Resolution

    Hello All, Please can anyone advise on the recommended photo size and resolution to be used to provide the highest quality photo available on the infotype header ? Also, if there is a difference to use the photo format BMP or JPEG ? This information