How to get the activity instance id and process id

Dear All,
For my case, my boss require the workflow program processor can be runtime assigned . After research, I found the coding example like below:
// dynamically assign a user to a role
rtm.addRuntimeDefinedUserToRole(
                  // process instance
                  prInstance,
                  // role name
                  "Processor",
                  // user that is assigned (IUser)
                  user,
                  // user context (IGPUserContext)
                  userContext);
// dynamically change the user assigned to a role for a particular task
String prInstanceID = prInstance.getID();
rtm.changeTaskProcessor(
                  // process instance ID
                  prInstanceID,
                  // activity instance ID
                  activityInstanceID,
                  // current user (IGPUserContext)
                  currentProcessorContext,
                  // new user (IGPUserContext)
                  newProcessorContext);
But I don't know how to get the process instance ID and activity instance ID before I can apply this api in my webdynpro application.
Any gentllement can give me an idea.
Thank you.
Regards
Eric

process =  GPProcessFactory.getDesigntimeManager().getActiveTemplate(
                              // by specifying its ID "CCD2C3F1BED111DD9DFA005056A9416C",/
                                             /* and the user accessing it */ userContext);
     //          retrieve the Runtime Manager
     IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
     // create an empty role assignment list
     IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
     //Initialising the input params
     IGPStructure params =GPStructureFactory.getStructure(process.getInputParameters());
     params.setAttributeValue("Name",value);
     //Starting the process
     IGPProcessInstance prInstance = rtm.startProcess(process,"Process Name","Process name",user,roles,params,user);

