Automatic Global Activity: Obtain instance vars from "BusinessProcess"

Hi,
I need obtain instance vars from BusinessProcess, but i can't find the method for this operation.
Can some one give me answers about this problem?
Thank you...

You have to use the PAPI api inside the designer.
You have to do something like this:
Instance myInstance = BusinessProcess.getInstance(Strign instanceId)
Object instanceVarValue = myInstance.getVar("myInstanceVarName");
Hope this helps.
-Pal

Similar Messages

  • 11g BPM Global Activity with instance access equivalent ??

    Hi,
    I want to be able to update an instance variable from a workspace view much as I could with a 10g Global Activity with Instance access.
    As always I guess there are a number of solutions (even if they dont match the scenario exactly) but which is the best approach ?
    Any help much appreciated.
    cheers
    Tony

    Same problem ...
    I tested with JSP.parameters["arg_myArg"] ... no result

  • PAPI WS: Calling a Global Activity with instance Access

    Hi,
    I have a global activity, which has instance access, and want to call it via PAPI WS. How is this possible? Usually you would use activityExecuteApplication call, but this does not seem to work for activities having instance access.
    Regards
    Matthias

    The inputs are quite simple, the ProcessID, which is '/SampleProcess' for me and the activity name, which is 'GetData'.
    But, of course, this could not work for a Global Activity having instance access. Because in this case an instance id has to be passed in some way, but I don't know, how?
    Regards
    Matthias

  • Passing arguments to a Global Activity with Instance Access

    I'm passing arguments to a Global Activity which has Instance access and then I need to assign agrument values to Instance variables. But, somehow arguments not being passed when I enable "Has Instance Access". If I turn instance access off then arguments pass but unfortunately I cannot assign due to instance not being available. Fyi, I'm using WAPI and argument names in HTML form are prefixed with "arg_" as per WAPI documentation.
    I would appreciate any help in resolving the issue.
    Thanks in advance.
    MK

    Same problem ...
    I tested with JSP.parameters["arg_myArg"] ... no result

  • How to create a new instance of a global activity

    Hi,
    I have one global activity and three interactive tasks. I need a mechanism, which allows me to invoke the global activity from the interactive tasks.
    The global activity should have some information of the task that invoked it and initiate another process.
    Thanks for your help

    Hi Eve,
    Thanks.
    First, it looks like you might be trying to create an instance in a process that is not in your current project. Is it possible that this is the case? Although you can have more than one project open at one time in Studio, you should not do this. Even if you have more than one project open, Studio's runtime components (the Engine, the Workspace, Tomcat and the Derby database) are only working against one project at a time. On Enterprise, this will not be an issue but on Studio you cannot do this.
    Second, if the process that you're trying to create instances on is inside the same project, could you double check the id of the process you are trying to create instances in again? In the Project Navigator tab, right mouse click the process's name -> click "Properties" and look at the read only italisized text beside the "Id" label. It's going to be a String that has no space characters. Is this the String you are using in the method you are using to create instances? Here's an example. If your process's name is "My Process" then its id that you will use to create instances with it might be "MyProcess".
    idOfProcess = "MyProcess"
    ProcessInstance.create(processId : "/" + idOfProcess, arguments : argsIn, argumentsSetName : "BeginIn")Note I used the work "might". You can decide to change the name of your process at any time, but the id is always going to stay the same. So if you change your process to be "My Fantastic Process", its id is still going to be "MyProcess".
    Third, have you defined an Organizational Unit (OU) for your processes (just asking - I am not at all encouraging you to do this)? If you've deployed this using an organization unit (OU) then you'd need to prefix this to the string also. To see if you've defined an OU for your processes right mouse click the project in the Project Navigator tab -> click "Engine Preferences" -> on the left side click "Deployment" -> in the "Organizational Unit" column do you see any entries? Doubt that you do, but if you have an OUs then I'd encourage you to take them out until you get this working.
    Fourth, put logMessage statements before and after your logic where you are creating the instance in the other process just to make sure this where your error is occuring. One of your logMessage statements might look something like this:
    logMessage "Before creating instance in process " + idOfProcess using severity = DEBUGFifth, if none of these ideas have been helpful - please post your logic on this thread. Put the text "{code}" before and after your logic so it reads a little better.
    Thanks,
    Dan

  • Accessing Var from main Nib/Class - [global variables]

    I'm sure this is a simple solution and the problem is I'm just not thinking right. I just started programming in Objective C but have come a long way in the past 2 weeks. Pretty extensive knowledge in C# and some java.
    Anyways, I've been creating an app and have streams working, CFNetwork working, network services discovery working and a tab bar with a custom View controller linking to one of the tab-bar buttons.
    So when you click on one of the tab bar items it opens a new nib file. That nib loads a table view. When nib loads it hits a method which starts looking for network services and updates the table when it finds some.
    Now the idea is is to have a selector on the cell and when you choose the service it adds same variable info, ip and port, back to a global variable which can be used through the entire app and all extra loaded nib files.
    Out of all this, I don't know how to access global variables....prob should be the simplest thing to do out of all I've done. I have ideas of how it should be done but don't know how to access it.
    Idea would be:
    MainWindowNib has NSString var that is public with a getter setter. But how can I access that MainWindowNib var from a SecondView.nib file/class. There a way to get the parent of the secondView.Nib? I have no clue.
    Any help would be great!
    Thanks!

    I'm still a bit confused how you access that method.
    Main.nib class : UIApplication
    NSString *port
    SetupView.nib : NSViewController
    view
    -TableView added to view
    -Seperate NSObject for TableViewDelegates
    -When item selcted, pass NSString to [main port]
    How do I get a pointer to port. I don't really understand how to do this with objective C.
    In C# I would be something like: [Not exact syntax but u get the idea]
    public Main : Form
    public string port{get;set;}
    Main()
    sView SeconddForm = new SecondForm(this);
    public SecondForm : Form
    SecondView(Main main)
    main.Port = "8080";
    Message was edited by: Clarke76
    Message was edited by: Clarke76

  • PAPI - Run Global Activity

    Hi people,
    I have one simple process in my BPM application with a "global creation" activity and im trying to call this activity with papi, but without success.
    When i call this activty, i have this error:
    EJB Exception: ; nested exception is:
    com.bea.control.ServiceControlException: soapenv:Server.userExceptionjava.lang.RuntimeException: Activity '/Principal#Default-1.0/gc' task 'null' could not execute successfully.renault.ideais.local
    caused by: : com.bea.control.ServiceControlException: soapenv:Server.userExceptionjava.lang.RuntimeException: Activity '/Principal#Default-1.0/gc' task 'null' could not execute successfully.renault.ideais.local
    java.rmi.RemoteException: EJB Exception: ; nested exception is:
    com.bea.control.ServiceControlException: soapenv:Server.userExceptionjava.lang.RuntimeException: Activity '/Principal#Default-1.0/gc' task 'null' could not execute successfully.renault.ideais.local
    at weblogic.ejb20.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:102)
    at weblogic.ejb20.internal.BaseEJBHome.handleSystemException(BaseEJBHome.java:307)
    at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:284)
    at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:168)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:56)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:161)
    at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(ServiceHandleImpl.java:436)
    at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(WlwProxyImpl.java:326)
    at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(WlwProxyImpl.java:315)
    at $Proxy17.runGlobalActivity(Unknown Source)My code is very simple:
    //user
    org.xmlsoap.schemas.soap.encoding.String user = org.xmlsoap.schemas.soap.encoding.String.Factory.newInstance();
    user.set("eu2");
    //pass
    org.xmlsoap.schemas.soap.encoding.String pass = org.xmlsoap.schemas.soap.encoding.String.Factory.newInstance();
    pass.set("eu2");
    //session
    org.xmlsoap.schemas.soap.encoding.String session = wsLocalControl.createSession(user, pass, true);
    // activity
    org.xmlsoap.schemas.soap.encoding.String activity = org.xmlsoap.schemas.soap.encoding.String.Factory.newInstance();
    activity.set("/Principal#Default-1.0/gc");    
    // parameters      
    br.com.ideais.ws.ProcessServiceLocalControl.KeyValuePair[] argsGlobal = new KeyValuePair[1];
    argsGlobal[0] = new KeyValuePair();
    org.xmlsoap.schemas.soap.encoding.String key   = org.xmlsoap.schemas.soap.encoding.String.Factory.newInstance();
    key.set("BeginIn");
    org.xmlsoap.schemas.soap.encoding.String value = org.xmlsoap.schemas.soap.encoding.String.Factory.newInstance();
    value.set("");
    argsGlobal[0].key   = key;
    argsGlobal[0].value = value;
    // call the global method      
    br.com.ideais.ws.ProcessServiceLocalControl.GlobalExecutionResult result =  wsLocalControl.runGlobalActivity(session, activity, argsGlobal);Anyone knows the problem?

    It is just a simple code to run a global activity. The global activity is creating instances.
    The issue is: The instances get created by running the global activity from PAPI, but this exception is thrown.
    I am using Oracle 10G and weblogic 9.2
    I have defined 2 JMS connector.
    Also i have defined 2 JDBC Data source and I have not used Transaction for one of the database source.
    Also I am using the thin driver and not the XA driver.
    All this has been configured by following the document:
    http://edocs.bea.com/albsi/docs57/adminguide/index.html
    Regards
    Right Chord

  • Global Activity to use while using PAPI

    Hi,
    I want to create an instance by adding PAPI code to a web-service or by exposing my process as a web-service. Which Global Activity do we use while creating an instance using PAPI ? Is it Global Automatic or Global Creation?

    Hi,
    You can create a new work item instance in a process using (1) PAPI (the Java API) or (2) PAPI-WS (the web service API) or (3) the process specific web service running on the Engine's port 9000. When you do this, the work item instance goes directly into the Begin activity of the process. Once there the work item instance is created and is automatically routed to the first activity in the process.
    There are many reasons for using Global Interactive and Global Automatic activities in a process but you do not need to use a Global Interactive or Global Automatic activity when creating instances using any of these 3 APIs.
    Once an instance is created using any of these 3 APIs, the work item instance immediately and automatically flows to the next activity in the process downstream of the Begin activity.
    Dan

  • Failed to obtain/create connection from connection pool after redeploy

    I have a web application (.war) that uses a jdbc connection pool. The application works fine, however after I redeploy it using the administration console I get "Failed to obtain/create connection from connection pool [ Datavision_Pool ]. Reason : null" followed by "Error allocating connection : [Error in allocating a connection. Cause: null]" from javax.enterprise.resource.resourceadapter and I am forced to restart the instance. I am running Sun Java System Application Server 9.1 (build b58g-fcs)
    using a connection pool to a Microsoft SQL 2000 database using inet software's JDBC drivers. I need to be able to redeploy applications without having to restart the instance. Any help is appreciated.

    I have turned on some additional diagnostics and found out some answers and a work-around, but I think that there may be a bug in the way JDBC connection pool classes are loaded. The actual error was a null pointer in the JDBC driver class in the perpareStatement method. The only line in this method is "return factory.createPreparedStatement( this , sql );" and the only possible NPE would be if the factory was null, which should be impossible because it is a static variable and it is initialized when the class is loaded. The problem occurs because we deploy the JDBC driver .jar file within our .war file, for use when a client doesn't have or want to use connection pooling. Apparently, the connection pool must have picked up some of these classes and when the .war was redeployed, the reference to the factory was lost for existing connections (not sure how). If I remove the JDBC .jar file from the .war, it works, but that wasn't an ideal solution, the other way to get it to work was to change the sun-web.xml file to have <class-loader delegate="true">. We previously had it set to false in version 8.1 because of interference with a different version of the apache Tiles classes, which has now been addressed in version 9.1.
    I still think there is an issue, because the connection pool should never use the application specific classloaders. Am I wrong to believe this?

  • SharePoint - Error_1_Error occurred in deployment step 'Add Solution': Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was rea

    Hi,
    I am Shanmugavel, SharePoint developer, 
    I am facing the below SharePoint 2013 deployment issue while deploying using VS2012.
    If i will deploy the same wsp or existing wsp
    (last build) using direct powershell deployment, the solution adding properly, but the same timeout exception coming while activation the features.  Please find the below error.
    I tried the below activists:
    1. Restarted my dev server, DB server. 
    2. tried the same solution id different server
    3. tried existing wsp file (last build version)
    4. Deactivated all the features, including project Active deployment configuration.... but still i am facing the same issue.
    I hope this is not coding level issue, because still my code is not start running, before that some problem coming.
    Please help me any one.....  Last two days i am struck because of this...

    What you need to understand is the installation of a WSP does not do much. It just makes sure that you relevant solution files are deployed to the SharePoint farm.
    Next comes the point when you activate the features. It is when the code which you have written to "Activate" certain features for your custom solution.
    Regarding the error you are getting, it typically means that you have more connections (default is I guess 100) open for a SQL database then you are allowed to.
    If you have a custom database and you are opening a connection, make sure you close it as well.
    Look at the similar discussion here:
    The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool
    size was reached[^]
    I would suggest further to look at the
    ULS logs[^] to get better insight.
    Manas Bhardwaj's Stream : www.manasbhardwaj.net

  • Font Book Automatic Font Activation

    Hello
    I have been happily using Automatic Font Activation from font book for quite long time. Today i noticed that feature absolutely died. Did not heal cleaning caches, restarting ATS Server via ATSUtil in Terminal command line. Simply feature stop to work and i did not really change anything.
    Please anyone could help me fix it?
    Do not suggest me any 3rd party apps i just liked it way it was before it stop working
    If that help, problem occurs only on my Mac Pro. All seem to work fine on my Macbook Pro

    You've done your trouble shooting!
    Try repairing disk permissions. It can fix a myriad of problems.
    Quit any open applications/programs. Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac. If you see a long list of "messages" in the permissions window, it's ok. That can be ignored. As long as you see, "Permissions Repair Complete" when it's finished... you're done. Quit Disk Utility and restart your Mac.
    If that doesn't help, try forcing background tasks...
    Mac OS X: How to force background maintenance tasks (logs and temporary items)

  • Could not obtain latest contract from popen(3C): No such process

    when i add a scripts in crontab file.in /var/cron/log shows the error
    could not obtain latest contract from popen(3C): No such process

    I HAVE THE CONFIGURATION OF SOLARIS 10
    THE WHOLE CONFIGURATION IS SunOS 5.10 Generic sun4u sparc SUNW,Sun-Fire-V210
    ERROR:Re: could not obtain latest contract from popen(3C): No such process
    THIS PROBLEM SOLVE WITH YOUR SUGGESTED PATCH

  • Active/Standby failover automatic primary active

    I have 2 ASAs 5510 with same physical configuration and running ok with active/standby failover mode. Like we have PREEMPT command in active/active failover to get back primary active after its been rebooted from failed mode. This command makes primary back to active and makes secondary firewall standby automatically.
    Need help to know any such command for active/standby failover for automatic primary active. Currently we have to use command FAILOVER ACTIVE on primary to make it active manually.

    Remember, failover in ASA works differently than HSRP. ASA does NOT use
    HSRP. Furthermore, there is NO HSRP ip address in ASA either. You are
    talking about two different technologies.
    Think of it this way. HSRP technology works very similar to VRRP and
    Juniper NSRP. All of these technologies use virtual IP address. If you
    have two devices, you will have an Virtual IP address, in addition
    to the physical ip addresses of the two devices. ASA does not use the
    extra VIP.

  • How to obtain a URL from a path in a class' method?

    Hey everyone!
    Newbie here needing to convert the following method from a jsp page into a class for one of our applications.
    I have a method in a class which takes a path (as a string). However, I can't seem to figure out how to have java output the corresponding URL in a jsp page.
    For example, in the jsp file, I would provide something like:
    "./../../../../../../temp/gfx/" as the path.
    The "getRealPath()" method converts it nicely to a URL. However, I can't seem to figure out how to use this method within a class file. Is there a way to obtain the URL from a class' method? If so, how?
    --- old code below ---
    ServletContext application = getServletConfig().getServletContext();
    String msg = "";//#Either the IMG tag or message to be returned.
    File dir = new File(application.getRealPath(IMAGE_DIRECTORY));

    Thanks for that hint!
    Also, we're using Websphere... is there an easy way to take a partial url passed as a string and find the full path for it?
    Example:
    /images/today/
    and have it automatically converted to:
    F:/Inetpub/wwwroot/images/today/
    automatically in java?
    Or is this something where both a full system path and URL need to be passed?
    Thanks!

  • Weird error when clicking on instance- flow from the console

    When I have heavy volume coming in for the bpel server(ex: hundreds of instances generated at a time), I see the following weird error when I am trying to see the instance flow from console:
    Process state off. The process class "BugBAM" (revision "v2004_12_20__61032" ) has not been turned on. No operations on the process or any instances belonging to the process may be performed if the process is off. Please consult your administrator if this process has been turned off inadvertently.
    I didn't do anything to the process to turn the state off. What does this error message mean?
    Thanks, Jenny

    I am assuming that you are using 10.1.2 beta 1. Is that correct? I am wondering if in that version there is a switch that turns a process off when a new version of the process is deployed (this would be a bug because the active process should only be switched to retired).
    Next time you get this error, could you please go to the BPEL Console and check the state of the BPEL process.
    We will try to trace the error message in the source code and try to determine if there are other circumpstances which would generate the same error code.
    Edwin

Maybe you are looking for