Search in sources :

Example 1 with HistoricActivityInstanceResponse

use of org.activiti.rest.service.api.history.HistoricActivityInstanceResponse in project Activiti by Activiti.

the class RestResponseFactory method createHistoricActivityInstanceResponse.

public HistoricActivityInstanceResponse createHistoricActivityInstanceResponse(HistoricActivityInstance activityInstance, RestUrlBuilder urlBuilder) {
    HistoricActivityInstanceResponse result = new HistoricActivityInstanceResponse();
    result.setActivityId(activityInstance.getActivityId());
    result.setActivityName(activityInstance.getActivityName());
    result.setActivityType(activityInstance.getActivityType());
    result.setAssignee(activityInstance.getAssignee());
    result.setCalledProcessInstanceId(activityInstance.getCalledProcessInstanceId());
    result.setDurationInMillis(activityInstance.getDurationInMillis());
    result.setEndTime(activityInstance.getEndTime());
    result.setExecutionId(activityInstance.getExecutionId());
    result.setId(activityInstance.getId());
    result.setProcessDefinitionId(activityInstance.getProcessDefinitionId());
    result.setProcessDefinitionUrl(urlBuilder.buildUrl(RestUrls.URL_PROCESS_DEFINITION, activityInstance.getProcessDefinitionId()));
    result.setProcessInstanceId(activityInstance.getProcessInstanceId());
    result.setProcessInstanceUrl(urlBuilder.buildUrl(RestUrls.URL_HISTORIC_PROCESS_INSTANCE, activityInstance.getId()));
    result.setStartTime(activityInstance.getStartTime());
    result.setTaskId(activityInstance.getTaskId());
    result.setTenantId(activityInstance.getTenantId());
    return result;
}
Also used : HistoricActivityInstanceResponse(org.activiti.rest.service.api.history.HistoricActivityInstanceResponse)

Example 2 with HistoricActivityInstanceResponse

use of org.activiti.rest.service.api.history.HistoricActivityInstanceResponse in project Activiti by Activiti.

the class RestResponseFactory method createHistoricActivityInstanceResponseList.

public List<HistoricActivityInstanceResponse> createHistoricActivityInstanceResponseList(List<HistoricActivityInstance> activityInstances) {
    RestUrlBuilder urlBuilder = createUrlBuilder();
    List<HistoricActivityInstanceResponse> responseList = new ArrayList<HistoricActivityInstanceResponse>();
    for (HistoricActivityInstance instance : activityInstances) {
        responseList.add(createHistoricActivityInstanceResponse(instance, urlBuilder));
    }
    return responseList;
}
Also used : HistoricActivityInstanceResponse(org.activiti.rest.service.api.history.HistoricActivityInstanceResponse) ArrayList(java.util.ArrayList) HistoricActivityInstance(org.activiti.engine.history.HistoricActivityInstance)

Aggregations

HistoricActivityInstanceResponse (org.activiti.rest.service.api.history.HistoricActivityInstanceResponse)2 ArrayList (java.util.ArrayList)1 HistoricActivityInstance (org.activiti.engine.history.HistoricActivityInstance)1