How to update the Process-Instance Variable Using Process API in OBPM 10.3?

Hi All,
I have a requirement to update the the process Instance variable from another process, but I am unable to find any method to update or set variable?
I try the same using Process API also but no luck. Please provide me the code or link to implement same.
Thanks & Regards,
Ankur

Hi,
I have followed the procedure which was updated above.
I ahve the sample to update the variable in the another instance of the another process. it's working fine. But I have followed the same procedure in our project it's giving the below exception at notification.send() method. Please help me to resolve this. thank you.
fuego.transaction.DatabaseException: An error occurred while accesing the database.
Detail:SQL statement: ' SELECT INSTANCEDATA, PROCESSID, INSTID, THREADID, NAME, PARENTTHREAD, PRIORITY, CREATIONTIME, AUTHOR, PARTICIPANT, NEXTPARTICIPANT, PROCESSDEADLINE, ACTIVITYDEADLINE, RECEIVETIME, ACTIVITYNAME, NTHREADS, CTHREADS, FCTHREAD, TOTALTHREADS, STATE, SOURCEACTIVITYNAME, ROLEIN, PENDINGITEMID, LASTRESULT, ITEMDEADLINE, NCHANGES , NREMARKS, NATTACHMENTS, HASPARTFORROLE,MICROACTIVITYNAME, V_REF_NO, V_TASK_ID, V_TASK_STATUS FROM PPROCINSTANCE WHERE PROCESSID = 63 AND INSTID = 1996 AND THREADID = 0 FOR UPDATE'
at fuego.server.persistence.jdbc.JdbcProcessInstancePersMgr.load(JdbcProcessInstancePersMgr.java:1640)
at fuego.server.persistence.Persistence.loadInstance(Persistence.java:827)
at fuego.server.AbstractInstanceService.readInstance(AbstractInstanceService.java:764)
at fuego.ejbengine.EJBInstanceService.getLockedROImpl(EJBInstanceService.java:218)
at fuego.server.AbstractInstanceService.getLockedROImpl(AbstractInstanceService.java:879)
at fuego.server.AbstractInstanceService.getLockedImpl(AbstractInstanceService.java:730)
at fuego.server.AbstractInstanceService.getLockedWaiting(AbstractInstanceService.java:219)
at fuego.server.AbstractInstanceService.getLockedWaiting(AbstractInstanceService.java:199)
at fuego.server.execution.AbstractReceiveNotificationExecutionHandler.getLockedTargetInstance(AbstractReceiveNotificationExecutionHandler.java:223)
at fuego.server.execution.AbstractReceiveNotificationExecutionHandler.receiveNotification(AbstractReceiveNotificationExecutionHandler.java:96)
at fuego.server.AbstractProcessBean$41.execute(AbstractProcessBean.java:2776)
at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
at fuego.transaction.TransactionAction.startNestedTransaction(TransactionAction.java:527)
at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:548)
at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
at fuego.server.execution.DefaultEngineExecution.executeWithoutComponentImmediate(DefaultEngineExecution.java:199)
at fuego.server.execution.EngineExecution.executeWithoutComponentImmediate(EngineExecution.java:95)
at fuego.server.AbstractProcessBean.receiveNotification(AbstractProcessBean.java:2757)
at fuego.server.iec.LocalIPCHandler.sendNotification(LocalIPCHandler.java:79)
at fuego.server.execution.microactivity.DefaultSendNotificationExecutionHandler.sendNotification(DefaultSendNotificationExecutionHandler.java:103)
at fuego.server.NotificationComponent.sendNotification(NotificationComponent.java:95)
at fuego.server.AbstractProcessBean$49.execute(AbstractProcessBean.java:3270)
at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
at fuego.transaction.TransactionAction.startNestedTransaction(TransactionAction.java:527)
at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:548)
at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
at fuego.server.AbstractProcessBean.sendComponentNotification(AbstractProcessBean.java:3266)
at fuego.server.AbstractProcessBean.sendComponentNotification(AbstractProcessBean.java:3252)
at fuego.components.Notification.send(Notification.java:148)
at xobject.EPCS.PAction.collateTask(PAction.xcdl:34)
at oracle.TRReview.Default_2_0.Instance.CIL_poReview(Instance.xcdl:25)
at oracle.TRReview.Default_2_0.Instance.CIL_poReview(Instance.xcdl)
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:597)
at fuego.server.execution.EngineExecutionContext.invokeMethodAsCil(EngineExecutionContext.java:1082)
at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1277)
at fuego.server.execution.TaskExecution.invoke(TaskExecution.java:401)
at fuego.server.execution.InteractiveNormalCilExecution.invoke(InteractiveNormalCilExecution.java:425)
at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:513)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:697)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:657)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:154)
at fuego.server.execution.microactivity.InteractiveMicroActivity.executeNormalCil(InteractiveMicroActivity.java:501)
at fuego.server.execution.microactivity.InteractiveMicroActivity.executeItem(InteractiveMicroActivity.java:454)
at fuego.server.execution.microactivity.InteractiveMicroActivity.execute(InteractiveMicroActivity.java:104)
at fuego.server.AbstractProcessBean$48.execute(AbstractProcessBean.java:3204)
at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
at fuego.server.AbstractProcessBean.runTask(AbstractProcessBean.java:3208)
at fuego.ejbengine.EJBProcessControlAdapter.runTask(EJBProcessControlAdapter.java:1162)
at fuego.ejbengine.EJBProcessControl_1zamnl_EOImpl.runTask(EJBProcessControl_1zamnl_EOImpl.java:4463)
at fuego.ejbengine.EJBProcessControl_1zamnl_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-02049: timeout: distributed transaction waiting for lock
at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
at weblogic.jdbc.oracle.OracleImplStatement.execute(Unknown Source)
at weblogic.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at weblogic.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
at weblogic.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
at weblogic.jdbcx.base.BasePreparedStatementWrapper.executeQuery(Unknown Source)
at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:128)
at fuego.jdbc.FaultTolerantPreparedStatement.executeQuery(FaultTolerantPreparedStatement.java:598)
at fuego.server.persistence.jdbc.JdbcProcessInstancePersMgr.load(JdbcProcessInstancePersMgr.java:1627)
... 69 more
BatchOperationException fuego.papi.exception.CannotStoreNotificationException: An instance in Process '/Division#Default-2.0' could not be notified.
Regards,
Sudhakar.