Similar Messages

  • How to get the active application users IP address in R12 by sql command

    Hi ,
    I need to know how to get the active application users IP in R12 by sql command
    in order to kill any session by the IP address ?
    Am working on 12.1.3 Application
    And 11.2.0.3 Oracle Database
    Thanks

    936921 wrote:
    Am still couldn't found the IP address for the connected Application users.
    If there any select statement can help me with that?
    Really? Then how do you explain me finding the following docs from the links I referenced above?
    How To Find The IP Address Of The Client Machine From Where A Particular Forms User Is Connected ? (Doc ID 879092.1)
    How to Track IP Address of the Form Session in Oracle application 11i (Doc ID 878931.1)
    Where to find the Client IP Address for a Client in E-Business Suite? (Doc ID 1258415.1)
    How To Get The terminal ID For The Machine From Which A User Is Logged To E-Business Suite Applications (Doc ID 751658.1)
    Thanks,
    Hussein

  • RRB-How to get the activity description instead of WBS element in the bill

    Dear All,
    I am using RRB DIP profile to do my Resource related billing
    RRB-How to get the activity description instead of WBS element in the billing
    document.Now  iam able to get the cost and the quantity used as line items but instead of getting the respective line items in the invoice iam still getting the WBS
    element description for all the activities.Can some body guide me to overcome this problem.
    Assured reward points for your suggestions and help.
    Thanking you,
    Best regards,
    R.Srinivasan

    Dear All,
    Please can any body help me for the same.IT is urgent.I will award you points.
    thankyou,
    Best regards,
    R.Srinivasan

  • I have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending

    i have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending the mail.
    Also the mail is acting very funny by not getting the rules work in a proper method.  Is ther a software to repair mail.

    i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check. 
    This problem just started for about 3 to 4 days now.  earlier it was working normally.

  • How to get the health , performance information and about the services run on devices that have connected to the system center?

    Hi All,
    I want to know how to get the health , performance information and about the services run on devices that have connected to the system center to my c# application. Also I need to know about the information of databases that have connected to system center.
    I will appreciate your feedback
    Thank you

    Hi,
    You can configure service monitor for the required service on the server
    refer below link for how to configure service monitoring
    http://www.bictt.com/blogs/bictt.php/2011/03/17/scom-monitoring-a-service-part3
    You can use SCOM SDK to connect to the scom server using c# and get required information
    http://msdn.microsoft.com/en-us/library/hh329086.aspx
    you can find the database in below registry path on management server
    HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Setup\DatabaseName
    Regards
    sridhar v

  • How to get the NT user id and passwd

    Hi,
    How to get the NT user id and passwd using form 6i

    You cannot get the password. Password are stored in an encrypted format. Almost never decrypted (as a security meassure). Authentication is performed by encrypting the supplied password and matching that against the stored encrypted password.
    Think about it.. just how dangerous it will be to have a function that can dump NT users and their passwords for you. How can you ever expect to "simply decrypt a password"?
    As for getting the user name. See the Win32 kernel API call GetCurrentUser(). Also note that there is a big difference as to the owner/user of a server process/thread versus the end-user of client application (possibly running on another PC) that is making the call to the server.
    Of course, none of this is related to SQL or PL/SQL - which is what I believe the subject matter of this forum is... Kindly suggest that in future you pay attention to posting the correct subject material to the correct forum.

  • How to find the max session count and process count for a database

    Hi All,
    How to find the maximum session count and process count reached for a database over a period of 15 days?
    DB version:11.2.0.2
    OS:AIX

    Thanks for the link.
    The output of the below query that is given in the link shows the results for the last 10 or 12 days.. Is there a query which gives a result for the last 30 days?
    col metric_unit for a30
    set pagesize 100
    Select trunc(end_time),max(maxval) as Maximum_Value,metric_unit
    from dba_hist_sysmetric_summary
    where metric_id in ( 2118,2119) group by trunc(end_time),metric_unit order by 1;

  • How to get the all instances in which I acted on any of the activity?

    Hi all,
    Consider that in a Process there are three Activities named
    1. Create Proposal Role : Initiator
    2. Routed to Primary Owner Approval Role : Primary Owner
    3. Routed to Manager Approval Role : Manager
    Suppose I'm a Participant having access to PrimaryOwner Role. Some X, Y, Z persons created 3 instances whcih is now in "Routed to Manager Approval" activity or completed. I acted only on 2 instances and the other some one else acted. How can i get the 2 instances in which i acted . What is the way to acheive this PAPI 6.0 or Stuio 6.0?
    Thanks in advance,
    Sana

    Doing something similar, using following code in a screenflow called from a global activity:
    ps = new ProcessService();
    ps.connectTo(url :Fuego.Server.directoryURL, user : "username", password : "password");
    InstanceFilter filter = ps.getFilterFor(viewId : "myHidView");
    filter.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
    // have tried the filter using both methods below
    //filter.setParametricValueTo(variable : "myvar", value : myDesiredVarValue);
    filter.addAttributeTo(variable : "myvar", comparator : Comparison.IS, value : myDesiredVarValue);
    instances = ps.getInstancesByFilter(filter : filter);
    I get the following error in the engine log:
    Unable to receive the message because of a serialization error. Caused by: fuegoblock.papi.Instance fuego.rmi.spi.SerializationException: Unable to receive the message because of a serialization error. at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:101) at fuego.rmi.ServerCluster.send(ServerCluster.java:226) at fuego.rmi.ServerCluster.sendResult(ServerCluster.java:495) at fuego.rmi.ServerCluster.access$400(ServerCluster.java:50) at fuego.rmi.ServerCluster$1.put(ServerCluster.java:590) at fuego.component.ExecutionThread.sendResult(ExecutionThread.java:523) at fuego.component.ExecutionThreadContext.doClientInvoke(ExecutionThreadContext.java:668) at fuego.component.ClientRemoteComponent.doInvocation(ClientRemoteComponent.java:303) at fuego.component.ClientRemoteComponent.invoke(ClientRemoteComponent.java:160) at fuego.component.ExecutionRelayedThrowable.execute(ExecutionRelayedThrowable.java:94) at fuego.server.execution.TaskExecution.handleExecutionRelayedThrowable(TaskExecution.java:802) at fuego.server.execution.TaskExecution.handleComponentExecutionException(TaskExecution.java:753) at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:493) at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:677) at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:638) at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:451) at fuego.server.execution.GlobalTaskExecution.executeGlobalCIL(GlobalTaskExecution.java:164) at fuego.server.execution.Global.continueCil(Global.java:68) at fuego.server.AbstractProcessBean$39.execute(AbstractProcessBean.java:2515) at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:291) at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:462) at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:540) at fuego.transaction.TransactionAction.start(TransactionAction.java:213) at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:118) at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66) at fuego.server.AbstractProcessBean.runGlobalActivity(AbstractProcessBean.java:2508) at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1477) at fuego.lang.JavaObject.invoke(JavaObject.java:185) at fuego.component.Message.process(Message.java:585) at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:759) at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:734) at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:140) at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:132) at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:257) at fuego.component.ExecutionThread.work(ExecutionThread.java:818) at fuego.component.ExecutionThread.run(ExecutionThread.java:397) Caused by: java.io.NotSerializableException: fuegoblock.papi.Instance at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at java.util.ArrayList.writeObject(Unknown Source) at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at fuego.component.Message.writeObject(Message.java:665) at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at fuego.component.Batch.writeObject(Batch.java:151) at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at fuego.rmi.Packet.write(Packet.java:251) at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:98) ... 38 more
    Sorry for huge error message.
    Is there a trick to getting the filtered set of instances from in the screenflow activity?

  • I am getting ready to wipe a PC clean but wanted to know how to get the activation code for the Version of Adobe reader that is currently installed on the PC?

    I do not have the activation code for this PC and need to know how to get the software loaded back on it after a clean install of the OS and other programs.

    If you use any additional subscription services to Adobe Reader, they are activated with your Adobe ID & password.

  • OIM - Task Assignment Adapter - How to get the object instance key?

    Hello experts,
    I'm trying to use a task assignment adapter to assign an approval task dynamically. Basically, the user can request a resource like "CustomApp Profiles" and we create an object form to let them choose the profile that he needs. Each profile has an owner, which is populate in a Lookup (Owner is the code and Profile is the decode).
    So, in the approval task, I need to get the profile selected by user in the object form and search into the lookup who is the owner of that profile. But I don't know how can I get the object instance key using the parameters that can be mapped to a task assignment adapter.
    Looking into the OIM documents, I believe that the easier way is using the request key, because the REQ_KEY is a foreign key in OBI table.
    Did anyone knows how can I get the object instance key using the request key? Can I use some API or should I execute a SQL statement directly in OIM database?
    Best Regards,
    Nitto

    To retry a task that is in a rejected state, you use the SCH_KEY which is the task key.  In OIM, all rejected tasks are listed in the OTI table.  It contains all the important information about a rejected or pending task.
    You can use the APIs found in the tcProvisioningOperationsIntf class to retrieve open tasks.
    -Kevin

  • How to get the activity of a user?

    Hi Experts,
    How can we get the activity of a user i.e. Which transaction a particular user has gone or some activity log on a particular date? Any table, FM or Tcode. I have already checked the STAD and SM20 transactions. Some authorization problem. So anything except these Tcodes would be helpful. Thanks in advance.
    Regards,
    Prashant.

    >
    santhosh kumar wrote:
    > Hi,
    >
    > I guess if it is not updated or traced under STAD means, i.e. related to authorization failures etc.. kind of stuff will be saved at runtime only in the SAP memory.
    >
    > As it is stored in the buffer, can not be traced in any of the transaction.
    > You should request the user to save and send the screen shot of the SU53 of the user whenever he gets some authorization issue.
    >
    > Based on that, by looking into the SUIM transaction, it can be known whether he is authorized or not, which roles have been assigned etc.. kind of details.
    >
    > Regards,
    > Santhosh.
    Hi Santosh,
    Actually I am doing a root cause analysis for which I need to know whether a particular user has used a particular TCode. I guess the STAD will display only the current data, is there a TCode to display historical data related to user accessing a particular data. Note: I don't have basis authorization.
    Regards,
    Prashant

  • How to get the WSDL services up and running

    Hi,
    I have created a real-time process. I am going to 'Web Services Tester' and getting my project. I am able to see the screen. When I enter data and click on 'Send' I get the message 'The services are not up and running.'
    According to the Student activity guide I need to do the following:
    "If the Web services Tester does not appear on the Launch Pad, click 'Server Configuration' , input your Username and pwd, and then click 'Applications. Select  the checkbox to the left of the Web Services Tester. Click Save and then click Home."
    I do not see the icon 'Server Configuration' on my launch Pad. Let me know how it can be enabled so that it appears on the Launchpad.
    Let me know how to get the web services running.
    Thanks
    Prabha

    Once you have a process which reads from and writes to the web service, just run the process, either directly or in a job.
    Richard

  • How to get the user created at and modified at properties for a site collection using powershell

    Hi guys, I Know how to get the list of users of a site collection by Get-SPUser cmdlet but hte problem is that this cmdlet doesnt give me the user Created at and modifed at properties 
    can any one tell me how to get these values via powershell???? 
    ps: ignore the 2013 screenshot.. i just want a way to get those values .. if you provide me solution in either 2010 or 2013 , i will crack the other..
    plz guys help me ...

    Get the User Information list and then get the user from that list
    $web = Get-SPWeb "siteUrl"
    $userInfoList = $web.SiteUserInfoList
    $userItem = $userInfoList.Items[0]; #0 here is just for demonstration. You take the user you want here or loop through all users.
    $created = $userItem["Created"]
    $modified = $userItem["Modified"]

  • How to get the page layouts programmatically and create a page for that pagelayout

    how get the page layouts programmatically and create a page for that pagelayout and add webpart
    please help me with da code.Thanks
    adityadugyala

    Hi if your page layouts alreday created then create new page programaticaaly  and apply your page ayouts to that page by coding you can do something like following
    PublishingWeb publishingWeb =
    PublishingWeb.GetPublishingWeb(web);
    PageLayout[] layouts = publishingWeb.GetAvailablePageLayouts();
    PageLayout layout = layouts[0];
    string pageName =
    "MyPublishingPage5.aspx";
    PublishingPage newPage = publishingWeb.GetPublishingPages().Add(newFolder.Folder.ServerRelativeUrl +
    "/"+ pageName, layout); 
    newPageUrl = web.Url +"/" + newPage.Url;
    newPage.Description = "This my sample publishing page";
    newPage.Title = "My Publishing Page";
    newPage.Update();
    Please follow link
    http://blogs.msdn.com/b/sowmyancs/archive/2008/03/15/create-publishing-pages-in-portal-sites-programmatically.aspx
    Please mark answer , if you think answer is helpful or correct.

  • How to get the document type, name and revision from the search page cv04n

    Hello,
    After performing cv04n and getting a list of documents satisfying the search criteria, how can I then get the document type, name and revision of the selected document using ABAP?
    Thanks

    HI,
    IN table DRAW... u have Document type, Version and document number.
    In Table DRAT also u get Document Type, Version, Number and Description of Doucment.
    Regards
    SAB

Maybe you are looking for

  • Not able to login to router using ssh when TACACS server is down

    When TACACS server is not reachable router is not allowing the local password to login using ssh. Router's SSH debug says authentication is successful but ssh client gets % Authorization failed meassage and disconnects. kindly see below debug output

  • How to delete perviously loaded request from cube

    Hi All, I am loading a standard cube from r3 w/o PSA through DTP. 1 ) how to delete data automatically from cube w/o using Process chains.( previously we have a facility in Infopackage to delete old loaded data ) .In BI7 how to delete the same automa

  • Finding and opening iWeb webpage files in iWeb SEO

    I have a successfully published website (hosted by GoDaddy). I want to add or enhance tags, but cannot find the files for the published webpage. I can't even find the files using the modification date. Where does iWeb store these files and how can I

  • How to find name of partner based on partner number

    Hello All, Can any one help me how to find name of partner based on partner number. Regards, Lisa

  • Mobile me mail unable to connect to server

    This has been happening since upgraded to Lion. I get the symbol saying it is not connected. If I click on it says "The user name and password specified in Mail preferences were not accepted by the server." I have not changed anything. Every once in