use of org.kie.kogito.internal.process.runtime.KogitoNodeInstance in project kogito-runtimes by kiegroup.
the class KogitoWorkingMemoryLogger method createNodeInstanceId.
private String createNodeInstanceId(NodeInstance nodeInstance) {
String nodeInstanceId = "" + ((KogitoNodeInstance) nodeInstance).getStringId();
NodeInstanceContainer nodeContainer = nodeInstance.getNodeInstanceContainer();
while (nodeContainer != null) {
if (nodeContainer instanceof NodeInstance) {
nodeInstance = (NodeInstance) nodeContainer;
nodeInstanceId = ((KogitoNodeInstance) nodeInstance).getStringId() + ":" + nodeInstanceId;
nodeContainer = nodeInstance.getNodeInstanceContainer();
} else {
break;
}
}
return nodeInstanceId;
}
use of org.kie.kogito.internal.process.runtime.KogitoNodeInstance in project kogito-runtimes by kiegroup.
the class JsonNodeJsonPathResolverTest method setup.
@BeforeEach
void setup() {
workItem = mock(KogitoWorkItem.class);
KogitoNodeInstance ni = mock(KogitoNodeInstance.class);
when(workItem.getNodeInstance()).thenReturn(ni);
WorkflowProcessInstance pi = mock(WorkflowProcessInstance.class, withSettings().extraInterfaces(ProcessInstance.class));
when(ni.getProcessInstance()).thenReturn(pi);
Process process = mock(Process.class);
when(pi.getProcess()).thenReturn(process);
when(process.getMetaData()).thenReturn(Collections.emptyMap());
}
use of org.kie.kogito.internal.process.runtime.KogitoNodeInstance in project kogito-runtimes by kiegroup.
the class JsonNodeJqResolverTest method setup.
@BeforeEach
void setup() {
workItem = mock(KogitoWorkItem.class);
KogitoNodeInstance ni = mock(KogitoNodeInstance.class);
when(workItem.getNodeInstance()).thenReturn(ni);
WorkflowProcessInstance pi = mock(WorkflowProcessInstance.class, withSettings().extraInterfaces(ProcessInstance.class));
when(ni.getProcessInstance()).thenReturn(pi);
Process process = mock(Process.class);
when(pi.getProcess()).thenReturn(process);
when(process.getMetaData()).thenReturn(Collections.emptyMap());
}
Aggregations