use of org.kie.kogito.event.process.ProcessInstanceDataEvent in project kogito-apps by kiegroup.
the class AbstractGraphQLRuntimesQueriesIT method testProcessInstanceDiagram.
@Test
void testProcessInstanceDiagram() {
String processInstanceId = UUID.randomUUID().toString();
ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null);
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"query { ProcessInstances (where: { id: {equal: \\\"" + processInstanceId + "\\\"}}) {diagram} }\" }");
verify(dataIndexApiClient).getProcessInstanceDiagram(eq("http://localhost:8080"), eq(getProcessInstance(processId, processInstanceId, 1, null, null)));
}
use of org.kie.kogito.event.process.ProcessInstanceDataEvent in project kogito-apps by kiegroup.
the class AbstractGraphQLRuntimesQueriesIT method testProcessInstanceAbort.
@Test
void testProcessInstanceAbort() {
String processInstanceId = UUID.randomUUID().toString();
ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null);
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"mutation{ ProcessInstanceAbort ( id: \\\"" + processInstanceId + "\\\")}\"}");
verify(dataIndexApiClient).abortProcessInstance(eq("http://localhost:8080"), eq(getProcessInstance(processId, processInstanceId, 1, null, null)));
}
use of org.kie.kogito.event.process.ProcessInstanceDataEvent in project kogito-apps by kiegroup.
the class AbstractGraphQLRuntimesQueriesIT method testNodeInstanceCancel.
@Test
void testNodeInstanceCancel() {
String nodeInstanceId = "nodeInstanceIdToCancel";
String processInstanceId = UUID.randomUUID().toString();
ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null);
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"mutation{ NodeInstanceCancel ( id: \\\"" + processInstanceId + "\\\", nodeInstanceId: \\\"" + nodeInstanceId + "\\\")}\"}");
verify(dataIndexApiClient).cancelNodeInstance(eq("http://localhost:8080"), eq(getProcessInstance(processId, processInstanceId, 1, null, null)), eq(nodeInstanceId));
}
use of org.kie.kogito.event.process.ProcessInstanceDataEvent in project kogito-apps by kiegroup.
the class AbstractGraphQLRuntimesQueriesIT method testNodeInstanceTrigger.
@Test
void testNodeInstanceTrigger() {
String nodeId = "nodeIdToTrigger";
String processInstanceId = UUID.randomUUID().toString();
ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null);
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"mutation{ NodeInstanceTrigger ( id: \\\"" + processInstanceId + "\\\", nodeId: \\\"" + nodeId + "\\\")}\"}");
verify(dataIndexApiClient).triggerNodeInstance(eq("http://localhost:8080"), eq(getProcessInstance(processId, processInstanceId, 1, null, null)), eq(nodeId));
}
use of org.kie.kogito.event.process.ProcessInstanceDataEvent in project kogito-apps by kiegroup.
the class AbstractGraphQLRuntimesQueriesIT method testNodeInstanceRetrigger.
@Test
void testNodeInstanceRetrigger() {
String nodeInstanceId = "nodeInstanceIdToRetrigger";
String processInstanceId = UUID.randomUUID().toString();
ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null);
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"mutation{ NodeInstanceRetrigger ( id: \\\"" + processInstanceId + "\\\", nodeInstanceId: \\\"" + nodeInstanceId + "\\\")}\"}");
verify(dataIndexApiClient).retriggerNodeInstance(eq("http://localhost:8080"), eq(getProcessInstance(processId, processInstanceId, 1, null, null)), eq(nodeInstanceId));
}
Aggregations