Similar Messages

  • How to update the payload of a BPEL process instance

    Hi I have another question.
    How do I update the payload of a BPEL process instance without the activity being a Human Task. I know there are ton's of example showing how to update the payload of a user task using BPEL API's. But in my case I need to update the payload of a BPEL process instance which has no human task.

    Thanks
    For confirming that the payload in the BPEL process instance is read-only. Now I can see what alternatives I come up with besides the DB save option.
    Guys if you can take the time to answer/comment on another question I have posted in this forum that will be great
    here is the link
    Multi step Human Task
    Regards,
    Jayesh Nazre
    MCSD, MCSE, SCJP, PMP

  • How to create the groups in OID Using Java API.

    Hi,
    I need to create the group in OID Using Java API's only(i.e., javax.naming.* only).
    I need to achieve it without using any oracle specific jars.
    Is there any way to achieve it?.If there's a option to achieve it,do let me know.
    I also need to create the users in that group ,after creating it.
    If you share any useful link or ideas for the same would be great.
    Thanks
    Balaji

    bobws wrote:
    Hi,
    I want to find the installed JREs in windows using java. I couldn't fine any java API. So I am using the below code to fetch the JRE list from windows registries & parse the returned collection to know the installed JRE.Why? If you are running java you already have a JRE. So why not just use it?
    >
    String key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment";
    Runtime.getRuntime().exec(
    "reg query " + "\"" + key + "\"");
    Is it legal to retrieve the installed JREs in this way? Legal? It is OS specific, and to a certain extent dependent on vendor and what the vendor wants to do. Could also be impacted by permissions. Other than that it is ok.
    I am feeling like its a type of hacking. So I couldn't decide whether this is legal (recommended) way of using. Does anybody can answer me. I can see the similar posts in google. Somebody suggests this way & somebody suggests to use preference API which is similar to this. Appreciate your help.Preferences won't work. It doesn't allow access to the registry in general, only a part of it. There are discussions in the JNI forum about retrieving VM versions. Prior to actually using the VM though.

  • How to Update the OrderStatus and OrderStatusAudit using BPEL

    Hi,
    I was working on OrderStatus schema using the BPEL.
    In this I have two tables namely OrderStatus and OrderStatusAudit.
    I have Inserted a new Order into both tables. In case I want to update the existing order number in both the tables what I need to do is It must simply Update existing row of the Ordernumber in the OrderStatus table since in this table OrderNumber is primary key.
    But in the OrderStatusAudit table each time when I was updating an existing ordernumber it must insert a new row underthe same Ordername because here the Ordernumber is not the Primarykey.
    (ie) The OrderStatus table should have the Current status of the ordernumber in a single row and the OrderStatusAudit table should have the entire details of what happened eachtime for the same ordernumber.
    My schema for OrderStatus is
    OrderNumber
    OrderStatus
    CreatedDate
    CreatedBy
    ModifiedDate
    ModifiedBy
    My schema for OrderStatusAudit is
    OrderNumber
    OrderStatus
    UpdatedDate
    UpdatedBy
    It was working fine when I was checking for a single Ordernumber giving condition of Switch as particular ordernumber.
    If the Ordernumber is same as in Switch condition it will update the existing row in OrderStatus and insert a new row in OrderStatusAudit and if it is not same as given in the Switch it will Insert a new row in both the tables.
    How can I acheive the same updation if there are many ordernumbers to be updated.
    It must to be done in a single BPEL.
    Please help me.
    Regards,
    Mahes.

    Hi,
    For example you can create a simple BPEL Process and you can throw an error during running process. If input data is not valid and format is not correct you can throw error using throw activity and using catch activity you can catch particular error. The catch-all will handle all the error occurred with the scope.
    you can also refer faulthandling section in the link for more information related to exception handling.
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/faults.htm#sthref1188
    Regards,
    Deepa

  • 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);

  • How to update the business partner title using the function module

    Hi ,
    I have to update the business partner title to Mr or Ms based on the gender.
    If BP is male title should be updated as Mr else Ms.
    Please provide some inputs on which function module to use to do it in mass update.I have to search the BP's whose title is not created and i have to change those titles to Mr or Ms.

    Hello,
    Try with BBP_USER_CHANGE_FIELDS :
    - set CHANGE_FORM_OF_ADDRESS,
    - put corresponding key you want (see TSAD3 table) in FORM_OF_ADDRESS_KEY.
    Regards.
    Laurent.

  • How to update the loggedin user details using iuser

    Hi,
    our requirement is to edit and save the logged in user details retrieved from iusercontext.
    Please anyone help me out.
    please provide any sample code snippet regarding the same.
    Thank you,
    Hareesh
    Edited by: hareeshvenkat on Aug 30, 2011 12:42 PM
    Edited by: hareeshvenkat on Aug 30, 2011 2:03 PM

    Hello,
    You can change details of the user via IUserMaint interface.
    for example this is how you change the language of the user :
    IUserMaint Muser = uf.getMutableUser(userUniqueid);
    boolean res = Muser.setLocale(new Locale("en"));
    Muser.commit();
    You can find details about IUserMaint  in [http://help.sap.com/javadocs/NW04S/SPS09/se/com/sap/security/api/IUserMaint.html]
    Constantine

  • Update Instance Variables using PAPI

    I have a need to update Instance Variables for a bunch of instances. Can this be done using PAPI? I am writing a global function that can search the instances and update. How can I update these variables...thank you

    Hi,
    I think that the best way of changing instance variables using papi is by adding a global activity (with instance access) and pass the new variable values as arguments. Pay attention that you have to define those arguments in the activity.
    Then, you can assign those values to the instance using PBL.
    http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/papi_javadocs/fuego/papi/ProcessServiceSession.html#activityExecute(fuego.papi.Activity,%20fuego.papi.InstanceInfo,%20fuego.papi.Arguments)
    I do suggest avoiding sending interruptions to instances, because once the notification is sent (and the papi method returns successfully), the notifications will be processed in another transaction.
    Hope this helps,
    Ariel A.

  • How to update the field EKET-WEMNG (delivered) in database using BAPI.

    Dear All,
    How to update the values to good received field for EKET WEMNG (delivered) in database using BAPI and please give me the standard bapi and explain the process  how to update to database bcoz am new to bapi concepts and i will be thankful to your help.
    Regards,
    Tazeer.

    this field is only updated when you do a goods receipt. 
    So the only BAPI that can do this is the BAPI GoodsMovement  (BUS2017)

  • How to update the data in sqlserver table using procedure in biztalkserver

    Hi,
    Please can any one answer this below question
    how to update the data in sqlserver table using procedure in biztalkserver
    while am using executescalar,typedprocedure getting some warning
    Warning:The adapter failed to transmit message going to send port "SendtoSql1" with URL "mssql://nal126//MU_Stage2?". It will be retransmitted after the retry interval specified for this Send Port. Details
    Please send me asap....
    Thanks...

    Hi Messip,
    A detailed error would have helped us to answer you more appropriately but
    You can follow the post which has step by step instructions, to understand how to use Stored Procedure:
    http://tech-findings.blogspot.in/2013/07/insert-records-in-sql-server-using-wcf.html
    Maheshkumar
    S Tiwari|User
    Page|Blog|BizTalk
    2013: Inserting RawXML (Whole Incoming XML Message) in SQL database

  • How to update the FB01L transaction using the FM  bapi_acc_document_post

    Hi All,
            How to update the FB01L transaction using the bapi_acc_document_post but there is no ledger group field in the bapi function module.
    Please help me how to do it.

    hi,
    use batch input method for the same.
    check this.
    [https://forums.sdn.sap.com/click.jspa?searchID=19107237&messageID=884744]

  • How to update the iTunes in the iPad using the I pad

    How to update the iTunes in the iPad using the I pad?

    Then you cannot update without Conecting to iTunes on a computer.
    The Over the Air Feature is only available on iOS 5 or later.
    You have iOS 4... See Here...
    http://support.apple.com/kb/HT4972
    OR...
    Connect to iTunes on the computer you usually Sync with and “ Check for Updates “...
    See the Using iTunes Section Here...
    How to update your iPhone, iPad, or iPod touch

  • How to update the ztable by using table handling function

    how to update the ztable by using table handling function
    It is very urgent ...............................
    thanks in advance

    see the  below code for the direct   ztable update
    Report  ZUPDATE_PRPS.
    tables: zprps.
    parameter: p_wbs like zprps-pspnr,
               p_value like zprps-fakkz default 'X'.
    data: wa_fakkz type zprps-fakkz.
    *START-OF_SELECTION
    start-of-selection.
    call function 'CONVERSION_EXIT_ABPSP_INPUT'
         exporting
             input     = p_wbs
        importing
             output    = p_wbs
        exceptions
             not_found = 1
             others    = 2.
    select single fakkz
      into wa_fakkz
      from zprps
    where pspnr eq p_wbs.
    if sy-subrc eq 0.
       update zprps set fakkz = p_value where PSPNR eq p_wbs.
       if p_value is initial.
         message i999(za) with 'Billing element field has been unchecked'.
       else.
         message i999(za) with 'Billing element field has been checked'.
       endif.
    else.
      message i999(za) with 'WBS element not found'.
    endif.
    reward  points if it is usefull .....
    Girish

  • How to update the ztable using screen.

    hi experts,
    i have one ztable with 8 fields
    and i created one screen with 8 fields
    how to update the ztable using this screen menas when i press the some push button in my screen the table should update.
    Devi

    hi
    check the link shown below
    Coding & screen shots of how to update a database table from screen(Module poool)
    http://www.scribd.com/doc/15628693/moduleprog090311165111phpapp011
    in the attachment u will find
    data  : begin of i_ysrtmm occurs 0,
            sno type ysrtmm-sno,
            sname type ysrtmm-sname,
            scity type ysrtmm-scity,
            sedu type ysrtmm-sedu,
            spercent type ysrtmm-spercent,
            select(1),
            end of i_ysrtmm.
    in the SE51 click on layout & in that menu goto - secwindow- enter the internal table i_ysrtmm
    and click on get from program.u will get all the fields of the internal table select all of them except
    SELECT  field  and then drag and drop on table control . double click on the table control u see the attributes screen there in the w/colselect enter i_ysrtmm-select for tab selection of table control.
    Regards

  • How to update the Ztable using modulepool Tablecontrol...

    Hi All,
    could anyone help me how to update the Ztable using modulepool Tablecontrol...
    if it is possible give me a example with code..
    Many thanks in advance...!!
    Rajesh

    Hi,
    For that pls refer to the link:
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbac3735c111d1829f0000e829fbfe/frameset.htm
    Also refer the sample program:
    RSDEMO02
    Then for updating:
    modify the internal table(which u used to populate the tabcntrl) from the table control.
    Then update database table like:
    update dbtab from table itab.
    Regards,
    Renjith Michael.

Maybe you are looking for