Java Code Examples for org.activiti.engine.history.HistoricProcessInstance#getStartTime()

The following examples show how to use org.activiti.engine.history.HistoricProcessInstance#getStartTime() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ActivitiTypeConverter.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
public WorkflowInstance convertToInstanceAndSetVariables(HistoricProcessInstance historicProcessInstance, Map<String, Object> collectedVariables)
{
    String processInstanceId = historicProcessInstance.getId();
    String id = processInstanceId;
    ProcessDefinition procDef = activitiUtil.getProcessDefinition(historicProcessInstance.getProcessDefinitionId());
    WorkflowDefinition definition = convert(procDef);
    
    // Set process variables based on historic detail query
    Map<String, Object> variables = propertyConverter.getHistoricProcessVariables(processInstanceId);
    
    Date startDate = historicProcessInstance.getStartTime();
    Date endDate = historicProcessInstance.getEndTime();

    // Copy all variables to map, if not null
    if(collectedVariables != null)
    {
    	collectedVariables.putAll(variables);
    }
    boolean isActive = endDate == null;
    return factory.createInstance(id, definition, variables, isActive, startDate, endDate);
}
 
Example 2
Source File: ProcessInstanceRepresentation.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
public ProcessInstanceRepresentation(HistoricProcessInstance processInstance, boolean graphicalNotation, User startedBy) {
    this.id = processInstance.getId();
    this.name = processInstance.getName();
    this.businessKey = processInstance.getBusinessKey();
    this.processDefinitionId = processInstance.getProcessDefinitionId();
    this.tenantId = processInstance.getTenantId();
    this.graphicalNotationDefined = graphicalNotation;
    this.started = processInstance.getStartTime();
    this.ended = processInstance.getEndTime();
    this.startedBy = new UserRepresentation(startedBy);
}
 
Example 3
Source File: ProcessInfo.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 5 votes vote down vote up
public ProcessInfo(HistoricProcessInstance processInstance)
{
    this.id = processInstance.getId();
    this.processDefinitionId = processInstance.getProcessDefinitionId();
    this.startedAt = processInstance.getStartTime();
    this.endedAt = processInstance.getEndTime();
    this.durationInMs = processInstance.getDurationInMillis();
    this.deleteReason = processInstance.getDeleteReason();
    this.startUserId = processInstance.getStartUserId();
    this.startActivityId = processInstance.getStartActivityId();
    this.endActivityId = processInstance.getEndActivityId();
    this.businessKey = processInstance.getBusinessKey();
    this.superProcessInstanceId = processInstance.getSuperProcessInstanceId();
    this.completed = (processInstance.getEndTime() != null);
}