Package org.jbpm.taskmgmt.exe

Examples of org.jbpm.taskmgmt.exe.TaskInstance.end()


            }
            final TaskInstance taskInstance = (TaskInstance) taskInstanceValue;
            if (transitionExpression != null) {
                final Object transitionValue = transitionExpression.getValue(elContext);
                if (transitionValue == null) {
                    taskInstance.end();
                } else if (transitionValue instanceof Transition) {
                    taskInstance.end((Transition)transitionValue);
                } else {
                    final String transitionName = transitionValue.toString();
                    taskInstance.end(transitionName);
View Full Code Here


            if (transitionExpression != null) {
                final Object transitionValue = transitionExpression.getValue(elContext);
                if (transitionValue == null) {
                    taskInstance.end();
                } else if (transitionValue instanceof Transition) {
                    taskInstance.end((Transition)transitionValue);
                } else {
                    final String transitionName = transitionValue.toString();
                    taskInstance.end(transitionName);
                }
            } else {
View Full Code Here

                    taskInstance.end();
                } else if (transitionValue instanceof Transition) {
                    taskInstance.end((Transition)transitionValue);
                } else {
                    final String transitionName = transitionValue.toString();
                    taskInstance.end(transitionName);
                }
            } else {
                taskInstance.end();
            }
            context.addSuccessMessage("Task completed");
View Full Code Here

                } else {
                    final String transitionName = transitionValue.toString();
                    taskInstance.end(transitionName);
                }
            } else {
                taskInstance.end();
            }
            context.addSuccessMessage("Task completed");
            context.getJbpmContext().getSession().flush();
            context.selectOutcome("success");
        } catch (Exception ex) {
View Full Code Here

      taskInstance.getContextInstance().addVariables(variables);
    }

    if (transitionName == null)
    {
      taskInstance.end();
    }
    else
    {
      taskInstance.end(transitionName);
    }
View Full Code Here

    {
      taskInstance.end();
    }
    else
    {
      taskInstance.end(transitionName);
    }
    return taskInstance;
  }

  protected TaskInstance getTaskInstance(JbpmContext jbpmContext)
View Full Code Here

    log.info("");
    List taskList = jbpmContext.getTaskList("ernie");
    assertEquals(1, taskList.size());
    TaskInstance taskInstance = (TaskInstance) taskList.get(0);
    taskInstance.setVariable("item", "cookies");
    taskInstance.end();

    newTransaction();
   
    log.info("");
    log.info("=== PERFORMING TASK TWO =======================================================");
View Full Code Here

  }

  public static void endOneTask(Token token) {
    TaskMgmtInstance tmi = (TaskMgmtInstance)token.getProcessInstance().getInstance(TaskMgmtInstance.class);
    TaskInstance taskInstance = (TaskInstance) tmi.getUnfinishedTasks(token).iterator().next();
    taskInstance.end();
  }
}
View Full Code Here

    log.info("");
    taskList = jbpmContext.getTaskList("ernie");
    assertEquals(1, taskList.size());
    taskInstance = (TaskInstance) taskList.get(0);
    taskInstance.setVariable("delivery address", "sesame street");
    taskInstance.end();
  }
 
  private static final Log log = LogFactory.getLog(TaskWithVariablesTest.class);
}
View Full Code Here

    // Now, we check if the taskInstance was actually assigned to 'papa'.
    assertEquals("papa", taskInstance.getActorId() );
   
    // Now suppose that 'papa' has done his duties and marks the task
    // as done.
    taskInstance.end();
    // Since this was the last (only) task to do, the completion of this
    // task triggered the continuation of the process instance execution.
   
    assertSame(processDefinition.getNode("end"), token.getNode());
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.