IBM BPM, V8.0.1, All platforms > Administer applications and processes in the runtime environment > Manage installed snapshots > Manage orphaned tokens

Manage tokens using the REST API Client and Process Inspector

You can use the REST API client to move or delete tokens.

You can use the web Process Inspector to delete orphaned tokens, but not to move them.

You have created and deployed a new process application snapshot and you need to delete or move any orphaned tokens that were created.

Manage orphaned tokens


Related tasks:
Manage orphaned tokens with a policy file
Changing the security policy


Moving tokens


Procedure

To move a token to a new activity:

  1. Use the Process Inspector in the Process Admin Console to inspect the currently running process instances and select the instance containing orphaned tokens that you want to move. Make a note of the process instance ID as well as the ID of the orphaned token, which will be shown in the execution call stack.

  2. Use Process Designer to identify the system ID of the activity where you want to move the orphaned token (the target activity). Record the complete value of that activity, including the "bpdid:" prefix.

  3. To move the token to a activity, in the REST API client, enter the following: :
    /rest/bpm/wle/v1/process/ instance_ID?action=moveToken&tokenId=
     token_ID &target= target_step_ID[&resume= resume_value]

    The following identifies the parameters of the API:

    • instance_ID - the instance ID number of the process instance containing tokens to be moved
    • action - states the action to be taken (moveToken)
    • token_ID - the token ID number of the token you need to move
    • target_step_ID - the ID number of the new process step that you are moving the token to
    • resume_value - the action used to resume the instance after moving the token (set to "true" or "false"); the default value is "true"

  4. Press Enter to complete the move.


Results

The system returns one of the following response codes:


Delete tokens using the REST API client


Procedure

To delete a token:

  1. Use the Process Inspector in the Process Admin Console to inspect the currently running process instances and select the instance containing orphaned tokens that you want to delete. Make a note of the process instance ID as well as the ID of the orphaned token, which will be shown in the execution call stack.

  2. To delete the token, in the REST API client, enter the following: :
    /rest/bpm/wle/v1/process/ instance_ID?action=deleteToken&tokenId=
     token_ID[&resume= resume_value]

    The following identifies the parameters of the API:

    • instance_ID - the instance ID number of the process instance containing tokens to be moved
    • action - states the action to be taken (deleteToken)
    • token_ID - the token ID number of the token you need to delete
    • resume_value - the action used to resume the instance after deleting the token (set to "true" or "false"); the default value is "true"

  3. Press Enter to complete the delete action.

  4. On the Inspector tab of Process Designer, verify that the orphan token is now deleted.


Delete tokens in Process Inspector


Procedure

To delete a token from a process instance:

  1. Open the process instance in Process Inspector.

  2. In the Actions panel, click Delete Orphaned Tokens.


Results

The Actions panel shows that all orphaned tokens have been deleted.