webMethods Process Engine 10.5 | Process Engine Services | Summary of Elements in the WmPRT\pub Folder | pub.prt.admin:changeProcessStatus
 
pub.prt.admin:changeProcessStatus
WmPRT. Changes the process status by broadcasting a request to all servers participating in the process.
Input Parameters
The following table lists the input parameters.
ProcessInstanceID
String ID of the process instance that you want to change the status of.
ProcessIteration
String The iteration of the process instance that you want to change the status of.
ProcessModelID
String Optional. ID of the process model (ModelID) associated with the process you want to change the status of.
ProcessModelVersion
String Optional. Version of the process model to change the status of.
Action
String Process action that is to be applied to the specified process instance. The following values apply:
*SUSPEND. Causes a process instance to temporarily stop executing.
*RESUME. Causes a suspended process to continue executing.
*CANCEL. Causes a process instance to terminate without an error condition.
*FAIL. Causes a process instance to terminate with an error condition.
EscalateFailure
String Conditional. Flag that indicates whether the parent process takes control of a failure in a referenced process. The following values apply:
*true — Default. The parent process receives notification of the failure from a referenced process and continues executing. The failed referenced process cannot be resubmitted as the parent process is no longer waiting for a response.
*false — The parent process does not receive notification of the failure from a referenced process and continues to wait for a response; this enables the referenced process to be resubmitted for another attempt at normal process completion. See the Usage Notes for more information.
Output Parameters
None.
Note: If this service runs to completion, it means that the request for a status change has been made. The servers involved handle these requests asynchronously. You can track the status of a process using webMethods Monitor.
Usage Notes
The following table shows all valid status change combinations. All combinations that are not listed in the table are invalid.
Status
Action
New Status
Started
SUSPEND
Suspended
Started
FAIL
Failed
Started
CANCEL
Canceled
Suspended
FAIL
Failed
Suspended
CANCEL
Canceled
Suspended
RESUME
Resumed/Started
Completed
FAIL
Failed
Failed
CANCEL
Canceled
The EscalateFailure parameter enables the developer to determine if a referenced process is recoverable by resubmittal after an error occurs. Prior to version 8.0 SP1, the failure of a referenced process was always escalated to the parent process. In this case, the parent process would continue execution, and the failed referenced process cannot be successfully resubmitted because the parent process is no longer waiting for a response.
For backward compatibility, the EscalateFailure parameter is set to true by default, replicating this behavior. However, when pub.prt.admin:changeProcessStatus is invoked and the EscalateFailure parameter is set to false, the failure of the referenced process is not escalated to the parent process, and the parent process continues to wait for a response. This allows the failed referenced process to be resubmitted, and upon successful completion, the referenced process will rejoin the parent process.
To implement this scenario, you must design the referenced process so that it will call pub.prt.admin:changeProcessStatus (on a terminate step, for example) with the EscalateFailure parameter set to false. Then, if the referenced process fails, the parent process will remain as "started", and you can then resubmit the referenced process. If the referenced process fails again, the same behavior occurs. If the referenced process completes, it will rejoin the parent instance.
A referenced process failure that occurs by a cause other than the changeProcessStatus service (for example, an error occurs and there is no error handler step) is not affected by this parameter and will continue to escalate the failure to the parent instance.
Note: To be able to resubmit the failed referenced process, you must enable the failed step for resubmission in webMethods Monitor. For more information, see the webMethods Monitor User’s Guide.

Copyright © 2007-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.