Search in sources :

Example 1 with KogitoEventListener

use of org.kie.kogito.internal.process.event.KogitoEventListener in project kogito-runtimes by kiegroup.

the class WorkflowProcessInstanceImpl method setState.

@Override
public void setState(final int state, String outcome) {
    // TODO move most of this to ProcessInstanceImpl
    if (state == KogitoProcessInstance.STATE_COMPLETED || state == KogitoProcessInstance.STATE_ABORTED) {
        this.endDate = new Date();
        if (this.slaCompliance == KogitoProcessInstance.SLA_PENDING) {
            if (System.currentTimeMillis() > slaDueDate.getTime()) {
                // completion of the process instance is after expected SLA due date, mark it accordingly
                this.slaCompliance = KogitoProcessInstance.SLA_VIOLATED;
            } else {
                this.slaCompliance = state == KogitoProcessInstance.STATE_COMPLETED ? KogitoProcessInstance.SLA_MET : KogitoProcessInstance.SLA_ABORTED;
            }
        }
        InternalKnowledgeRuntime kruntime = getKnowledgeRuntime();
        InternalProcessRuntime processRuntime = (InternalProcessRuntime) kruntime.getProcessRuntime();
        processRuntime.getProcessEventSupport().fireBeforeProcessCompleted(this, kruntime);
        // JBPM-8094 - set state after event
        super.setState(state, outcome);
        // deactivate all node instances of this process instance
        while (!nodeInstances.isEmpty()) {
            NodeInstance nodeInstance = nodeInstances.get(0);
            nodeInstance.cancel();
        }
        if (this.slaTimerId != null && !slaTimerId.trim().isEmpty()) {
            processRuntime.getJobsService().cancelJob(this.slaTimerId);
            logger.debug("SLA Timer {} has been canceled", this.slaTimerId);
        }
        removeEventListeners();
        processRuntime.getProcessInstanceManager().removeProcessInstance(this);
        processRuntime.getProcessEventSupport().fireAfterProcessCompleted(this, kruntime);
        if (isSignalCompletion()) {
            List<KogitoEventListener> listeners = eventListeners.get("processInstanceCompleted:" + getStringId());
            if (listeners != null) {
                for (KogitoEventListener listener : listeners) {
                    listener.signalEvent("processInstanceCompleted:" + getStringId(), this);
                }
            }
            processRuntime.getSignalManager().signalEvent("processInstanceCompleted:" + getStringId(), this);
        }
    } else {
        super.setState(state, outcome);
    }
}
Also used : InternalKnowledgeRuntime(org.drools.core.common.InternalKnowledgeRuntime) KogitoEventListener(org.kie.kogito.internal.process.event.KogitoEventListener) InternalProcessRuntime(org.jbpm.process.instance.InternalProcessRuntime) EventSubProcessNodeInstance(org.jbpm.workflow.instance.node.EventSubProcessNodeInstance) KogitoNodeInstance(org.kie.kogito.internal.process.runtime.KogitoNodeInstance) StateBasedNodeInstance(org.jbpm.workflow.instance.node.StateBasedNodeInstance) EndNodeInstance(org.jbpm.workflow.instance.node.EndNodeInstance) NodeInstance(org.jbpm.workflow.instance.NodeInstance) FaultNodeInstance(org.jbpm.workflow.instance.node.FaultNodeInstance) EventNodeInstance(org.jbpm.workflow.instance.node.EventNodeInstance) CompositeNodeInstance(org.jbpm.workflow.instance.node.CompositeNodeInstance) Date(java.util.Date)

Example 2 with KogitoEventListener

use of org.kie.kogito.internal.process.event.KogitoEventListener in project kogito-runtimes by kiegroup.

the class WorkflowProcessInstanceImpl method getEventDescriptions.

