Reputation: 305
How can I suspend a Task from Rest API.
I'm using the following code
RuntimeEngine engine = sessionBean.getEngine(implementationId);
TaskService taskService = engine.getTaskService();
taskService.start(taskId, actorId);
taskService.complete(taskId, actorId, data);
It works fine, now I want to save task Status between start and complete in different moments, but I don't know How to pass the data Map in order to hold the actual State.
taskService.suspend(taskId, actorId);
Upvotes: 1
Views: 949
Reputation: 4153
You can take a look at the implementation of the Save operation in the jbpm console. That's done via saving the output values of the task as far as remember. By the way, suspend is not the right method to call to save the state, because it means a completely different thing. You can start looking at here: https://github.com/droolsjbpm/jbpm-console-ng/blob/master/jbpm-console-ng-human-tasks-forms/jbpm-console-ng-human-tasks-forms-client/src/main/java/org/jbpm/console/ng/ht/forms/client/editors/taskform/FormDisplayPresenter.java
and go down to the actual implementation.
Regards
Upvotes: 1