0

Is it possible to suspend a task via process portal in IBM BPM 8.5.6. In the 6.2 version we were able to do this via inbox or saved searches. However the new saved searches doesn't support this? Is there a way to do this?

Syam S
  • 8,421
  • 1
  • 26
  • 36

6 Answers6

3

In v8.5 there is nothing like suspending a task from process portal. Although we can suspend a task from Admin Console . Moreover if you want to suspend it from process portal , you can try the below way:

  1. create a HS , having a text box for accepting PID of the process.
  2. Use JS API , to suspend the Task for the provided PID.

    var id = tw.local.pid ;
    
    tw.system.findProcessInstanceByID(id).suspend() ;
    
  3. Expose this human service as a Startable Service to the intented users.

  4. provide the PID which you want to suspend .

Jyoti Yadav
  • 126
  • 8
1

As Jyoti Yadav already stated, you can suspend a task via Javascript API.

An alternate way would be using the /ProcessAdmin page. After logging in you choose the tab "Process Inspector" from the top of the page and search for your instances:

Example of IBM BPM Process Admin

This would be a less flexible, but more human approachable way of suspending a task.

javahippie
  • 806
  • 10
  • 25
1

You can not suspend a task, you can suspend the instance. This is OK if all tasks are sequential, but what if you have parallel tasks and you want to suspend only one of them.

A great alternative that i used is: assign that task to the system user (bpmadmin, wasadmin, celladmin, deadmin,.... whatever you named it), then your instance is still active but it can not be completed until you reassign it back to a user and it finishes it.

This way you can create tasks now, and with a timer you can assign them to a user/group at a specified time.

The code i used:

tw.system.findTaskByID("123456").reassignTo("bpmadmin");

to assign it to the system user so no one can see it,
then in the timer script:

tw.system.findTaskByID("123456").reassignBackToRole();

to assign it back to the group to be executed.

0

In answer to the follow up question, you can put it in the administration portal by exposing it as an "administration service" instead of a "human service".

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
Gary Joy
  • 103
  • 8
0

You can either suspend them through the Process Inspector or via REST Api calls that BPM provides. URL can be : https://baseroot:9443/bpmrest-ui/BPMRestAPITester/index.jsp

0

https://ip:port/rest/bpm/wle/v1/process/xx?action=suspend&parts=all (put)

and

https://ip:port/rest/bpm/wle/v1/task?action=cancel&taskIDs=? (put)

You can refer to the API document of V 8.5.6 for task suspension and then use your own task ID to drop the API suspension task

JamesZow
  • 1
  • 5
  • 1
    `https://10.0.4...` is a local IP space. You should replace that with some like `` to make it clear that this part needs to be replaced by the the reader. Also I'd recommend to format those links as code block using 4 spaces to indent – Filnor Sep 18 '18 at 06:36