@Test public void testGetErrorInfo() { Response response = resource.getInstanceInError("test", "xxxxx"); assertThat(response).isNotNull(); verify(responseBuilder, times(1)).status((StatusType) Status.OK); verify(responseBuilder, times(1)).entity(any()); verify(processInstance, times(2)).error(); verify(error, times(0)).retrigger(); verify(error, times(0)).skip(); verify(resource).doGetInstanceInError(PROCESS_ID, PROCESS_INSTANCE_ID); }
@Override @GET @Path("{processId}/instances/{processInstanceId}/error") @Produces(MediaType.APPLICATION_JSON) public Response getInstanceInError(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId) { return doGetInstanceInError(processId, processInstanceId); }
ProcessInstanceManagementResource extends BaseProcessInstanceManagementResource<Response> { @Override @GET @Path("{processId}/instances/{processInstanceId}/error") @Produces(MediaType.APPLICATION_JSON) public Response getInstanceInError(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId) { return doGetInstanceInError(processId, processInstanceId); } }
ProcessInstanceManagementResource extends BaseProcessInstanceManagementResource<Response> { @Override @GET @Path("{processId}/instances/{processInstanceId}/error") @Produces(MediaType.APPLICATION_JSON) public Response getInstanceInError(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId) { return doGetInstanceInError(processId, processInstanceId); } ProcessInstanceManagementResource(); @Inject  ProcessInstanceManagementResource(Processes processes, Application application); }
ProcessInstanceManagementResource extends BaseProcessInstanceManagementResource<Response> { @Override @GET @Path("{processId}/instances/{processInstanceId}/error") @Produces(MediaType.APPLICATION_JSON) public Response getInstanceInError(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId) { return doGetInstanceInError(processId, processInstanceId); } ProcessInstanceManagementResource(); @Inject  ProcessInstanceManagementResource(Processes processes, Application application); @Override @GET @Path("{processId}/nodes") @Produces(MediaType.APPLICATION_JSON) Response getProcessNodes(@PathParam("processId") String processId); @Override @GET @Path("{processId}/instances/{processInstanceId}/error") @Produces(MediaType.APPLICATION_JSON) Response getInstanceInError(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId); @Override @GET @Path("{processId}/instances/{processInstanceId}/nodeInstances") @Produces(MediaType.APPLICATION_JSON) Response getWorkItemsInProcessInstance(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId); @Override @POST @Path("{processId}/instances/{processInstanceId}/retrigger") @Produces(MediaType.APPLICATION_JSON) Response retriggerInstanceInError(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId); @Override @POST @Path("{processId}/instances/{processInstanceId}/skip") @Produces(MediaType.APPLICATION_JSON) Response skipInstanceInError(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId); @Override @POST @Path("{processId}/instances/{processInstanceId}/nodes/{nodeId}") @Produces(MediaType.APPLICATION_JSON) Response triggerNodeInstanceId(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId, @PathParam("nodeId") String nodeId); @Override @POST @Path("{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}") @Produces(MediaType.APPLICATION_JSON) Response retriggerNodeInstanceId(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId, @PathParam("nodeInstanceId") String nodeInstanceId); @Override @DELETE @Path("{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}") @Produces(MediaType.APPLICATION_JSON) Response cancelNodeInstanceId(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId, @PathParam("nodeInstanceId") String nodeInstanceId); @Override @DELETE @Path("{processId}/instances/{processInstanceId}") @Produces(MediaType.APPLICATION_JSON) Response cancelProcessInstanceId(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId); }
ProcessInstanceManagementResource extends BaseProcessInstanceManagementResource<Response> { @Override @GET @Path("{processId}/instances/{processInstanceId}/error") @Produces(MediaType.APPLICATION_JSON) public Response getInstanceInError(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId) { return doGetInstanceInError(processId, processInstanceId); } ProcessInstanceManagementResource(); @Inject  ProcessInstanceManagementResource(Processes processes, Application application); @Override @GET @Path("{processId}/nodes") @Produces(MediaType.APPLICATION_JSON) Response getProcessNodes(@PathParam("processId") String processId); @Override @GET @Path("{processId}/instances/{processInstanceId}/error") @Produces(MediaType.APPLICATION_JSON) Response getInstanceInError(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId); @Override @GET @Path("{processId}/instances/{processInstanceId}/nodeInstances") @Produces(MediaType.APPLICATION_JSON) Response getWorkItemsInProcessInstance(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId); @Override @POST @Path("{processId}/instances/{processInstanceId}/retrigger") @Produces(MediaType.APPLICATION_JSON) Response retriggerInstanceInError(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId); @Override @POST @Path("{processId}/instances/{processInstanceId}/skip") @Produces(MediaType.APPLICATION_JSON) Response skipInstanceInError(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId); @Override @POST @Path("{processId}/instances/{processInstanceId}/nodes/{nodeId}") @Produces(MediaType.APPLICATION_JSON) Response triggerNodeInstanceId(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId, @PathParam("nodeId") String nodeId); @Override @POST @Path("{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}") @Produces(MediaType.APPLICATION_JSON) Response retriggerNodeInstanceId(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId, @PathParam("nodeInstanceId") String nodeInstanceId); @Override @DELETE @Path("{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}") @Produces(MediaType.APPLICATION_JSON) Response cancelNodeInstanceId(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId, @PathParam("nodeInstanceId") String nodeInstanceId); @Override @DELETE @Path("{processId}/instances/{processInstanceId}") @Produces(MediaType.APPLICATION_JSON) Response cancelProcessInstanceId(@PathParam("processId") String processId, @PathParam("processInstanceId") String processInstanceId);  }