Search in sources :

Example 1 with EventBasedNodeInstanceInterface

use of io.automatiko.engine.workflow.process.instance.node.EventBasedNodeInstanceInterface in project automatiko-engine by automatiko-io.

the class WorkflowProcessInstanceImpl method disconnect.

@Override
public void disconnect() {
    if (getProcessRuntime() == null) {
        return;
    }
    getMetaData().remove("ATK_FUNC_FLOW_COUNTER");
    getMetaData().remove("ATK_FUNC_FLOW_NEXT");
    removeEventListeners();
    unregisterExternalEventNodeListeners();
    for (NodeInstance nodeInstance : nodeInstances) {
        if (nodeInstance instanceof EventBasedNodeInstanceInterface) {
            ((EventBasedNodeInstanceInterface) nodeInstance).removeEventListeners();
        }
    }
    super.disconnect();
}
Also used : EventBasedNodeInstanceInterface(io.automatiko.engine.workflow.process.instance.node.EventBasedNodeInstanceInterface) EventSubProcessNodeInstance(io.automatiko.engine.workflow.process.instance.node.EventSubProcessNodeInstance) NodeInstance(io.automatiko.engine.workflow.process.instance.NodeInstance) FaultNodeInstance(io.automatiko.engine.workflow.process.instance.node.FaultNodeInstance) CompositeNodeInstance(io.automatiko.engine.workflow.process.instance.node.CompositeNodeInstance) StateBasedNodeInstance(io.automatiko.engine.workflow.process.instance.node.StateBasedNodeInstance) StartNodeInstance(io.automatiko.engine.workflow.process.instance.node.StartNodeInstance) EndNodeInstance(io.automatiko.engine.workflow.process.instance.node.EndNodeInstance) EventNodeInstance(io.automatiko.engine.workflow.process.instance.node.EventNodeInstance)

Example 2 with EventBasedNodeInstanceInterface

use of io.automatiko.engine.workflow.process.instance.node.EventBasedNodeInstanceInterface in project automatiko-engine by automatiko-io.

the class WorkflowProcessInstanceImpl method reconnect.

@Override
public void reconnect() {
    super.reconnect();
    for (NodeInstance nodeInstance : nodeInstances) {
        if (nodeInstance instanceof EventBasedNodeInstanceInterface) {
            ((EventBasedNodeInstanceInterface) nodeInstance).addEventListeners();
        }
        if (nodeInstance instanceof CompositeNodeInstance) {
            ((CompositeNodeInstance) nodeInstance).registerExternalEventNodeListeners();
        }
    }
    registerExternalEventNodeListeners();
}
Also used : EventBasedNodeInstanceInterface(io.automatiko.engine.workflow.process.instance.node.EventBasedNodeInstanceInterface) CompositeNodeInstance(io.automatiko.engine.workflow.process.instance.node.CompositeNodeInstance) EventSubProcessNodeInstance(io.automatiko.engine.workflow.process.instance.node.EventSubProcessNodeInstance) NodeInstance(io.automatiko.engine.workflow.process.instance.NodeInstance) FaultNodeInstance(io.automatiko.engine.workflow.process.instance.node.FaultNodeInstance) CompositeNodeInstance(io.automatiko.engine.workflow.process.instance.node.CompositeNodeInstance) StateBasedNodeInstance(io.automatiko.engine.workflow.process.instance.node.StateBasedNodeInstance) StartNodeInstance(io.automatiko.engine.workflow.process.instance.node.StartNodeInstance) EndNodeInstance(io.automatiko.engine.workflow.process.instance.node.EndNodeInstance) EventNodeInstance(io.automatiko.engine.workflow.process.instance.node.EventNodeInstance)

Aggregations

NodeInstance (io.automatiko.engine.workflow.process.instance.NodeInstance)2 CompositeNodeInstance (io.automatiko.engine.workflow.process.instance.node.CompositeNodeInstance)2 EndNodeInstance (io.automatiko.engine.workflow.process.instance.node.EndNodeInstance)2 EventBasedNodeInstanceInterface (io.automatiko.engine.workflow.process.instance.node.EventBasedNodeInstanceInterface)2 EventNodeInstance (io.automatiko.engine.workflow.process.instance.node.EventNodeInstance)2 EventSubProcessNodeInstance (io.automatiko.engine.workflow.process.instance.node.EventSubProcessNodeInstance)2 FaultNodeInstance (io.automatiko.engine.workflow.process.instance.node.FaultNodeInstance)2 StartNodeInstance (io.automatiko.engine.workflow.process.instance.node.StartNodeInstance)2 StateBasedNodeInstance (io.automatiko.engine.workflow.process.instance.node.StateBasedNodeInstance)2