public ActivityInstance toActivityInstance(boolean includeWorkState) {
   ActivityInstance activityInstance = new ActivityInstance();
   activityInstance.setId(id);
   activityInstance.setActivityId(activity.id);
   activityInstance.setCalledWorkflowInstanceId(calledWorkflowInstanceId);
   toScopeInstance(activityInstance, includeWorkState);
   if (includeWorkState) {
     activityInstance.setPropertyOpt("workState", workState);
   }
   return activityInstance;
 }
Esempio n. 2
0
 public Task getTaskByActivityId(String activityId, WorkflowInstance workflowInstance) {
   ActivityInstance activityInstance = workflowInstance.findOpenActivityInstance(activityId);
   return taskService.findTaskById(activityInstance.getTaskId());
 }