6.1.5 Re-executing process instances
You can re-execute each process instance whose execution was cancelled due to failure, such as the shutdown of a machine on which the Cosminexus system is running, or a service module call error.
Also, you can re-execute multiple process instances in batch mode. To perform batch re-execution of the process instance execution logs, you can use commands only.
Furthermore, you can request a re-execution of the business process from the service requester to re-execute the business process.
for details on conditions in which you can re-execute process instance and re-executing business process using service requester, see "3.5 Re-executing a business process" in "Service Platform Overview".
- Important note
-
As per the time lag that occurs between the time for searching execution log using screen or command till its re-execution, status of process instance execution log displayed in search result differs from status of status of real process instance execution log. In this case, even if you perform re-execution for process instances with status "Completed" or "Completed with fault", actually the re-execution fails and does not get implemented. For this, acquire latest information and perform re-execution.
- Organization of this subsection
(1) Using screens to re-execute process instances
(a) Re-executing process instances individually
The procedure to re-execute process instances one by one using screens is as follows:
-
Search the process instances.
The result is displayed on the search results list.
-
From the search results list, select a process instance whose status is [Executing] or [Error occurred], and then click the [Activity Information]. button.
The list of detailed information displays the activity information.
-
Confirm that activity appropriate for condition required for re-execution of process instance is included from detailed information list.
The following table describes the condition wherein you can re-execute the process instance.
Table 6‒1: condition wherein re-execution of process can be performed Activity type
Status of activity instance
Invoke service
Executing
Error occurred
Standby
Executing
Scope
Executing (Standby)
Error occurred
Completed (Standby)
Response
Completed (Standby)
-
Click the [Reexec] button.
A dialog box confirming re-execution of the process instance is displayed.
-
Click the [OK] button.
The process instance is re-executed and a dialog box appears showing the result of process instance re-execution.
-
Click the [OK] button.
The list of search results is updated. This list is updated even if re-execution fails.
(b) Precautions
Do not re-execute process instances running on the HCSC server. For re-executing the process instances, first check the error contents in the response and the message logs from the HCSC server, eliminate the cause of the errors, and then re-execute process instances.
(2) Using commands to re-execute process instances
(a) Re-executing process instances individually
The procedure to re-execute process instances one by one using commands is as follows:
-
Determine the HCSC server to be accessed.
-
Use the cscpiselect command to search for those process instances that include the following activities:
-
Invoke service activity with the status [Executing] or [Error occurred]
-
Standby activity with the status Executing
-
Scope activity with status "Executing (Standby)", "Error occurred", "Completed (Standby)"
-
Response activity with status "Completed (Standby)"
-
-
Identify the process ID and business process definition name for the process instance you wish to re-execute.
-
Execute the following command to re-execute the process instance:
cscpireexec -user <Login user ID> -pass <Login password> -csc <HCSC server name> {-processid <Process ID>|-processidfile <Process ID file name>}# {-processnamefile <Business process definition file name> | -processname <Business process definition name>#- Note #
-
Specify one of them.
- (Example): Enter the command using the following conditions to re-execute the process instance:
-
-
Process ID to be re-executed: J2EEServer_010210084218_Hello business process_1237946140968_3843192274_138
-
Business process definition name: Hello business process
-
HCSC server to be accessed: HCSC
- Command
cscpireexec -user <Login user ID> -pass <Login password> -csc HCSC -processidfile process_id.txt -processname Hello business process
- Contents of process_id.txt
J2EEServer_010210084218_Hello business process_1237946140968_3843192274_138
- Output result
-
-
For details on cscpireexec command "cscpireexec (Re-executing process instances)" in "Service Platform Reference Guide".
(b) Re-executing process instances in batch mode by specifying the business process definition name
The procedure to re-execute process instances in a batch mode by specifying the business process definition name as follows:
-
Determine the HCSC server to be accessed.
-
Identify the business process definition name for the process instances you intend to re-execute.
-
Execute the following command to re-execute the process instance:
cscpireexec -user <Login user ID> -pass <Login password> -csc <HCSC server name> {-processname <Business process definition name>|-processnamefile <Business process definition file name>}#- Note #
-
Specify one of them.
- (Example): Enter the command using the following conditions to re-execute the process instance in batch mode:
-
-
Business process definition name: Hello-business-process
-
HCSC server to be accessed: HCSC
- Command
cscpireexec -user <Login user ID> -pass <Login password> -csc HCSC -processname Hello business process
-
For details on cscpireexec command, see "cscpireexec (Re-executing process instances)" in "Service Platform Reference Guide".
(c) Re-executing all the targeted process instances in the batch mode
The procedure to re-execute all the target process instances in the batch mode is as follows:
-
Determine which HCSC server is to be accessed.
-
Execute the following command to re-execute the process instance:
cscpireexec -user <Login user ID> -pass <Login password> -csc <HCSC server name> -all
- (Example): Enter the command using the following conditions to re-execute all the target process instances in the batch mode:
-
-
HCSC server to be accessed: HCSC
- Command
cscpireexec -user <Login user ID> -pass <Login password> -csc HCSC -all
-
For details on cscpireexec command, see "cscpireexec (Re-executing process instances)" in "Service Platform Reference Guide".
(d) Re-executing process instances in batch mode specifying HCSC server
The procedure to specify HCSC server targeted to re-execute, and re-executing targeted process instances in batch mode is as follows:
-
Determine which HCSC server is to be accessed.
-
Execute the following command to re-execute the process instance:
cscpireexec -user <Login user ID> -pass <Login password> -csc <HCSC server name> -all -targetcsc <Name of the HCSC server targeted for re-execution> [-status <status of activity which is condition for re-execution>]
- (Example 1): Enter command using following condition to re-execute targeted process instances in batch mode
-
-
HCSC server to be accessed: HCSC1
-
HCSC server targeted for re-execution: HCSC2
- Command
cscpireexec -user <Login user ID> -pass <Login password> -csc HCSC1 -all -targetcsc HCSC2
-
For details on cscpireexec command, see "cscpireexec (Re-executing process instances)" in "Service Platform Reference Guide"
- (Example 2): Enter command using following condition to re-execute targeted process instances in batch mode
-
-
HCSC server to be accessed: HCSC1
-
HCSC server targeted for re-execution: HCSC2
-
Status targeted for re-execution: "Executing", "Executing (Standby)", "Completed (Standby)"
- Command
cscpireexec -user <Login user ID> -pass <Login password> -csc HCSC1 -all -targetcsc HCSC2 -status executing,executingwait,completedwait
-
(e) Precautions
Do not re-execute process instances running on the HCSC server. For re-executing the process instances, first check the error contents in the response and the message logs from the HCSC server, eliminate the cause of the errors, and then re-execute process instances.
If the process instance for re-execution is not present, command ends abnormally.
(3) Output of response message when re-executing process instance
Result of re-execution of process instance receives response message from process instance even if result is successful or failure due to SOAP fault. In this case, set contents shown below in HCSC-Manager definition file, you can output response message to file.
cscmng.pireexec.response.dir= response message storage directory cscmng.pireexec.response.encoding= response message storage character code
For details on creating HCSC-Manager definition file, see "2.4.1(1) Storage directory of HCSC-Manager definition file", for details on HCSC-Manager definition file, see "6.5.3 HCSC-Manager definition file" in "Service Platform Reference Guide".
Furthermore, process ID can have long character string (maximum 240 characters). If you set thorough directory in response message output directory, be careful as there is possibility that file cannot be generated. If response message file does not generate even if you perform re-execution, message is output.
(4) Information about SOAP fault
When re-execution of process instance fails due to SOAP fault, type and handling of SOAP fault information received from process instance is as follows:
-
Fault code: displayed in error message
-
Fault character string: displayed in error message.
-
Fault generator: displayed in error message.
-
Details of fault: same as response message at the time of successful re-execution, file is output to directory used for storing response message. However, output encode code is only UTF-8