Getting instance id

Hi All,
Can somebody tell me how i can get instance id of a particular bpel instance just invoked. I'm aware of 2 options : using ora:getInstanceId() in the bpel process and using locater class to get the handle of the instance. Is there any other way to get the instance id other than these two. I cannot use these two options for some reason.. So i'm looking for some other alternative to get the instance id of the bpel instance. Can somebody help me out?

ora:getInstanceId() i can use only in the bpel process. I have a requirement where i have to invoke the bpel process programmatically and give feature to monitor the bpel instance just invoked. I have to construct the bpel instance url for which i require the instance id. As i understand the only way to get the instance id back is to return that value as part of the response of the bpel process which is not the way i expect. Hence looking out for some other alternative.

Similar Messages

  • How to get instance notes in a global

    I have a global in a utility project that gets called through PAPI WS from an external client.
    I want this global to take an instance id as the input argument. It should then get a reference to the instance, get the instance notes currently associated with that instance and pass them back (as an array of delimited strings). The instance will be residing in one of many other projects.
    I can use PAPI in the global to connect to a BusinessProcess:
    connectTo bp
    using url = Fuego.Server.directoryURL,
    user = String(BusinessParameter.getValue(name : "GENIE_UID")),
    password = String(BusinessParameter.getValue(name : "GENIE_PW")),
    process = "/" + ou + "/" + process
    and I can get a reference to the instance using bp.getInstance(), but I can not see anywhere in any of the PAPI methods where I can get the instance notes for that instance.
    BTW I am using both ALBPM 5.5 and 6.0, so I need a solution for both.
    Basically this external client wants to get instance notes for a given instance (and there is other processing I need to do as well - I need to add in custom notes from a custom table before I return the results, so they can't just use PAPI WS directly to get the instance notes).

    I ran into this problem and requested from Product Management that they allow PBL code to get instance notes, audit info, etc. It's been a while since I've run into this problem but I'm sure it's the same issue. You can only get information about the instance notes, audit info, etc from PAPI.
    The architecture of BPM is such that the BPM workspace actually uses PAPI to do all its work. So in other words anything the workspace does, PAPI can do. But from within a process, PBL code doesn't have access to all PAPI functionality. You may want to raise this issue up with product management and see if they have any recommendations.
    BTW - It is not recommended to instrospect BPM tables to use from within your process. Although this would solve your problem, it is not recommended...
    Cheers!
    Mark

  • Get instance status through RESTful SDK

    I am working with a client who has integrated some BO 3.1 functionality into their application using the .NET SDK.  I am evaluating their code because they are upgrading to BI4.1 and a lot of the code will have to be scrapped and rewritten because they are using classes that are no longer available in the 4.1 .NET SDK.
    Ideally I'd like to rewrite the code using the RESTful web services.  I can see how to get folders and reports, how to schedule reports, and most of the other functionality they'll need.  However, I'm trying to figure out how to get a list of instances that belong to a report (Crystal or Webi) and the status of the instance (e.g., Success, Fail, Recurring, etc.)  Is this capability available in the RESTful web services?  If so, what is the request URI to get it?
    Thanks!
    -Dell

    sorry Dell, no status for crystal instances, but webi does have status.
    Get details of a report:
         GET        http://localhost:6405/biprws/infostore/5602
         This will also show a link to latest instance
    To get instances (can’t get status)
         GET        http://localhost:6405/biprws/infostore/5602/children
    To get instances that are PDF or Crystal formats (format is
    same as SI_KIND)
         GET        http://localhost:6405/biprws/infostore/5602/children?type=Pdf
         GET        http://localhost:6405/biprws/infostore/5602/children?type=CrystalReport
    Webi (raylight) has more details (including status):
         GET        http://localhost:6405/biprws/raylight/v1/documents/5487/schedules
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <schedules>  
         <schedule>
                          <id>10336</id>
                          <name>Formatting Sample</name>
                          <format type="webi"/>
                          <status id="1">Completed</status>
                    </schedule>
              </schedules>
    Dan

  • Singleton Class using a constructor not a get Instance method ?

    Hi,
    I have a class with a couple of contructors, the class is instantiated many times in the application.
    Is there any way by which I can return a single instance of the class when the contructor is called ?.
    I dont want to declare a get instance method to return a single instance is it somehow possible to do this in the contructor itself.
    This is done so I dont have to refactor the whole application and change all the places where this class is instantiated.
    Example
    XXXClass xxx = new XXXClass();
    every time new XXXClass() is called the single instance of the class must be returned.
    I dont want to implement
    XXXClass xxx = XXXClass.getInstance();
    Thanks in advance
    Rgds
    Pradeep Thomas

    Pradeep ,
    You see a constructor does not return anything
    when you tell java
    String str = new String();
    It is into the reference str that a Object of the type String is assigned and used ..
    If you want a single instance to exist in your application ..the best way is to use the singelton approach.
    Alternatively you could create one static instance of the object in a parent class and all the classes that inherit from it will then share access .

  • Get instance into wf-steps

    Hi Experts!
    i look into 2 steps-WF,
    each task connect with corresponding instance-public method of class (with interface if_workflow).
    i complete my FIND_BY_LPOR and LPOR (as it's explained in Jocelyn Dart's blog)
    so,the first step is executed without errors and filled internal table (=puplic attribute of class)
    the second step returns empty table (i saw it through debugger)
    i suppose that is another(or new) instance of my zclass.
    should i get instance directly into wiobject_id and pass
    into second task container  via  wf container ?
    it works correctly ,
    when i used WF with BO and i saw table in the second step.
    Thanks for answers.

    sorry Dell, no status for crystal instances, but webi does have status.
    Get details of a report:
         GET        http://localhost:6405/biprws/infostore/5602
         This will also show a link to latest instance
    To get instances (can’t get status)
         GET        http://localhost:6405/biprws/infostore/5602/children
    To get instances that are PDF or Crystal formats (format is
    same as SI_KIND)
         GET        http://localhost:6405/biprws/infostore/5602/children?type=Pdf
         GET        http://localhost:6405/biprws/infostore/5602/children?type=CrystalReport
    Webi (raylight) has more details (including status):
         GET        http://localhost:6405/biprws/raylight/v1/documents/5487/schedules
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <schedules>  
         <schedule>
                          <id>10336</id>
                          <name>Formatting Sample</name>
                          <format type="webi"/>
                          <status id="1">Completed</status>
                    </schedule>
              </schedules>
    Dan

  • How to set filter to get instances for external variable

    Hi,
    I am trying to get instances based on external variable. Below is my code
    bp.connectTo(url : Fuego.Server.directoryURL, user : "test", password : "test", process : processName);
    fltr.create(processService : bp.processService);
    fltr.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
    //fltr.addAttributeTo(variable : "PREDEFINE_INSTANCE_NUMBER", comparator : Comparison.IS, value : Integer.parseInt(requestId));
    fltr.addAttributeTo(variable : "requestIdExt", comparator : Comparison.IS, value : Integer.parseInt(requestId));
    When I try to set the filter for PREDEFINE_INSTANCE_NUMBER, I am able to get the instance but not for external variable. Is there any other way to get instances based on external variables?
    Thanks in advance

    You can use a inputdate, which allows you to selecte a moth, year and a day. Once the selection is made you convert it to only allow moth and date like
            <af:inputDate label="Label 1" id="id1" autoSubmit="true" value="#{bindings.myMonthYear1.inputValue}">
              <f:convertDateTime pattern="MM/yyyy"/> 
            </af:inputDate>
            <af:outputText value="Selected #{bindings.myMonthYear1.inputValue}" id="ot1" partialTriggers="id1"/>
    then you have a string holding month and year only. This value you split into two variables you or pass it as a whole parameter to the query and split it there.
    Another way is to add two static lovs one for month and one for year and use them to get to the filter values.
    Timo

  • Getting instance of mosaicApp (IApplication) in non Tile Objects

    Hi Everyone,
    I am trying to get instance of mosaicApp (IApplication) in non Tile Object but it seems that there isn't any API to do that.
    Any help will be appricated.

    It sounds like you want to use a service (no UI) for your applications. Have you looked at the new services feature in Mosaic 9.5 (http://help.adobe.com/en_US/LiveCycleMosaic/9.0/createTile/WSe851854fd1e0856a14b90874128fe 1df2eb-8000.html). There are is also a sample for the implementation of services: http://help.adobe.com/en_US/livecycle/9.0/samples/Mosaic_StockMosaicService.html
    Cheers,
    Matthias Zeller
    Group Product Manager

  • How to get instance of all components in a frame  dynamically

    Hai ,
    I want to know how to get the instance names and values of components on a frame . if any body knows anything on this
    Please help me
    Advance Thanks

    Hai ..
    Thanks for guiding me here i had copied my example code i am getting name value null
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    * @author  naveen
    public class Test extends javax.swing.JFrame {
        /** Creates new form RaviTest */
        public RaviTest() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            jTextField1 = new javax.swing.JTextField();
            jTextField2 = new javax.swing.JTextField();
            jButton1 = new javax.swing.JButton();
            getContentPane().setLayout(null);
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            getContentPane().add(jTextField1);
            jTextField1.setBounds(180, 60, 100, 20);
            getContentPane().add(jTextField2);
            jTextField2.setBounds(180, 90, 90, 20);
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            getContentPane().add(jButton1);
            jButton1.setBounds(170, 140, 81, 26);
            pack();
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            // Add your handling code here:
            Component[] comp=this.getContentPane().getComponents();
            for(int i=0;i<comp.length;i++)
                if(comp[i] instanceof JTextField)
                    getT((JTextField)comp);
    public void getT(JTextField jt)
    System.out.print("name "+jt.getName());
    System.out.println("value "+jt.getText());
    /** Exit the Application */
    private void exitForm(java.awt.event.WindowEvent evt) {
    System.exit(0);
    * @param args the command line arguments
    public static void main(String args[]) {
    new RaviTest().show();
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    // End of variables declaration
    OUTPUT AS :
    if we enter some text in text box and press the button we get like this
    name null value ABCD
    name null value EFGH
    may be some components will have name but if they names are not set
    then we get null value
    what i want is at that i want the jTextField1.. as name(ie.. object name) when the name is not set how to do it

  • Creating view to get instances to user in wich he has taken part

    hellow.
    I have a question. I should to create custom view inside Oracle BPM. This view should get only instances in wich current user has taken part, for a example, some user "test" has assigned in the instance to make some task. Part "Test" has done this task and he whant to look this instance after his task. But participant is not a initiator of the instance...
    This view is similar to another view, where participant create the instance and this participant - initiator. In this case, we should only add a condition in our view like "initiator is current user"....
    But what should I do in my case, when participat is not initiator of the instance but he whants to look tasks in the instance where he have taken part.
    Thank you very much.

    I have seen this requirement come up quite often but unfortunately it is not easily supported out of the box. The limitation is that you can only filter a view based on a project variable, and user defined project variables can only be primitive types. Because of this you cannot for example keep a list of participants as a project variable. The best you can get is a comma separated list of participant ids in a string, but this is still limited to 255 characters. The next limitation is that you can only compare the current user to a Participant project variable, so the initiator or current user, not against a string. The only way we have found to get the current user in to the filter against a string was to do some workspace customizations that were not all that straight forward.

  • How to get instance of Class with its type parameters

    Hi,
    Have any of you folks been dealing with generics long enough to show me how this should be written? Or point me to the answer (I have searched as well as I could).
    I boiled down my situation to the included sample code, which is long only because of the inserted comments. And while boiling I accidentally came across a surprise solution (a bug?), but would obviously prefer a smoother solution.
    My Questions (referred to in the code comments):
    #1. Is there a way to get my parameterized type (classarg) without resorting to using the bogus (proto) object?
    #2. Can anyone understand why the "C" and "D" attempts are different? (All I did was use an intermediate variable????) Is this a bug?
    Thanks so much for any input.
    /Mel
    class GenericWeird
       /* a generic class -- just an example */
       static class CompoundObject<T1,T2>
          CompoundObject(T1 primaryObject, T2 secondaryObject)
       /* another generic class -- its main point is that its constr requires its type class */
       static class TypedThing<ValueType>
          TypedThing(Class<ValueType> valuetypeclass)
       // here I just try to create a couple of TypedThings
       public static void main(String[] args)
          // take it for granted that I need to instantiate these two objects:
          TypedThing<String>                        stringTypedThing = null;
          TypedThing<CompoundObject<String,String>> stringstringTypedThing = null;
          // To instantiate stringTypedThing is easy...
          stringTypedThing = new TypedThing<String>(String.class);
          // ...but to instantiate stringstringTypedThing is more difficult to call the constructor
          Class<CompoundObject<String,String>> classarg = null;
          // classarg has got to be declared to this type
          //    otherwise there will rightfully be compiler error about the constructor call below
          // This method body illustrates my questions
          classarg = exploringHowToGetTheArg();
          // the constructor call
          stringstringTypedThing = new TypedThing<CompoundObject<String,String>>(classarg);
       } // end main method
       // try compiling this method with only one of A,B,C,D sections uncommented at a time
       private static Class<CompoundObject<String,String>> exploringHowToGetTheArg()
          Class<CompoundObject<String,String>> classarg = null;
          /* Exhibit A: */
      ////     classarg = CompoundObject.class;
             results in compiler error "incompatible types"
             found   : java.lang.Class<GenericWeird.CompoundObject>
             required: java.lang.Class<GenericWeird.CompoundObject<java.lang.String,java.lang.String>>
                   classarg = CompoundObject.class;
                                            ^
             I understand this.  But how to get the type information?
          /* It's obnoxious, but it looks like I will have to construct a temporary
              prototype instance of type
                 CompoundObject<String,String>
              in order to get an instance of
                 Class<CompoundObject<String,String>>
              (see my Question #1) */
          CompoundObject<String,String> proto = new CompoundObject<String,String>("foo", "fum");
          /* Exhibit B: */
      ////     classarg = proto.getClass();
             results in compiler error: "incompatible types"
             found   : java.lang.Class<capture of ? extends GenericWeird.CompoundObject>
             required: java.lang.Class<GenericWeird.CompoundObject<java.lang.String,java.lang.String>>
                   classarg = proto.getClass();
                                            ^
          /* Exhibit C: */
      ////     classarg = proto.getClass().asSubclass(proto.getClass());
             results in compiler error: "incompatible types"
             found   : java.lang.Class<capture of ? extends capture of ? extends GenericWeird.CompoundObject>
             required: java.lang.Class<GenericWeird.CompoundObject<java.lang.String,java.lang.String>>
                   classarg = proto.getClass().asSubclass(proto.getClass());
                                                         ^
          /* Exhibit D: (notice the similarity to C!): */
      ////     Class tmp1 = proto.getClass();
      ////     classarg = tmp1.asSubclass(tmp1);
          /* It compiles (see my Question #2) */
          return classarg;
       } // end method exploringHowToGetTheArg()
    } // end class GenericWeird

    Thanks so much, Bruce. (Oh my goodness, how would I have ever come up with that on my own?)
    So in summary
    This doesn't compile:
          classarg = (Class<CompoundObject<String,String>>)CompoundObject.class;but these do compile:
          classarg = (Class<CompoundObject<String,String>>)(Class)CompoundObject.class;or
          Class coclass = (Class)CompoundObject.class;
          classarg = (Class<CompoundObject<String,String>>)coclass;And this doesn't compile:
           classarg = proto.getClass().asSubclass(proto.getClass());but this does:
           Class tmp1 = proto.getClass();
           classarg = tmp1.asSubclass(tmp1);

  • How to get instance name

    I was wondering if there was any way to get the instance name
    of the class to the class without having to pass it in when you
    create the instance of it. For example, so I can do this:
    var myObject:CustomClass = new CustomClass();
    and then the class knows whats its instance name being used
    is instead of having to do something like this:
    var myObject:CustomClass = new
    CustomClass("myObject");

    As I think I found out how to gnerate unique key form components passed to my method and afterwards be able to get this key by knowing the component.My code is following:
    public static String generateUniqueKey(Component c){
    String resultString="";
    String s = c.getAccessibleContext().getAccessibleComponent().toString();
    StringBuffer stringbuffer = new StringBuffer(s);
    if(!Character.isJavaIdentifierStart(stringbuffer.charAt(0))){
    resultString="a_";
    }else{
    resultString=resultString+stringbuffer.charAt(0);
    for(int j = 1; j < s.length(); j++){
    if(!Character.isJavaIdentifierPart(stringbuffer.charAt(j))){
    resultString=resultString+"_";
    }else{
    if (stringbuffer.charAt(j)=='$'){
    resultString=resultString+"s_";
    }else{
    resultString=resultString+stringbuffer.charAt(j);
    return resultString;
    Any suggestions on this. May this result in problems anywhere?
    Thanks

  • Get Instance ID Mediator fault

    Hi,
    I have defined fault policy and binding to handling fault in mediator.
    As documented by Oracle it works only for parallel routing.
    I am calling a java class using java action in fault policy. It is working fine for me and the fault policy is getting invoked and I am able to handle the errors.
    But now I want to get the composite instance Id, payload and fault details and log via fault policy using my java class.
    Any idea how it can be done/
    The IFaultRecoveryContext is not able to access the getId() method.
    With Regards,
    Harsh
    Edited by: Hg on May 9, 2013 4:51 AM
    Edited by: Hg on May 9, 2013 4:52 AM

    Hi Anuj,
    I tried this but the java class is giving me error in the jdeveloper while compiling.
    Error(48,48): cannot access oracle.tip.mediator.infra.exception.MediatorException
    Somehow it is not able to access method getId().
    Here is my java class
    package info.mazanatti;
    import com.collaxa.cube.engine.fp.BPELFaultRecoveryContextImpl;
    import oracle.integration.platform.faultpolicy.IFaultRecoveryContext;
    import oracle.integration.platform.faultpolicy.IFaultRecoveryJavaClass;
    import oracle.tip.mediator.common.error.recovery.MediatorRecoveryContext;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    public class CustomFaultJavaAction implements IFaultRecoveryJavaClass
    public void handleRetrySuccess(IFaultRecoveryContext ctx)
    System.out.println("This is for retry success");
    handleFault(ctx);
    public String handleFault(IFaultRecoveryContext iFaultRecoveryContext) {
    System.out.println("Action context:\n" + iFaultRecoveryContext.toString());
    System.out.println("Policy Id: " + iFaultRecoveryContext.getPolicyId());
    System.out.println("Fault Type: " + iFaultRecoveryContext.getType());
    if (iFaultRecoveryContext instanceof BPELFaultRecoveryContextImpl)
    // Get BPEL specific context here
    BPELFaultRecoveryContextImpl bpelCtx = (BPELFaultRecoveryContextImpl) iFaultRecoveryContext;
    // Writing an audit entry
    bpelCtx.addAuditTrailEntry("hi there");
    // Getting details
    System.out.println("Composite Name: " + bpelCtx.getCompositeName());
    // Getting an instance variable
    Element payload;
    payload = (Element) bpelCtx.getVariableData("inputVariable", "payload", "/");
    Node node;
    node = payload.getFirstChild();
    if (iFaultRecoveryContext instanceof MediatorRecoveryContext)
    MediatorRecoveryContext ctx;
    ctx = (MediatorRecoveryContext)iFaultRecoveryContext;
    String id;
    id = ctx.getMediatorMessage().getId();
    // Writing an audit entry
    System.out.println("InstanceId " + id);
    // Implement some logic to decide the outcome
    return "ABORT";
    Let me know if you have any suggestion.
    With Regards,
    Harsh

  • Doubt: How to get Instance Id of a BPEL Process

    Hi All,
    I have a doubt in BPEL as to how we can get the Instance Id of a particular faulted process.
    Business Scenario
    We have a process which does the following:
    1. Dequeue message from a queue.
    2. Do the Transformation
    3. Insert the Output message into a Database Table by calling a Stored Procedure
    The BPEL Process will create multiple instances of the process after successful completion.
    Now we want to add fault handlers at each of the above steps which will catch any exception that will basically get the Instance Id of the particular faulted process and send it to a mailing list using E-mail notification Service mentioning the Instance Id of the Faulted Process.
    Currently we could not find any way on how to capture the Instance Id of the Faulted Process. We have this requirement because in Production Environment many instances of the process will be spawned and it will be difficult to know which Instance has faulted.
    Anybody familiar with a similar requirement or any pointers on how to achieve this, please post it and let us know.
    Thanks In Advance,
    Dibya

    This xpath function returns current instance id of running process ora:getInstanceId().
    But in your case I would do this flow in ESB. Because this kind of "provisioning" of data can be done in ESB. Each execution I would define as async. And when exception occurs it will be logged by ESB and moved to error hospital. Administrator can easily use ESB console to query faulted instances and if neccesary he can resubmit them.
    Just an idea how to make it faster, without doing some special development.

  • How to get instance of NormalizedMessage of payload in BPEL

    hi,
    I have a BPEL with a JavaEmbedding task in it. And the BPEL receives an XML payload. How can I get an instance of com.oracle.bpel.client.NormalizedMessage of the payload in the JavaEmbedding task. What is the API that gives an instance of the NormalizedMessage.
    Thanks,
    Anil

    hi,
    I have a BPEL with a JavaEmbedding task in it. And the BPEL receives an XML payload. How can I get an instance of com.oracle.bpel.client.NormalizedMessage of the payload in the JavaEmbedding task. What is the API that gives an instance of the NormalizedMessage.
    Thanks,
    Anil

  • Runtime error encounter when getting instance from ResourceFactory

    Hi,
       I'm developing a IView report on the documents' status in the repository, but i have encounter the following runtime error when I get an resource instance from the ResourceFactory,
    <i>Portal Runtime Error
    An Exception occurred while processing a request for:
    IView: N/A
    Component: N/A
    com/sapportals/wcm/repository/IResourceFactory</i>
    My codes are as follows:
    <i>IResourceFactory factory = Resourcefactory.getInstance()</i>
    I try to catch the ResourceException(), but an similar runtime error occured. I'm using PDK EP 6.0_60.2.2
    Thanks for any suggestions/solutions provided.

    Hi,
    did you set the SharingReference attribute in portalapp.xml to "knowledgemanagement, usermanagement" ?
    Best regards,
    Thilo

Maybe you are looking for