Package org.jbpm.pvm.internal.model

Examples of org.jbpm.pvm.internal.model.ExecutionImpl


    DbSession dbSession = Environment.getFromCurrent(DbSession.class);
   
    dbSession.save(variable);

    HistoryProcessInstanceImpl historyProcessInstance = null;
    ExecutionImpl processInstance = variable.getProcessInstance();
    if (processInstance!=null) {
      long processInstanceDbid = processInstance.getDbid();
      historyProcessInstance = (HistoryProcessInstanceImpl)
          dbSession.get(HistoryProcessInstanceImpl.class, processInstanceDbid);
    }
   
    HistoryTaskImpl historyTask = null;
View Full Code Here


    this.state = state;
  }

  public Object execute(Environment environment) throws Exception {
    DbSession dbSession = Environment.getFromCurrent(DbSession.class);
    ExecutionImpl processInstance = (ExecutionImpl) dbSession.findProcessInstanceById(processInstanceId);
    processInstance.end(state);
    return null;
  }
View Full Code Here

  }
 
  public void process() {
    DbSession dbSession = Environment.getFromCurrent(DbSession.class);

    ExecutionImpl processInstance = execution.getProcessInstance();
    long processInstanceDbid = processInstance.getDbid();

    HistoryProcessInstance historyProcessInstance =
        dbSession.get(HistoryProcessInstanceImpl.class, processInstanceDbid);
   
    HistoryTaskImpl historyTask = new HistoryTaskImpl(task);
View Full Code Here

        }
        session.delete(historyProcessInstance);
      }
    }
   
    ExecutionImpl processInstance = (ExecutionImpl) findProcessInstanceByIdIgnoreSuspended(processInstanceId);
    if (processInstance!=null) {
      // delete remaining tasks for this process instance
      List<TaskImpl> tasks = findTasks(processInstanceId);
      for (TaskImpl task: tasks) {
        session.delete(task);
View Full Code Here

* @author Tom Baeyens
*/
public abstract class AsyncContinuations {
 
  public static void restoreState(ExecutionImpl execution) {
    ExecutionImpl parent = execution.getParent();
    if ( (parent!=null)
         && (Execution.STATE_INACTIVE_CONCURRENT_ROOT.equals(parent.getState()))
       ) {
      execution.setState(Execution.STATE_ACTIVE_CONCURRENT);
    } else {
      execution.setState(Execution.STATE_ACTIVE_ROOT);
    }
View Full Code Here

      execution.performAtomicOperation(AtomicOperation.EXECUTE_ACTIVITY);
  
    } else {
      execution.setActivity(activity);

      ExecutionImpl propagatingExecution = execution;
      if (activity.isLocalScope()) {
        propagatingExecution = execution.createScope(activity);
      }

      propagatingExecution.fire(Event.START, activity, AtomicOperation.TRANSITION_START_ACTIVITY);
    }
  }
View Full Code Here

  }

  public void perform(ExecutionImpl execution) {
    ActivityImpl activity = execution.getActivity();
   
    ExecutionImpl propagatingExecution = execution;
    if (activity.isLocalScope()) {
      propagatingExecution = execution.destroyScope(activity);
    }

    ActivityImpl parentActivity = activity.getParentActivity();
    ActivityImpl destination = execution.getTransition().getDestination();
    if ( (parentActivity!=null)
         && (!parentActivity.contains(destination))
       ) {
      propagatingExecution.setActivity(parentActivity);
      propagatingExecution.fire(Event.END, parentActivity, AtomicOperation.TRANSITION_END_ACTIVITY);
    } else {
      propagatingExecution.performAtomicOperation(AtomicOperation.TRANSITION_TAKE);
    }
  }
View Full Code Here

  }

  // JDBC - object translation
 
  public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
    ExecutionImpl execution = createExecution(owner);
    String activityName = rs.getString(names[0]);
    ActivityImpl activity = (ActivityImpl) execution.getProcessDefinition().getActivity(activityName);
    execution.setActivity(activity);
    execution.setState(Execution.STATE_ACTIVE_ROOT);
    return execution;
  }
View Full Code Here

    execution.setState(Execution.STATE_ACTIVE_ROOT);
    return execution;
  }

  private ExecutionImpl createExecution(Object owner) {
    ExecutionImpl execution = new ExecutionImpl();
    execution.setProcessDefinition(getProcessDefinition(owner));
    return execution;
  }
View Full Code Here

    return processDefinition;
  }

  public void nullSafeSet(PreparedStatement st, Object owner, int index) throws HibernateException, SQLException {
    if (owner!=null) {
      ExecutionImpl execution = (ExecutionImpl) owner;
      String activityName = execution.getActivity().getName();
      log.trace("binding 'execution-state{"+activityName+"}' to parameter: "+index);
      st.setString(index, activityName);
    }
  }
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.model.ExecutionImpl

Copyright © 2018 www.massapicom. 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.