Search in sources :

Example 11 with RequestInfoInstanceList

use of org.kie.server.api.model.instance.RequestInfoInstanceList in project droolsjbpm-integration by kiegroup.

the class ExecutorServiceBase method getRequestsByProcessInstance.

public RequestInfoInstanceList getRequestsByProcessInstance(Number processInstanceId, List<String> statuses, Integer page, Integer pageSize) {
    List<STATUS> statusList = convertStatusList(statuses);
    List<RequestInfo> requests = executorService.getRequestsByProcessInstance(processInstanceId.longValue(), statusList, buildQueryContext(page, pageSize));
    RequestInfoInstanceList result = convertToRequestInfoList(requests, false, false);
    return result;
}
Also used : STATUS(org.kie.api.executor.STATUS) RequestInfoInstanceList(org.kie.server.api.model.instance.RequestInfoInstanceList) RequestInfo(org.kie.api.executor.RequestInfo)

Example 12 with RequestInfoInstanceList

use of org.kie.server.api.model.instance.RequestInfoInstanceList in project droolsjbpm-integration by kiegroup.

the class ExecutorServiceBase method getRequestsByBusinessKey.

public RequestInfoInstanceList getRequestsByBusinessKey(String businessKey, List<String> statuses, Integer page, Integer pageSize) {
    List<STATUS> statusList = convertStatusList(statuses);
    List<RequestInfo> requests = executorService.getRequestsByBusinessKey(businessKey, statusList, buildQueryContext(page, pageSize));
    RequestInfoInstanceList result = convertToRequestInfoList(requests, false, false);
    return result;
}
Also used : STATUS(org.kie.api.executor.STATUS) RequestInfoInstanceList(org.kie.server.api.model.instance.RequestInfoInstanceList) RequestInfo(org.kie.api.executor.RequestInfo)

Example 13 with RequestInfoInstanceList

use of org.kie.server.api.model.instance.RequestInfoInstanceList in project droolsjbpm-integration by kiegroup.

the class ExecutorServiceBase method getRequestsByBusinessKey.

public RequestInfoInstanceList getRequestsByBusinessKey(String businessKey, Integer page, Integer pageSize) {
    List<RequestInfo> requests = executorService.getRequestsByBusinessKey(businessKey, buildQueryContext(page, pageSize));
    RequestInfoInstanceList result = convertToRequestInfoList(requests, false, false);
    return result;
}
Also used : RequestInfoInstanceList(org.kie.server.api.model.instance.RequestInfoInstanceList) RequestInfo(org.kie.api.executor.RequestInfo)

Example 14 with RequestInfoInstanceList

use of org.kie.server.api.model.instance.RequestInfoInstanceList in project droolsjbpm-integration by kiegroup.

the class ExecutorServiceBase method convertToRequestInfoList.

// utility methods for conversion
protected RequestInfoInstanceList convertToRequestInfoList(List<RequestInfo> requests, boolean withErrors, boolean withData) {
    RequestInfoInstance[] requestInfos = new RequestInfoInstance[requests.size()];
    int index = 0;
    for (RequestInfo request : requests) {
        requestInfos[index] = convertToRequestInfo(request, withErrors, withData);
        index++;
    }
    return new RequestInfoInstanceList(requestInfos);
}
Also used : RequestInfoInstance(org.kie.server.api.model.instance.RequestInfoInstance) RequestInfoInstanceList(org.kie.server.api.model.instance.RequestInfoInstanceList) RequestInfo(org.kie.api.executor.RequestInfo)

Example 15 with RequestInfoInstanceList

use of org.kie.server.api.model.instance.RequestInfoInstanceList in project droolsjbpm-integration by kiegroup.

the class ExecutorServiceBase method getRequestsByCommand.

public RequestInfoInstanceList getRequestsByCommand(String command, Integer page, Integer pageSize) {
    List<RequestInfo> requests = executorService.getRequestsByCommand(command, buildQueryContext(page, pageSize));
    RequestInfoInstanceList result = convertToRequestInfoList(requests, false, false);
    return result;
}
Also used : RequestInfoInstanceList(org.kie.server.api.model.instance.RequestInfoInstanceList) RequestInfo(org.kie.api.executor.RequestInfo)

Aggregations

RequestInfoInstanceList (org.kie.server.api.model.instance.RequestInfoInstanceList)21 RequestInfo (org.kie.api.executor.RequestInfo)8 ServiceResponse (org.kie.server.api.model.ServiceResponse)8 HashMap (java.util.HashMap)7 CommandScript (org.kie.server.api.commands.CommandScript)7 DescriptorCommand (org.kie.server.api.commands.DescriptorCommand)7 KieServerCommand (org.kie.server.api.model.KieServerCommand)7 ApiOperation (io.swagger.annotations.ApiOperation)5 ApiResponses (io.swagger.annotations.ApiResponses)5 GET (javax.ws.rs.GET)5 Produces (javax.ws.rs.Produces)5 Variant (javax.ws.rs.core.Variant)5 STATUS (org.kie.api.executor.STATUS)5 Header (org.kie.server.remote.rest.common.Header)5 RestUtils.buildConversationIdHeader (org.kie.server.remote.rest.common.util.RestUtils.buildConversationIdHeader)5 RestUtils.createCorrectVariant (org.kie.server.remote.rest.common.util.RestUtils.createCorrectVariant)5 RestUtils.getVariant (org.kie.server.remote.rest.common.util.RestUtils.getVariant)5 Path (javax.ws.rs.Path)4 RouteBuilder (org.apache.camel.builder.RouteBuilder)1 KieServerInfo (org.kie.server.api.model.KieServerInfo)1