IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How to change process status to completed?

  • 1.  How to change process status to completed?

    Posted Wed August 28, 2013 01:01 PM

    Hi,

    we have one business process that sends data to a target system and awaits acknowledgement. It happens often, that the acknowledgement does not arrive on time and the process times out and fails. Simply increasing timeout will not solve the problem, as the system that generates the acknowledgements is often down / unreachable.

    The issue we are facing is that after we resubmit a failed process, it will fail again because acknowledgement will never arrive. But data have been sent successfully.

    We would like to handle these timeouts as follows:
    When a process is resubmitted and step that sends data finished successfully, the process should (after it times out) be marked as completed instead of failed. So the solution support can get rid of resubmitted processes that finished successfully, but timed out again. These should be marked as completed.

    I can get process iteration from service pub.monitor.process.instance:getInstance and when data/instanceIteration > 1 => the process was resubmitted.

    I can get status of the step that sends data by calling service pub.monitor.process.instanceSteps:getStepDetails and find out whether that step completed successfully or failed.

    If completed successfully, I need to change process status to completed.

    And my question is, how can I achieve that?

    I found services:
    pub.prt.admin:changeProcessStatus
    pub.monitor.process.instanceControl:changeInstanceStatus

    According to documentation, both services can change status only to SUSPEND, RESUME, CANCEL or FAIL. What is not what I am looking for. I need to change process status to COMPLETED.

    Furthermore, what is the difference between these two services? We mostly use pub.prt.admin:changeProcessStatus only.

    I hope there exists a way how to change it using a service. I really do not want to change process status directly in WM database.

    Any suggestions?


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: How to change process status to completed?

    Posted Wed August 28, 2013 01:36 PM

    I did a bit of reverse engineering and it seems like setting Action to DONE should set process status to COMPLETED.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 3.  RE: How to change process status to completed?

    Posted Wed August 28, 2013 04:16 PM

    It sounds like you had this issue resolved now:)


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: How to change process status to completed?

    Posted Thu August 29, 2013 11:59 AM

    I have not tested it yet. I just decompiled the pub.prt.admin:changeProcessStatus service and checked what is under the hood.

    There is reference to class PRTConstants which contains static variable

    public static final String[] INST_ACTION = { "START", "SUSPEND", "RESUME", "CANCEL", "FAIL", "RESTART", "QUIET", "DONE" };

    .

    Let’s see if that is going to work.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 5.  RE: How to change process status to completed?

    Posted Thu August 29, 2013 02:32 PM

    make sense:

    Please let the forum know if that works for you!


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: How to change process status to completed?

    Posted Fri August 30, 2013 09:35 AM


  • 7.  RE: How to change process status to completed?

    Posted Fri August 30, 2013 11:38 AM

    Glad to hear it worked and thanks for your findings and posting back the outcome :smiley:


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: How to change process status to completed?

    Posted Thu September 12, 2013 08:01 AM

    Hi,

    I also try to use the “pub.prt.admin:changeProcessStatus” service to mark a process as completed instead of failed.

    BUT, I’m not able to launch the service successfully…

    I provide the mandatory inputs:

    • ProcessInstanceID=501fa7d0-16f4-11e3-89e3-c9c28873d590
    • ProcessIteration=1
    • Action=DONE
      and I get back a message “[MID=null, MVers=null] Model does not exist.”

    so I add others optional inputs:

    • ProcessModelID=/<MODEL_NAME>
    • ProcessModelVersion=2
      and I get back a message “Process instance 501fa7d0-16f4-11e3-89e3-c9c28873d590:1 does not exist.” (It seems obvious that it will failed, but I have to try)

    A call to “pub.monitor.process.instance:getInstance” with the instance ID and I get:
    data

    • data/instanceID=501fa7d0-16f4-11e3-89e3-c9c28873d590
    • data/modelID=/<MODEL_NAME>
    • data/modelVersion=2
    • data/instanceIteration=1
    • data/modelName=<MODEL_NAME>
    • data/customID=7304
    • data/status=4

    Can someone tell me if the input “ProcessInstanceID” of “pub.prt.admin:changeProcessStatus” shall be the “instanceID (501fa7d0-16f4-11e3-89e3-c9c28873d590)” ?
    Or how can I retrieve it… Thks


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 9.  RE: How to change process status to completed?

    Posted Thu September 12, 2013 09:19 AM

    All the required fields are available in pipeline in ProcessData document. Just map ProcessData/ProcessInstanceID, ProcessData/ProcessIteration and ProcessData/ProcessModelID to the service inputs.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 10.  RE: How to change process status to completed?

    Posted Thu September 12, 2013 10:15 AM

    Hi,

    Thanks for the reply.
    The issue I face is that we have on our production environment processes marked as failed and in fact they are not. SAG have modified some paremeters in this environment to solve this a couple of days ago.
    For new processes it’s all fine.
    But we have older processes that still have this issue, so I try to find a workaround to mark this processes as completed but outside the processes. It’s only temporary.

    I don’t know if we can change these status “externally” via services…


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 11.  RE: How to change process status to completed?

    Posted Thu September 12, 2013 11:07 AM

    Ok, “good news”

    There is a SAG consultant in our office today.
    Everything is clear for me now (sorry I’m a newbie in BPM :wink: ).

    updateProcessStatus is in WmPRT so only available for running processes, that’s why the service didn’t work.

    We are working on a workaround, may be database update, or let some processes in a failed status if it’s critical.
    Thx !


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services