How to change process status to completed?


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:

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?

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

It sounds like you had this issue resolved now:)

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.

make sense:

Please let the forum know if that works for you!

Yap, it works :lol:

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


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/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

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


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…

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 !