IBM Support

Restarting IBM Case Manager tasks that fail to start

Release Notes


Abstract

When a task fails to start, you must change the task state manually in FileNet Enterprise Manager to restart the task. You can also use the Case REST API to restart the task.

Content

To restart FileNet Process Engine or workflow system tasks that failed to start you must first to put the failed tasks into a state where they can be restarted:

  1. In Enterprise Manager, right-click the Object Stores > object_store_name > Search Results tree view node.
  2. Select New Search from the context menu and in the Select from Table list, select Task.
  3. In the Select Columns list, select the * (asterisk) character.
  4. In the Column list of the Criteria section for row A, select Task State.
  5. In the Condition list, select Equals To.
  6. In the value column, enter 6.
  7. In the Column list of the Criteria section for row B, select Last Failure Reason.
  8. In the Condition list, select Equals To.
  9. In the value column, enter CmAcmError Launch Failed.
  10. Click the Script tab and select Execute Script.
  11. In the Script Type list, select JScript.
  12. Enter the following script:

    function OnCustomProcess (CEObject)
    {
      CEObject.changeState(4194304);
      CEObject.save(1);
    }
  13. Click OK to run the query and the script.

To restart IBM Business Process Manager tasks that failed to start, you must first put the failed tasks into a state where they can be restarted:

  1. In Enterprise Manager, right-click the Object Stores > object_store_name > Search Results tree view node.
  2. Select New Search from the context menu and in the Select from Table list, select Task.
  3. In the Select Columns list, select * (asterisk).
  4. In the Column list of the Criteria section for row A, select Task State.
  5. In the Condition list, select Equals To.
  6. In the value column, enter 6.
  7. In the Column list of the Criteria section for row B, select Process Instance.
  8. In the Condition list, select Is Null.
  9. Click the Script tab and select Execute Script.
  10. In the Script Type list, select JScript.
  11. Enter the following script:

    function OnCustomProcess (CEObject)
    {
      CEObject.changeState(4194304);
      CEObject.save(1);
    }
  12. Click OK to run the query and the script.


NOTE: Not all Task types can be restarted and specific conditions must apply. When the "Action" is "restart", the Task instance cannot be a -

* Container or Compound Task
* IBM BPM Task
* Discretionary Task

- and one of the following condition must be true:

* Task PE process completed (TaskState is completed).
* Task PE process failed to launch (TaskState is failed and LastFailureReason is CmAcmError launch failed).
* Task PE process has failed and then stopped (TaskState is failed, task disabled state is disabled_aborted and lastFailureReason is set (to some PE error)).
* Task PE process was running then stopped (TaskState is failed, task disabled state is disabled_aborted and lastFailureReason is not set).

NOTE: To actually restart the tasks in IBM Case Manager V5.1.1, you must then use the Case REST API.


You can now restart the task by issuing a Case REST API "restart" call with the PUT method using (for example) the Poster AddOn for Mozilla Firefox.

Again, steps 1 -12 above serve only to prepare the task object by putting it in an acceptable state for restart afterwards using Case REST API. The restart of the task is not done automatically after step 12. Having completed steps 1 - 12 above, therefore, you now need to execute a "restart" call to the Case REST API in Poster (or the equivalent) to actually restart the task. The Case REST API will check the task attributes to make sure that it is in the correct state (from Steps 1 - 12 above) to be restarted. For example, as noted above, you cannot restart the task that is in working state. You cannot restart the task that has exception other than failed to launch, etc.

To issue a Case REST API "restart" call with the PUT method using (for example) the Poster AddOn for Mozilla Firefox, enter the following parameter values in the Request form:

URL: Use a tool like the Firebug Console to find a Request URL like the following -

<PROTOCOL>://<HOST_NAME>:<PORT_NUMBER>/CaseManager/CASEREST/v1/case/993D3E31-EB4E-4646-B879-2A56055BA874?tasks?TargetObjectStore=MyExampleObjectStore&Grouping=ROD

- when loading the Tasks tab for a case (i.e. CaseId==993D3E31-EB4E-4646-B879-2A56055BA874),extract the TaskId value (e.g. TaskId==7A75A997-0E42-406E-AZC4-EE55D7DER9PF) from the JSON Response payload for the Task you wish to restart, then use this to build the URL for your "restart" Request payload, e.g.:

<PROTOCOL>://<HOST_NAME>:<PORT_NUMBER>/CaseManager/CASEREST/v1/task/7A75A997-0E42-406E-AZC4-EE55D7DER9PF?TargetObjectStore=MyExampleObjectStore&Grouping=ROD

- and then enter that in the URL field in Poster.

NOTE: Within the URL above, the TargetObjectStore querystring parameter represents the symbolic name of the Target Object Store and the Grouping parameter is a pre-defined grouping identifier in which (for v1) the only valid value is "ROD" (for Required, Optional, Disabled).

Actions: The Case REST API must be executed using the PUT method.

Content Type: The "Content Type" of the payload must be application/json; charset=UTF-8

Content: The Case REST API to restart the task has the payload like:

{
"Action" : "restart"
}


For more information on using the Case REST API here, see the following documentation for "PUT method for the particular task instance resource"

V5.1.0: http://pic.dhe.ibm.com/infocenter/casemgmt/v5r1m0/topic/com.ibm.casemgmt.installing.doc/acmdv128.htm

V5.1.1: http://pic.dhe.ibm.com/infocenter/casemgmt/v5r1m1/topic/com.ibm.casemgmt.development.doc/acmdv128.htm

V5.2: http://pic.dhe.ibm.com/infocenter/casemgmt/v5r2m0/topic/com.ibm.casemgmt.development.doc/acmdv128.htm

V5.2.1: http://www-01.ibm.com/support/knowledgecenter/SSCTJ4_5.2.1/com.ibm.casemgmt.development.doc/acmdv128.htm

[{"Product":{"code":"SSCTJ4","label":"IBM Case Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"},{"code":"PF027","label":"Solaris"}],"Version":"5.2.1.0;5.2.0;5.1.1;5.1.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg27023582