@Override
public Set<EventDescription<?>> getEventDescriptions() {
    if (getState() == KogitoProcessInstance.STATE_COMPLETED || getState() == KogitoProcessInstance.STATE_ABORTED) {
        return Collections.emptySet();
    }
    VariableScope variableScope = (VariableScope) ((ContextContainer) getProcess()).getDefaultContext(VariableScope.VARIABLE_SCOPE);
    Set<EventDescription<?>> eventDesciptions = new LinkedHashSet<>();
    List<KogitoEventListener> activeListeners = eventListeners.values().stream().flatMap(List::stream).collect(Collectors.toList());
    activeListeners.addAll(externalEventListeners.values().stream().flatMap(List::stream).collect(Collectors.toList()));
    activeListeners.forEach(el -> eventDesciptions.addAll(el.getEventDescriptions()));
    ((org.jbpm.workflow.core.WorkflowProcess) getProcess()).getNodesRecursively().stream().filter(n -> n instanceof EventNodeInterface).forEach(n -> {
        NamedDataType dataType = null;
        if (((EventNodeInterface) n).getVariableName() != null) {
            Variable eventVar = variableScope.findVariable(((EventNodeInterface) n).getVariableName());
            if (eventVar != null) {
                dataType = new NamedDataType(eventVar.getName(), eventVar.getType());
            }
        }
        if (n instanceof BoundaryEventNode) {
            BoundaryEventNode boundaryEventNode = (BoundaryEventNode) n;
            StateBasedNodeInstance attachedToNodeInstance = (StateBasedNodeInstance) getNodeInstances(true).stream().filter(ni -> ni.getNode().getMetaData().get(UNIQUE_ID).equals(boundaryEventNode.getAttachedToNodeId())).findFirst().orElse(null);
            if (attachedToNodeInstance != null) {
                Map<String, String> properties = new HashMap<>();
                properties.put("AttachedToID", attachedToNodeInstance.getNodeDefinitionId());
                properties.put("AttachedToName", attachedToNodeInstance.getNodeName());
                String eventType = EVENT_TYPE_SIGNAL;
                String eventName = boundaryEventNode.getType();
                Map<String, String> timerProperties = attachedToNodeInstance.extractTimerEventInformation();
                if (timerProperties != null) {
                    properties.putAll(timerProperties);
                    eventType = "timer";
                    eventName = "timerTriggered";
                }
                eventDesciptions.add(new BaseEventDescription(eventName, (String) n.getMetaData().get(UNIQUE_ID), n.getName(), eventType, null, getStringId(), dataType, properties));
            }
        } else if (n instanceof EventSubProcessNode) {
            EventSubProcessNode eventSubProcessNode = (EventSubProcessNode) n;
            org.kie.api.definition.process.Node startNode = eventSubProcessNode.findStartNode();
            Map<Timer, DroolsAction> timers = eventSubProcessNode.getTimers();
            if (timers != null && !timers.isEmpty()) {
                getNodeInstances(eventSubProcessNode.getId()).forEach(ni -> {
                    Map<String, String> timerProperties = ((StateBasedNodeInstance) ni).extractTimerEventInformation();
                    if (timerProperties != null) {
                        eventDesciptions.add(new BaseEventDescription("timerTriggered", (String) startNode.getMetaData().get("UniqueId"), startNode.getName(), "timer", ni.getStringId(), getStringId(), null, timerProperties));
                    }
                });
            } else {
                for (String eventName : eventSubProcessNode.getEvents()) {
                    eventDesciptions.add(new BaseEventDescription(eventName, (String) startNode.getMetaData().get("UniqueId"), startNode.getName(), "signal", null, getStringId(), dataType));
                }
            }
        } else if (n instanceof EventNode) {
            NamedDataType finalDataType = dataType;
            getNodeInstances(n.getId()).forEach(ni -> eventDesciptions.add(new BaseEventDescription(((EventNode) n).getType(), (String) n.getMetaData().get(UNIQUE_ID), n.getName(), (String) n.getMetaData().getOrDefault(EVENT_TYPE, EVENT_TYPE_SIGNAL), ni.getStringId(), getStringId(), finalDataType)));
        } else if (n instanceof StateNode) {
            getNodeInstances(n.getId()).forEach(ni -> eventDesciptions.add(new BaseEventDescription((String) n.getMetaData().get(CONDITION), (String) n.getMetaData().get(UNIQUE_ID), n.getName(), (String) n.getMetaData().getOrDefault(EVENT_TYPE, EVENT_TYPE_SIGNAL), ni.getStringId(), getStringId(), null)));
        }
    });
    return eventDesciptions;
}
Also used : LinkedHashSet(java.util.LinkedHashSet) Milestone(org.kie.kogito.process.flexible.Milestone) ProcessInstanceJobDescription(org.kie.kogito.jobs.ProcessInstanceJobDescription) Date(java.util.Date) EventNodeInstanceInterface(org.jbpm.workflow.instance.node.EventNodeInstanceInterface) EventBasedNodeInstanceInterface(org.jbpm.workflow.instance.node.EventBasedNodeInstanceInterface) LoggerFactory(org.slf4j.LoggerFactory) BoundaryEventNode(org.jbpm.workflow.core.node.BoundaryEventNode) DynamicNode(org.jbpm.workflow.core.node.DynamicNode) StartNode(org.jbpm.workflow.core.node.StartNode) KogitoProcessInstance(org.kie.kogito.internal.process.runtime.KogitoProcessInstance) PatternConstants(org.jbpm.util.PatternConstants) NamedDataType(org.kie.kogito.process.NamedDataType) NodeImpl(org.jbpm.workflow.core.impl.NodeImpl) CompositeNode(org.jbpm.workflow.core.node.CompositeNode) EventSubProcessNodeInstance(org.jbpm.workflow.instance.node.EventSubProcessNodeInstance) WorkflowProcessInstance(org.jbpm.workflow.instance.WorkflowProcessInstance) KogitoNodeInstanceContainer(org.kie.kogito.internal.process.runtime.KogitoNodeInstanceContainer) StateNode(org.jbpm.workflow.core.node.StateNode) Matcher(java.util.regex.Matcher) EventNodeInterface(org.jbpm.workflow.core.node.EventNodeInterface) ContextInstance(org.jbpm.process.instance.ContextInstance) CORRELATION_KEY(org.jbpm.ruleflow.core.Metadata.CORRELATION_KEY) Map(java.util.Map) Predicate(java.util.function.Predicate) Collection(java.util.Collection) Set(java.util.Set) UUID(java.util.UUID) KogitoNodeInstance(org.kie.kogito.internal.process.runtime.KogitoNodeInstance) DurationExpirationTime(org.kie.kogito.jobs.DurationExpirationTime) VariableScope(org.jbpm.process.core.context.variable.VariableScope) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) IS_FOR_COMPENSATION(org.jbpm.ruleflow.core.Metadata.IS_FOR_COMPENSATION) List(java.util.List) Stream(java.util.stream.Stream) ContextContainer(org.jbpm.process.core.ContextContainer) ProcessInstance(org.kie.kogito.process.ProcessInstance) Node(org.jbpm.workflow.core.Node) COMPENSATION(org.jbpm.ruleflow.core.Metadata.COMPENSATION) BusinessCalendar(org.jbpm.process.core.timer.BusinessCalendar) MilestoneNode(org.jbpm.workflow.core.node.MilestoneNode) ACTIVE(org.kie.kogito.process.flexible.ItemDescription.Status.ACTIVE) Optional(java.util.Optional) COMPLETED(org.kie.kogito.process.flexible.ItemDescription.Status.COMPLETED) NodeContainer(org.kie.api.definition.process.NodeContainer) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) StateBasedNodeInstance(org.jbpm.workflow.instance.node.StateBasedNodeInstance) DateTimeUtils(org.jbpm.process.core.timer.DateTimeUtils) EndNodeInstance(org.jbpm.workflow.instance.node.EndNodeInstance) AdHocFragment(org.kie.kogito.process.flexible.AdHocFragment) HashMap(java.util.HashMap) Function(java.util.function.Function) EventSubProcessNode(org.jbpm.workflow.core.node.EventSubProcessNode) ArrayList(java.util.ArrayList) Timer(org.jbpm.process.core.timer.Timer) NodeInstance(org.jbpm.workflow.instance.NodeInstance) FaultNodeInstance(org.jbpm.workflow.instance.node.FaultNodeInstance) CUSTOM_SLA_DUE_DATE(org.jbpm.ruleflow.core.Metadata.CUSTOM_SLA_DUE_DATE) CONDITION(org.jbpm.ruleflow.core.Metadata.CONDITION) EventNodeInstance(org.jbpm.workflow.instance.node.EventNodeInstance) CompositeNodeInstance(org.jbpm.workflow.instance.node.CompositeNodeInstance) DroolsAction(org.jbpm.workflow.core.DroolsAction) LinkedHashSet(java.util.LinkedHashSet) MVELEvaluator(org.drools.mvel.util.MVELEvaluator) Variable(org.jbpm.process.core.context.variable.Variable) AVAILABLE(org.kie.kogito.process.flexible.ItemDescription.Status.AVAILABLE) UNIQUE_ID(org.jbpm.ruleflow.core.Metadata.UNIQUE_ID) InternalKnowledgeRuntime(org.drools.core.common.InternalKnowledgeRuntime) Logger(org.slf4j.Logger) CorrelationKey(org.kie.internal.process.CorrelationKey) Metadata(org.jbpm.ruleflow.core.Metadata) VariableResolverFactory(org.mvel2.integration.VariableResolverFactory) EventNode(org.jbpm.workflow.core.node.EventNode) BaseEventDescription(org.kie.kogito.process.BaseEventDescription) VariableScopeInstance(org.jbpm.process.instance.context.variable.VariableScopeInstance) AgendaFilter(org.kie.api.runtime.rule.AgendaFilter) ProcessInstanceImpl(org.jbpm.process.instance.impl.ProcessInstanceImpl) EVENT_TYPE_SIGNAL(org.jbpm.ruleflow.core.Metadata.EVENT_TYPE_SIGNAL) TimerInstance(org.kie.kogito.timer.TimerInstance) InternalProcessRuntime(org.jbpm.process.instance.InternalProcessRuntime) TimerJobId(org.kie.kogito.jobs.TimerJobId) KogitoEventListener(org.kie.kogito.internal.process.event.KogitoEventListener) ItemDescription(org.kie.kogito.process.flexible.ItemDescription) EventDescription(org.kie.kogito.process.EventDescription) KogitoWorkflowProcess(org.kie.kogito.internal.process.runtime.KogitoWorkflowProcess) Collections(java.util.Collections) EVENT_TYPE(org.jbpm.ruleflow.core.Metadata.EVENT_TYPE) EMPTY_EVENT_LISTENER(org.jbpm.workflow.instance.impl.DummyEventListener.EMPTY_EVENT_LISTENER) Variable(org.jbpm.process.core.context.variable.Variable) HashMap(java.util.HashMap) EventSubProcessNode(org.jbpm.workflow.core.node.EventSubProcessNode) BoundaryEventNode(org.jbpm.workflow.core.node.BoundaryEventNode) DynamicNode(org.jbpm.workflow.core.node.DynamicNode) StartNode(org.jbpm.workflow.core.node.StartNode) CompositeNode(org.jbpm.workflow.core.node.CompositeNode) StateNode(org.jbpm.workflow.core.node.StateNode) Node(org.jbpm.workflow.core.Node) MilestoneNode(org.jbpm.workflow.core.node.MilestoneNode) EventSubProcessNode(org.jbpm.workflow.core.node.EventSubProcessNode) EventNode(org.jbpm.workflow.core.node.EventNode) StateNode(org.jbpm.workflow.core.node.StateNode) KogitoEventListener(org.kie.kogito.internal.process.event.KogitoEventListener) BoundaryEventNode(org.jbpm.workflow.core.node.BoundaryEventNode) EventNode(org.jbpm.workflow.core.node.EventNode) List(java.util.List) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList) StateBasedNodeInstance(org.jbpm.workflow.instance.node.StateBasedNodeInstance) EventNodeInterface(org.jbpm.workflow.core.node.EventNodeInterface) BaseEventDescription(org.kie.kogito.process.BaseEventDescription) BoundaryEventNode(org.jbpm.workflow.core.node.BoundaryEventNode) NamedDataType(org.kie.kogito.process.NamedDataType) BaseEventDescription(org.kie.kogito.process.BaseEventDescription) EventDescription(org.kie.kogito.process.EventDescription) Map(java.util.Map) HashMap(java.util.HashMap) VariableScope(org.jbpm.process.core.context.variable.VariableScope)

