Ejemplo n.º 1
0
 private void signalStartTask(WorkflowPath path) {
   List<WorkflowTask> tasks = workflowService.getTasksForWorkflowPath(path.getId());
   if (tasks.size() == 1) {
     WorkflowTask startTask = tasks.get(0);
     workflowService.endTask(startTask.getId(), null);
   } else {
     throw new WorkflowException(
         "Start task not found! Expected 1 task but found: " + tasks.size());
   }
 }
Ejemplo n.º 2
0
 public WorkflowInstance build() {
   NodeRef packageRef = packageMgr.create(packageNode);
   params.put(WorkflowModel.ASSOC_PACKAGE, packageRef);
   WorkflowPath path = workflowService.startWorkflow(definition.getId(), params);
   signalStartTask(path);
   return path.getInstance();
 }
  @Override
  public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException {

    int workflowDefinitionSize = workflowService.getAllDefinitions().size();
    Integer remainingDays = licenseService.getLicense().getRemainingDays();
  }