Search in sources :

Example 1 with HistoricVariableInstanceResponse

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

the class RestResponseFactory method createHistoricVariableInstanceResponse.

public HistoricVariableInstanceResponse createHistoricVariableInstanceResponse(HistoricVariableInstance variableInstance, RestUrlBuilder urlBuilder) {
    HistoricVariableInstanceResponse result = new HistoricVariableInstanceResponse();
    result.setId(variableInstance.getId());
    result.setProcessInstanceId(variableInstance.getProcessInstanceId());
    if (variableInstance.getProcessInstanceId() != null) {
        result.setProcessInstanceUrl(urlBuilder.buildUrl(RestUrls.URL_HISTORIC_PROCESS_INSTANCE, variableInstance.getProcessInstanceId()));
    }
    result.setTaskId(variableInstance.getTaskId());
    result.setVariable(createRestVariable(variableInstance.getVariableName(), variableInstance.getValue(), null, variableInstance.getId(), VARIABLE_HISTORY_VARINSTANCE, false, urlBuilder));
    return result;
}
Also used : HistoricVariableInstanceResponse(org.activiti.rest.service.api.history.HistoricVariableInstanceResponse)

Example 2 with HistoricVariableInstanceResponse

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

the class RestResponseFactory method createHistoricVariableInstanceResponseList.

public List<HistoricVariableInstanceResponse> createHistoricVariableInstanceResponseList(List<HistoricVariableInstance> variableInstances) {
    RestUrlBuilder urlBuilder = createUrlBuilder();
    List<HistoricVariableInstanceResponse> responseList = new ArrayList<HistoricVariableInstanceResponse>();
    for (HistoricVariableInstance instance : variableInstances) {
        responseList.add(createHistoricVariableInstanceResponse(instance, urlBuilder));
    }
    return responseList;
}
Also used : HistoricVariableInstanceResponse(org.activiti.rest.service.api.history.HistoricVariableInstanceResponse) ArrayList(java.util.ArrayList) HistoricVariableInstance(org.activiti.engine.history.HistoricVariableInstance)

Aggregations

HistoricVariableInstanceResponse (org.activiti.rest.service.api.history.HistoricVariableInstanceResponse)2 ArrayList (java.util.ArrayList)1 HistoricVariableInstance (org.activiti.engine.history.HistoricVariableInstance)1