Example 3 with KogitoEventListener

use of org.kie.kogito.internal.process.event.KogitoEventListener in project kogito-runtimes by kiegroup.

the class WorkflowProcessInstanceImpl method signalEvent.

@Override
@SuppressWarnings("unchecked")
public void signalEvent(String type, Object event) {
    logger.debug("Signal {} received with data {} in process instance {}", type, event, getStringId());
    synchronized (this) {
        if (getState() != KogitoProcessInstance.STATE_ACTIVE) {
            return;
        }
        if ("timerTriggered".equals(type)) {
            TimerInstance timer = (TimerInstance) event;
            if (timer.getId().equals(slaTimerId)) {
                handleSLAViolation();
                // no need to pass the event along as it was purely for SLA tracking
                return;
            }
        }
        if ("slaViolation".equals(type)) {
            handleSLAViolation();
            // no need to pass the event along as it was purely for SLA tracking
            return;
        }
        List<NodeInstance> currentView = new ArrayList<>(this.nodeInstances);
        try {
            this.activatingNodeIds = new ArrayList<>();
            List<KogitoEventListener> listeners = eventListeners.get(type);
            if (listeners != null) {
                for (KogitoEventListener listener : listeners) {
                    listener.signalEvent(type, event);
                }
            }
            listeners = externalEventListeners.get(type);
            if (listeners != null) {
                for (KogitoEventListener listener : listeners) {
                    listener.signalEvent(type, event);
                }
            }
            for (org.kie.api.definition.process.Node node : getWorkflowProcess().getNodes()) {
                if (node instanceof EventNodeInterface && ((EventNodeInterface) node).acceptsEvent(type, event, getResolver(node, currentView))) {
                    if (node instanceof EventNode && ((EventNode) node).getFrom() == null) {
                        EventNodeInstance eventNodeInstance = (EventNodeInstance) getNodeInstance(node);
                        eventNodeInstance.signalEvent(type, event, getResolver(node, currentView));
                    } else {
                        if (node instanceof EventSubProcessNode && (resolveVariables(((EventSubProcessNode) node).getEvents()).contains(type))) {
                            EventSubProcessNodeInstance eventNodeInstance = (EventSubProcessNodeInstance) getNodeInstance(node);
                            eventNodeInstance.signalEvent(type, event);
                        } else {
                            List<NodeInstance> nodeInstances = getNodeInstances(node.getId(), currentView);
                            if (nodeInstances != null && !nodeInstances.isEmpty()) {
                                for (NodeInstance nodeInstance : nodeInstances) {
                                    ((EventNodeInstanceInterface) nodeInstance).signalEvent(type, event, getResolver(node, currentView));
                                }
                            }
                        }
                    }
                }
            }
            if (((org.jbpm.workflow.core.WorkflowProcess) getWorkflowProcess()).isDynamic()) {
                for (org.kie.api.definition.process.Node node : getWorkflowProcess().getNodes()) {
                    if (type.equals(node.getName()) && node.getIncomingConnections().isEmpty()) {
                        NodeInstance nodeInstance = getNodeInstance(node);
                        if (event != null) {
                            Map<String, Object> dynamicParams = new HashMap<>(getVariables());
                            if (event instanceof Map) {
                                dynamicParams.putAll((Map<String, Object>) event);
                            } else {
                                dynamicParams.put("Data", event);
                            }
                            nodeInstance.setDynamicParameters(dynamicParams);
                        }
                        nodeInstance.trigger(null, Node.CONNECTION_DEFAULT_TYPE);
                    } else if (node instanceof CompositeNode) {
                        Optional<NodeInstance> instance = this.nodeInstances.stream().filter(ni -> ni.getNodeId() == node.getId()).findFirst();
                        instance.ifPresent(n -> ((CompositeNodeInstance) n).signalEvent(type, event));
                    }
                }
            }
        } finally {
            if (this.activatingNodeIds != null) {
                this.activatingNodeIds.clear();
                this.activatingNodeIds = null;
            }
        }
    }
}
Also used : Milestone(org.kie.kogito.process.flexible.Milestone) ProcessInstanceJobDescription(org.kie.kogito.jobs.ProcessInstanceJobDescription) Date(java.util.Date) EventNodeInstanceInterface(org.jbpm.workflow.instance.node.EventNodeInstanceInterface) EventBasedNodeInstanceInterface(org.jbpm.workflow.instance.node.EventBasedNodeInstanceInterface) LoggerFactory(org.slf4j.LoggerFactory) BoundaryEventNode(org.jbpm.workflow.core.node.BoundaryEventNode) DynamicNode(org.jbpm.workflow.core.node.DynamicNode) StartNode(org.jbpm.workflow.core.node.StartNode) KogitoProcessInstance(org.kie.kogito.internal.process.runtime.KogitoProcessInstance) PatternConstants(org.jbpm.util.PatternConstants) NamedDataType(org.kie.kogito.process.NamedDataType) NodeImpl(org.jbpm.workflow.core.impl.NodeImpl) CompositeNode(org.jbpm.workflow.core.node.CompositeNode) EventSubProcessNodeInstance(org.jbpm.workflow.instance.node.EventSubProcessNodeInstance) WorkflowProcessInstance(org.jbpm.workflow.instance.WorkflowProcessInstance) KogitoNodeInstanceContainer(org.kie.kogito.internal.process.runtime.KogitoNodeInstanceContainer) StateNode(org.jbpm.workflow.core.node.StateNode) Matcher(java.util.regex.Matcher) EventNodeInterface(org.jbpm.workflow.core.node.EventNodeInterface) ContextInstance(org.jbpm.process.instance.ContextInstance) CORRELATION_KEY(org.jbpm.ruleflow.core.Metadata.CORRELATION_KEY) Map(java.util.Map) Predicate(java.util.function.Predicate) Collection(java.util.Collection) Set(java.util.Set) UUID(java.util.UUID) KogitoNodeInstance(org.kie.kogito.internal.process.runtime.KogitoNodeInstance) DurationExpirationTime(org.kie.kogito.jobs.DurationExpirationTime) VariableScope(org.jbpm.process.core.context.variable.VariableScope) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) IS_FOR_COMPENSATION(org.jbpm.ruleflow.core.Metadata.IS_FOR_COMPENSATION) List(java.util.List) Stream(java.util.stream.Stream) ContextContainer(org.jbpm.process.core.ContextContainer) ProcessInstance(org.kie.kogito.process.ProcessInstance) Node(org.jbpm.workflow.core.Node) COMPENSATION(org.jbpm.ruleflow.core.Metadata.COMPENSATION) BusinessCalendar(org.jbpm.process.core.timer.BusinessCalendar) MilestoneNode(org.jbpm.workflow.core.node.MilestoneNode) ACTIVE(org.kie.kogito.process.flexible.ItemDescription.Status.ACTIVE) Optional(java.util.Optional) COMPLETED(org.kie.kogito.process.flexible.ItemDescription.Status.COMPLETED) NodeContainer(org.kie.api.definition.process.NodeContainer) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) StateBasedNodeInstance(org.jbpm.workflow.instance.node.StateBasedNodeInstance) DateTimeUtils(org.jbpm.process.core.timer.DateTimeUtils) EndNodeInstance(org.jbpm.workflow.instance.node.EndNodeInstance) AdHocFragment(org.kie.kogito.process.flexible.AdHocFragment) HashMap(java.util.HashMap) Function(java.util.function.Function) EventSubProcessNode(org.jbpm.workflow.core.node.EventSubProcessNode) ArrayList(java.util.ArrayList) Timer(org.jbpm.process.core.timer.Timer) NodeInstance(org.jbpm.workflow.instance.NodeInstance) FaultNodeInstance(org.jbpm.workflow.instance.node.FaultNodeInstance) CUSTOM_SLA_DUE_DATE(org.jbpm.ruleflow.core.Metadata.CUSTOM_SLA_DUE_DATE) CONDITION(org.jbpm.ruleflow.core.Metadata.CONDITION) EventNodeInstance(org.jbpm.workflow.instance.node.EventNodeInstance) CompositeNodeInstance(org.jbpm.workflow.instance.node.CompositeNodeInstance) DroolsAction(org.jbpm.workflow.core.DroolsAction) LinkedHashSet(java.util.LinkedHashSet) MVELEvaluator(org.drools.mvel.util.MVELEvaluator) Variable(org.jbpm.process.core.context.variable.Variable) AVAILABLE(org.kie.kogito.process.flexible.ItemDescription.Status.AVAILABLE) UNIQUE_ID(org.jbpm.ruleflow.core.Metadata.UNIQUE_ID) InternalKnowledgeRuntime(org.drools.core.common.InternalKnowledgeRuntime) Logger(org.slf4j.Logger) CorrelationKey(org.kie.internal.process.CorrelationKey) Metadata(org.jbpm.ruleflow.core.Metadata) VariableResolverFactory(org.mvel2.integration.VariableResolverFactory) EventNode(org.jbpm.workflow.core.node.EventNode) BaseEventDescription(org.kie.kogito.process.BaseEventDescription) VariableScopeInstance(org.jbpm.process.instance.context.variable.VariableScopeInstance) AgendaFilter(org.kie.api.runtime.rule.AgendaFilter) ProcessInstanceImpl(org.jbpm.process.instance.impl.ProcessInstanceImpl) EVENT_TYPE_SIGNAL(org.jbpm.ruleflow.core.Metadata.EVENT_TYPE_SIGNAL) TimerInstance(org.kie.kogito.timer.TimerInstance) InternalProcessRuntime(org.jbpm.process.instance.InternalProcessRuntime) TimerJobId(org.kie.kogito.jobs.TimerJobId) KogitoEventListener(org.kie.kogito.internal.process.event.KogitoEventListener) ItemDescription(org.kie.kogito.process.flexible.ItemDescription) EventDescription(org.kie.kogito.process.EventDescription) KogitoWorkflowProcess(org.kie.kogito.internal.process.runtime.KogitoWorkflowProcess) Collections(java.util.Collections) EVENT_TYPE(org.jbpm.ruleflow.core.Metadata.EVENT_TYPE) EMPTY_EVENT_LISTENER(org.jbpm.workflow.instance.impl.DummyEventListener.EMPTY_EVENT_LISTENER) TimerInstance(org.kie.kogito.timer.TimerInstance) HashMap(java.util.HashMap) EventSubProcessNode(org.jbpm.workflow.core.node.EventSubProcessNode) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList) KogitoEventListener(org.kie.kogito.internal.process.event.KogitoEventListener) BoundaryEventNode(org.jbpm.workflow.core.node.BoundaryEventNode) EventNode(org.jbpm.workflow.core.node.EventNode) EventNodeInstanceInterface(org.jbpm.workflow.instance.node.EventNodeInstanceInterface) KogitoWorkflowProcess(org.kie.kogito.internal.process.runtime.KogitoWorkflowProcess) Optional(java.util.Optional) CompositeNodeInstance(org.jbpm.workflow.instance.node.CompositeNodeInstance) EventNodeInterface(org.jbpm.workflow.core.node.EventNodeInterface) EventSubProcessNodeInstance(org.jbpm.workflow.instance.node.EventSubProcessNodeInstance) CompositeNode(org.jbpm.workflow.core.node.CompositeNode) EventSubProcessNodeInstance(org.jbpm.workflow.instance.node.EventSubProcessNodeInstance) KogitoNodeInstance(org.kie.kogito.internal.process.runtime.KogitoNodeInstance) StateBasedNodeInstance(org.jbpm.workflow.instance.node.StateBasedNodeInstance) EndNodeInstance(org.jbpm.workflow.instance.node.EndNodeInstance) NodeInstance(org.jbpm.workflow.instance.NodeInstance) FaultNodeInstance(org.jbpm.workflow.instance.node.FaultNodeInstance) EventNodeInstance(org.jbpm.workflow.instance.node.EventNodeInstance) CompositeNodeInstance(org.jbpm.workflow.instance.node.CompositeNodeInstance) EventNodeInstance(org.jbpm.workflow.instance.node.EventNodeInstance) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

Date (java.util.Date)3 InternalKnowledgeRuntime (org.drools.core.common.InternalKnowledgeRuntime)3 InternalProcessRuntime (org.jbpm.process.instance.InternalProcessRuntime)3 ArrayList (java.util.ArrayList)2 Collection (java.util.Collection)2 Collections (java.util.Collections)2 HashMap (java.util.HashMap)2 LinkedHashSet (java.util.LinkedHashSet)2 List (java.util.List)2 Map (java.util.Map)2 Objects (java.util.Objects)2 Optional (java.util.Optional)2 Set (java.util.Set)2 UUID (java.util.UUID)2 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)2 Function (java.util.function.Function)2 Predicate (java.util.function.Predicate)2 Matcher (java.util.regex.Matcher)2 Collectors (java.util.stream.Collectors)2 Stream (java.util.stream.Stream)2