08-17-2015 01:46 PM
@Named
public class TaskManager {
@Inject
private TaskService taskService;
@Inject
private RuntimeService runtimeService;
public void completeTask(CompleteTaskParam param) {
// set some local variables on execution and task, for example:
runtimeService.setVariableLocal(param.getExecutionId(), "var1", "1234");
taskService.setVariableLocal(param.getTaskId(), "var2", "3456");
try {
// completing task
taskService.complete(param.getTaskId());
} catch(Exception e) {
// revert variables
runtimeService.removeVariableLocal(param.getExecutionId(), "var1");
taskService.removeVariableLocal(param.getTaskId(), "var2");
throw e;
}
}
}
08-18-2015 01:21 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.