Package org.jbpm.api.history

Examples of org.jbpm.api.history.HistoryProcessInstance


      HistoryService histService = this.processEngine.getHistoryService();
      for(ProcessInstanceRef inst : results)
      {
        HistoryProcessInstanceQuery hQuery = histService.createHistoryProcessInstanceQuery();
        hQuery.processInstanceId(inst.getId());
        HistoryProcessInstance entry = hQuery.uniqueResult();
        inst.setStartDate(entry.getStartTime());
      }

      return results;
    }
    finally
View Full Code Here


     *         process IDs
     */
    public List<HistoryWorkflow> getHistoryWorkflows(List<String> processIds, Locale locale) {
        List<HistoryWorkflow> historyItems = new LinkedList<HistoryWorkflow>();
        for (String processId : processIds) {
            HistoryProcessInstance jbpmHistoryItem = null;
            try {
                jbpmHistoryItem =
                        historyService.createHistoryProcessInstanceQuery().processInstanceId(processId).uniqueResult();
            } catch (JbpmException e) {
                logger.error(e.getMessage(), e);
View Full Code Here

public class ProcessInstanceCreate extends HistoryEvent implements Serializable {

  private static final long serialVersionUID = 1L;
 
  public void process() {
    HistoryProcessInstance historyProcessInstanceImpl = new HistoryProcessInstanceImpl(execution);
    Session session = Environment.getFromCurrent(Session.class);
    session.save(historyProcessInstanceImpl);
  }
View Full Code Here

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

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

    HistoryProcessInstance historyProcessInstanceImpl = (HistoryProcessInstance)
        dbSession.get(HistoryProcessInstanceImpl.class, processInstanceDbid);
   
    HistoryActivityInstanceImpl historyActivityInstance =
        createHistoryActivityInstance(historyProcessInstanceImpl);
   
View Full Code Here

    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);
    historyTask.setExecutionId(execution.getId());
   
View Full Code Here

           addJoinAndForkElements(res,processGraphElements);
           
           
            HistoryProcessInstanceQuery historyProcessInstanceQuery = processEngine.getHistoryService()
                    .createHistoryProcessInstanceQuery().processInstanceId(pi.getInternalId());
            HistoryProcessInstance historyProcessInstance = historyProcessInstanceQuery.uniqueResult();
            if (historyProcessInstance != null && historyProcessInstance.getEndActivityName() != null) {
                StateNode sn = (StateNode) processGraphElements.get(historyProcessInstance.getEndActivityName());
                if (sn != null) {
                    StateNode e = sn.cloneNode();
                    e.setUnfinished(true);
                    res.add(e);
                }
View Full Code Here

            org.jbpm.api.ProcessInstance processInstanceById = executionService.findProcessInstanceById(pi.getInternalId());
            String processDefinitionId;
            if (processInstanceById == null) { //look in history service
                HistoryProcessInstanceQuery historyProcessInstanceQuery = processEngine.getHistoryService()
                        .createHistoryProcessInstanceQuery().processInstanceId(pi.getInternalId());
                HistoryProcessInstance historyProcessInstance = historyProcessInstanceQuery.uniqueResult();
                processDefinitionId = historyProcessInstance.getProcessDefinitionId();
            } else {
                processDefinitionId = processInstanceById.getProcessDefinitionId();
            }
            List<ProcessDefinition> latestList = service.createProcessDefinitionQuery()
                    .processDefinitionId(processDefinitionId).orderDesc("deployment.dbid").page(0, 1).list();
View Full Code Here

public class ProcessInstanceCreate extends HistoryEvent implements Serializable {

  private static final long serialVersionUID = 1L;
 
  public void process() {
    HistoryProcessInstance historyProcessInstanceImpl = new HistoryProcessInstanceImpl(execution);
    Session session = EnvironmentImpl.getFromCurrent(Session.class);
    session.save(historyProcessInstanceImpl);
  }
View Full Code Here

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

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

    HistoryProcessInstance historyProcessInstanceImpl = (HistoryProcessInstance)
        dbSession.get(HistoryProcessInstanceImpl.class, processInstanceDbid);
   
    HistoryActivityInstanceImpl historyActivityInstance =
        createHistoryActivityInstance(historyProcessInstanceImpl);
   
View Full Code Here

    DbSession dbSession = EnvironmentImpl.getFromCurrent(DbSession.class);

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

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

TOP

Related Classes of org.jbpm.api.history.HistoryProcessInstance

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.