Package org.activiti.engine.history

Examples of org.activiti.engine.history.HistoricProcessInstance


    }

    private void cleanProcessInstanceHistory(HistoryService hs, String... instances) {
        for (String instanceId : instances) {
            // query and if exists delete.
            HistoricProcessInstance hpi = hs.createHistoricProcessInstanceQuery()
                .processInstanceId(instanceId).singleResult();
            if (hpi != null) {
                hs.deleteHistoricProcessInstance(hpi.getId());
                out().printf("History removed for process instance %s \n", hpi.getId());
            } else {
                out().printf("No History found for process instance %s \n", instanceId);
            }
        }
    }
View Full Code Here


        String processInstanceId = processInstance.getId();

        LOG.info("Started process instance id " + processInstanceId);
        runtimeService.createProcessInstanceQuery().count();

        HistoricProcessInstance historicProcessInstance = processEngine
            .getHistoryService().createHistoricProcessInstanceQuery()
            .processInstanceId(processInstanceId).singleResult();

        if (historicProcessInstance != null) {
            LOG.info("Finished " + processKey + "Instance. took "
                + historicProcessInstance.getDurationInMillis() + " millis");
        }
        return processInstance;
    }
View Full Code Here

TOP

Related Classes of org.activiti.engine.history.HistoricProcessInstance

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.