Пример #1
0
  /** Set Task Instance Actor Id */
  public static void setTaskInstanceActorId(long taskInstanceId, String actorId)
      throws WorkflowException {
    log.debug("setTaskInstanceActorId({}, {})", new Object[] {taskInstanceId, actorId});
    JbpmContext jbpmContext = JBPMUtils.getConfig().createJbpmContext();

    try {
      org.jbpm.taskmgmt.exe.TaskInstance ti = jbpmContext.getTaskInstance(taskInstanceId);
      ti.setActorId(actorId);
      jbpmContext.getSession().flush();
    } catch (JbpmException e) {
      throw new WorkflowException(e.getMessage(), e);
    } finally {
      jbpmContext.close();
    }

    log.debug("setTaskInstanceActorId: void");
  }
Пример #2
0
 /**
  * convenience method that combines a {@link #setActorId(String,boolean)} and a {@link #start()}.
  */
 public void start(String actorId, boolean overwriteSwimlane) {
   setActorId(actorId, overwriteSwimlane);
   start();
 }
Пример #3
0
 /**
  * (re)assign this task to the given actor. If this task is related to a swimlane instance, that
  * swimlane instance will be updated as well.
  */
 public void setActorId(String actorId) {
   setActorId(actorId, true);
 }
Пример #4
0
 /**
  * copies the assignment (that includes both the swimlaneActorId and the set of pooledActors) of
  * the given swimlane into this taskInstance.
  */
 public void copySwimlaneInstanceAssignment(SwimlaneInstance swimlaneInstance) {
   setSwimlaneInstance(swimlaneInstance);
   setActorId(swimlaneInstance.getActorId());
   setPooledActors(swimlaneInstance.getPooledActors());
 }
 public Object execute(JbpmContext jbpmContext) throws Exception {
   TaskInstance ti = jbpmContext.getTaskInstance(taskInstanceId);
   ti.setActorId(null);
   ti.setStart(null);
   return null;
 }