Search in sources :

Example 1 with EndNode

use of io.automatiko.engine.workflow.process.core.node.EndNode in project automatiko-engine by automatiko-io.

the class FunctionFlowGenerator method generate.

public String generate() {
    CompilationUnit clazz = parse(this.getClass().getResourceAsStream("/class-templates/FunctionFlowTemplate.java"));
    clazz.setPackageDeclaration(process.getPackageName());
    clazz.addImport(modelfqcn);
    ClassOrInterfaceDeclaration template = clazz.findFirst(ClassOrInterfaceDeclaration.class).orElseThrow(() -> new IllegalStateException("Cannot find the class in FunctionFlowTemplate"));
    template.setName(functionClazzName);
    List<String> discoveredFunctions = new ArrayList<>();
    // first to initiate the function flow
    template.findFirst(MethodDeclaration.class, md -> md.getNameAsString().equals("startTemplate")).ifPresent(md -> {
        md.setName(processId.toLowerCase() + version);
        md.getBody().get().findFirst(StringLiteralExpr.class, s -> s.getValue().equals("$TypePrefix$")).ifPresent(s -> s.setValue(process.getPackageName() + "." + processId + fversion));
        if (useInjection()) {
            String trigger = functionTrigger(process);
            String filter = functionFilter(process);
            if (filter != null) {
                Matcher matcher = PARAMETER_MATCHER.matcher(filter);
                while (matcher.find()) {
                    String paramName = matcher.group(1);
                    Optional<String> value = context.getApplicationProperty(paramName);
                    if (value.isPresent()) {
                        filter = filter.replaceAll("\\{" + paramName + "\\}", value.get());
                    } else {
                        throw new IllegalArgumentException("Missing argument declared in as function filter with name '" + paramName + "'. Define it in application.properties file");
                    }
                }
            }
            annotator.withCloudEventMapping(md, trigger, filter);
        }
    });
    MethodDeclaration callTemplate = template.findFirst(MethodDeclaration.class, md -> md.getNameAsString().equals("callTemplate")).get();
    discoveredFunctions.add(definedFunctionTrigger(process));
    // for each "execution" node add new function
    for (Node node : process.getNodesRecursively()) {
        if (isExecutionNode(node)) {
            discoveredFunctions.add(definedFunctionTrigger(node));
            MethodDeclaration flowStepFunction = callTemplate.clone();
            if (useInjection()) {
                String trigger = functionTrigger(node);
                String filter = functionFilter(node);
                if (filter != null) {
                    Matcher matcher = PARAMETER_MATCHER.matcher(filter);
                    while (matcher.find()) {
                        String paramName = matcher.group(1);
                        Optional<String> value = context.getApplicationProperty(paramName);
                        if (value.isPresent() && !value.get().isEmpty()) {
                            filter = filter.replaceAll("\\{" + paramName + "\\}", value.get());
                        } else {
                            throw new IllegalArgumentException("Missing argument declared in as function filter with name '" + paramName + "'. Define it in application.properties file");
                        }
                    }
                }
                annotator.withCloudEventMapping(flowStepFunction, trigger, filter);
            }
            flowStepFunction.getBody().get().findFirst(StringLiteralExpr.class, s -> s.getValue().equals("$StartFromNode$")).ifPresent(s -> s.setValue((String) node.getMetaData().get("UniqueId")));
            flowStepFunction.getBody().get().findFirst(StringLiteralExpr.class, s -> s.getValue().equals("$TypePrefix$")).ifPresent(s -> s.setValue(process.getPackageName() + "." + processId + fversion + "."));
            flowStepFunction.getBody().get().findFirst(StringLiteralExpr.class, s -> s.getValue().equals("$ThisNode$")).ifPresent(s -> s.setValue(node.getName()));
            flowStepFunction.setName(sanitizeIdentifier(node.getName() + version).toLowerCase());
            template.addMember(flowStepFunction);
        } else if (node instanceof EndNode || node instanceof FaultNode) {
            discoveredFunctions.add(definedFunctionTrigger(node));
        }
    }
    // remove the template method
    callTemplate.removeForced();
    // process signals
    MethodDeclaration signalTemplate = template.findFirst(MethodDeclaration.class, md -> md.getNameAsString().equals("signalTemplate")).get();
    Optional.ofNullable(signals).ifPresent(signalsMap -> {
        AtomicInteger index = new AtomicInteger(0);
        signalsMap.entrySet().stream().filter(e -> Objects.nonNull(e.getKey())).forEach(entry -> {
            String signalName = entry.getKey();
            String signalType = entry.getValue();
            MethodDeclaration flowSignalFunction = produceSignalFunction("", signalName, signalType, signalTemplate, index, signalNodes.get(signalName));
            template.addMember(flowSignalFunction);
        });
    });
    if (triggers != null && !triggers.isEmpty()) {
        AtomicInteger index = new AtomicInteger(0);
        for (TriggerMetaData trigger : triggers) {
            if (trigger.getType().equals(TriggerMetaData.TriggerType.ConsumeMessage)) {
                String signalName = trigger.getName();
                String signalType = trigger.getDataType();
                MethodDeclaration flowSignalFunction = produceSignalFunction("Message-", signalName, signalType, signalTemplate, index, (Node) trigger.getContext("_node_"));
                VariableDeclarationExpr correlationVar = flowSignalFunction.findFirst(VariableDeclarationExpr.class, vd -> vd.getVariable(0).getNameAsString().equals("correlation")).get();
                if (trigger.getCorrelation() != null) {
                    correlationVar.getVariable(0).setInitializer(new StringLiteralExpr(trigger.getCorrelation()));
                } else if (trigger.getCorrelationExpression() != null) {
                    correlationVar.getVariable(0).setInitializer(new NameExpr(trigger.getCorrelationExpression()));
                }
                template.addMember(flowSignalFunction);
            }
        }
    }
    // remove the template method
    signalTemplate.removeForced();
    Map<String, String> typeInterpolations = new HashMap<>();
    typeInterpolations.put("$Clazz$", functionClazzName);
    typeInterpolations.put("$Type$", dataClazzName);
    template.findAll(ClassOrInterfaceType.class).forEach(cls -> interpolateTypes(cls, typeInterpolations));
    if (useInjection()) {
        template.findAll(FieldDeclaration.class, CodegenUtils::isProcessField).forEach(fd -> annotator.withNamedInjection(fd, processId + version));
        template.findAll(FieldDeclaration.class, CodegenUtils::isApplicationField).forEach(fd -> annotator.withInjection(fd));
        template.findAll(FieldDeclaration.class, CodegenUtils::isIdentitySupplierField).forEach(fd -> annotator.withInjection(fd));
        template.findAll(FieldDeclaration.class, CodegenUtils::isEventSourceField).forEach(fd -> annotator.withInjection(fd));
        template.findAll(MethodDeclaration.class, md -> md.isPublic()).forEach(md -> annotator.withFunction(md));
    }
    NodeList<Expression> items = NodeList.nodeList(discoveredFunctions.stream().map(s -> new StringLiteralExpr(s)).collect(Collectors.toList()));
    template.addAnnotation(new NormalAnnotationExpr(new Name(Generated.class.getCanonicalName()), NodeList.nodeList(new MemberValuePair("value", new ArrayInitializerExpr(items)), new MemberValuePair("reference", new StringLiteralExpr(context.getApplicationProperty("quarkus.google.cloud.project-id").orElse("missing"))), new MemberValuePair("name", new StringLiteralExpr(StringUtils.capitalize(ProcessToExecModelGenerator.extractProcessId(processId, version)))), new MemberValuePair("hidden", new BooleanLiteralExpr(false)))));
    template.getMembers().sort(new BodyDeclarationComparator());
    ImportsOrganizer.organize(clazz);
    return clazz.toString();
}
Also used : SubProcessNode(io.automatiko.engine.workflow.process.core.node.SubProcessNode) ClassOrInterfaceType(com.github.javaparser.ast.type.ClassOrInterfaceType) ProcessToExecModelGenerator(io.automatiko.engine.workflow.compiler.canonical.ProcessToExecModelGenerator) RuleSetNode(io.automatiko.engine.workflow.process.core.node.RuleSetNode) StaticJavaParser.parse(com.github.javaparser.StaticJavaParser.parse) Name(com.github.javaparser.ast.expr.Name) GeneratorContext(io.automatiko.engine.codegen.GeneratorContext) HashMap(java.util.HashMap) Node(io.automatiko.engine.api.definition.process.Node) ArrayList(java.util.ArrayList) Matcher(java.util.regex.Matcher) CodegenUtils.interpolateTypes(io.automatiko.engine.codegen.CodegenUtils.interpolateTypes) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) BoundaryEventNode(io.automatiko.engine.workflow.process.core.node.BoundaryEventNode) StringUtils(io.automatiko.engine.services.utils.StringUtils) Expression(com.github.javaparser.ast.expr.Expression) CompilationUnit(com.github.javaparser.ast.CompilationUnit) TriggerMetaData(io.automatiko.engine.workflow.compiler.canonical.TriggerMetaData) DependencyInjectionAnnotator(io.automatiko.engine.codegen.di.DependencyInjectionAnnotator) CodegenUtils(io.automatiko.engine.codegen.CodegenUtils) NodeList(com.github.javaparser.ast.NodeList) BooleanLiteralExpr(com.github.javaparser.ast.expr.BooleanLiteralExpr) WorkflowProcess(io.automatiko.engine.api.definition.process.WorkflowProcess) ActionNode(io.automatiko.engine.workflow.process.core.node.ActionNode) BodyDeclarationComparator(io.automatiko.engine.codegen.BodyDeclarationComparator) FaultNode(io.automatiko.engine.workflow.process.core.node.FaultNode) NameExpr(com.github.javaparser.ast.expr.NameExpr) Collectors(java.util.stream.Collectors) NormalAnnotationExpr(com.github.javaparser.ast.expr.NormalAnnotationExpr) StringLiteralExpr(com.github.javaparser.ast.expr.StringLiteralExpr) VariableDeclarationExpr(com.github.javaparser.ast.expr.VariableDeclarationExpr) Objects(java.util.Objects) List(java.util.List) FieldDeclaration(com.github.javaparser.ast.body.FieldDeclaration) MethodDeclaration(com.github.javaparser.ast.body.MethodDeclaration) MemberValuePair(com.github.javaparser.ast.expr.MemberValuePair) WorkItemNode(io.automatiko.engine.workflow.process.core.node.WorkItemNode) Optional(java.util.Optional) StartNode(io.automatiko.engine.workflow.process.core.node.StartNode) Pattern(java.util.regex.Pattern) ArrayInitializerExpr(com.github.javaparser.ast.expr.ArrayInitializerExpr) ClassOrInterfaceDeclaration(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration) Generated(io.automatiko.engine.api.codegen.Generated) ImportsOrganizer(io.automatiko.engine.codegen.ImportsOrganizer) EndNode(io.automatiko.engine.workflow.process.core.node.EndNode) EventNode(io.automatiko.engine.workflow.process.core.node.EventNode) ClassOrInterfaceDeclaration(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration) Matcher(java.util.regex.Matcher) HashMap(java.util.HashMap) SubProcessNode(io.automatiko.engine.workflow.process.core.node.SubProcessNode) RuleSetNode(io.automatiko.engine.workflow.process.core.node.RuleSetNode) Node(io.automatiko.engine.api.definition.process.Node) BoundaryEventNode(io.automatiko.engine.workflow.process.core.node.BoundaryEventNode) ActionNode(io.automatiko.engine.workflow.process.core.node.ActionNode) FaultNode(io.automatiko.engine.workflow.process.core.node.FaultNode) WorkItemNode(io.automatiko.engine.workflow.process.core.node.WorkItemNode) StartNode(io.automatiko.engine.workflow.process.core.node.StartNode) EndNode(io.automatiko.engine.workflow.process.core.node.EndNode) EventNode(io.automatiko.engine.workflow.process.core.node.EventNode) ArrayList(java.util.ArrayList) StringLiteralExpr(com.github.javaparser.ast.expr.StringLiteralExpr) NameExpr(com.github.javaparser.ast.expr.NameExpr) ClassOrInterfaceType(com.github.javaparser.ast.type.ClassOrInterfaceType) FieldDeclaration(com.github.javaparser.ast.body.FieldDeclaration) Name(com.github.javaparser.ast.expr.Name) MemberValuePair(com.github.javaparser.ast.expr.MemberValuePair) ArrayInitializerExpr(com.github.javaparser.ast.expr.ArrayInitializerExpr) BooleanLiteralExpr(com.github.javaparser.ast.expr.BooleanLiteralExpr) BodyDeclarationComparator(io.automatiko.engine.codegen.BodyDeclarationComparator) NormalAnnotationExpr(com.github.javaparser.ast.expr.NormalAnnotationExpr) CompilationUnit(com.github.javaparser.ast.CompilationUnit) VariableDeclarationExpr(com.github.javaparser.ast.expr.VariableDeclarationExpr) Generated(io.automatiko.engine.api.codegen.Generated) MethodDeclaration(com.github.javaparser.ast.body.MethodDeclaration) TriggerMetaData(io.automatiko.engine.workflow.compiler.canonical.TriggerMetaData) FaultNode(io.automatiko.engine.workflow.process.core.node.FaultNode) EndNode(io.automatiko.engine.workflow.process.core.node.EndNode) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Expression(com.github.javaparser.ast.expr.Expression)

Example 2 with EndNode

use of io.automatiko.engine.workflow.process.core.node.EndNode in project automatiko-engine by automatiko-io.

the class DmnDecisionInProcessTest method createProcess.

private ExecutableProcess createProcess(String namespace, String modelName, String decisionName) {
    DMNRuntime dmnRuntime = DmnRuntimeProvider.fromClassPath("PersonDecisions.dmn");
    DmnDecisionModel dmnDecisionModel = new DmnDecisionModel(dmnRuntime, namespace, modelName);
    ExecutableProcess process = new ExecutableProcess();
    process.setId("process");
    process.setName("Process");
    List<Variable> variables = new ArrayList<Variable>();
    Variable variable1 = new Variable();
    variable1.setName("person");
    variable1.setType(new ObjectDataType(Person.class));
    variables.add(variable1);
    Variable variable2 = new Variable();
    variable2.setName("isAdult");
    variable2.setType(new BooleanDataType());
    variables.add(variable2);
    process.getVariableScope().setVariables(variables);
    StartNode startNode = new StartNode();
    startNode.setName("Start");
    startNode.setId(1);
    RuleSetNode ruleSetNode = new RuleSetNode();
    ruleSetNode.setName("RuleSetNode");
    ruleSetNode.setId(2);
    ruleSetNode.setRuleType(RuleSetNode.RuleType.decision(namespace, modelName, null));
    ruleSetNode.setLanguage(RuleSetNode.DMN_LANG);
    ruleSetNode.setDecisionModel(() -> dmnDecisionModel);
    ruleSetNode.addInMapping("Person", "person");
    ruleSetNode.addOutMapping("isAdult", "isAdult");
    EndNode endNode = new EndNode();
    endNode.setName("End");
    endNode.setId(3);
    connect(startNode, ruleSetNode);
    connect(ruleSetNode, endNode);
    process.addNode(startNode);
    process.addNode(ruleSetNode);
    process.addNode(endNode);
    return process;
}
Also used : StartNode(io.automatiko.engine.workflow.process.core.node.StartNode) Variable(io.automatiko.engine.workflow.base.core.context.variable.Variable) EndNode(io.automatiko.engine.workflow.process.core.node.EndNode) RuleSetNode(io.automatiko.engine.workflow.process.core.node.RuleSetNode) DmnDecisionModel(io.automatiko.engine.decision.dmn.DmnDecisionModel) ArrayList(java.util.ArrayList) ExecutableProcess(io.automatiko.engine.workflow.process.executable.core.ExecutableProcess) ObjectDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.ObjectDataType) BooleanDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.BooleanDataType) DMNRuntime(org.kie.dmn.api.core.DMNRuntime)

Example 3 with EndNode

use of io.automatiko.engine.workflow.process.core.node.EndNode in project automatiko-engine by automatiko-io.

the class EndEventHandler method handleTerminateNode.

public void handleTerminateNode(final Node node, final Element element, final String uri, final String localName, final ExtensibleXmlParser parser) throws SAXException {
    ((EndNode) node).setTerminate(true);
    EndNode endNode = (EndNode) node;
    org.w3c.dom.Node xmlNode = element.getFirstChild();
    while (xmlNode != null) {
        String nodeName = xmlNode.getNodeName();
        if ("terminateEventDefinition".equals(nodeName)) {
            String scope = ((Element) xmlNode).getAttribute("scope");
            if ("process".equalsIgnoreCase(scope)) {
                endNode.setScope(EndNode.PROCESS_SCOPE);
            } else {
                endNode.setScope(EndNode.CONTAINER_SCOPE);
            }
        }
        xmlNode = xmlNode.getNextSibling();
    }
}
Also used : EndNode(io.automatiko.engine.workflow.process.core.node.EndNode) Element(org.w3c.dom.Element)

Example 4 with EndNode

use of io.automatiko.engine.workflow.process.core.node.EndNode in project automatiko-engine by automatiko-io.

the class EndEventHandler method createNode.

protected Node createNode(Attributes attrs) {
    EndNode node = new EndNode();
    node.setTerminate(false);
    return node;
}
Also used : EndNode(io.automatiko.engine.workflow.process.core.node.EndNode)

Example 5 with EndNode

use of io.automatiko.engine.workflow.process.core.node.EndNode in project automatiko-engine by automatiko-io.

the class ServerlessWorkflowParser method addErrorHandlingToState.

protected void addErrorHandlingToState(Workflow workflow, State state, ServerlessWorkflowFactory factory, AtomicLong ids, WorkflowProcess process, CompositeContextNode subprocess) {
    if (state.getOnErrors() != null) {
        for (io.serverlessworkflow.api.error.Error error : state.getOnErrors()) {
            List<ErrorDefinition> defs = new ArrayList<>();
            if (error.getErrorRef() != null) {
                workflow.getErrors().getErrorDefs().stream().filter(err -> err.getName().equals(error.getErrorRef())).forEach(err -> defs.add(err));
            } else {
                workflow.getErrors().getErrorDefs().stream().filter(err -> error.getErrorRefs().contains(err.getName())).forEach(err -> defs.add(err));
            }
            BoundaryEventNode errorNode = factory.errorBoundaryEventNode(ids.getAndIncrement(), defs, null, process, subprocess, workflow);
            if (error.getEnd() != null) {
                EndNode onErrorEnd = factory.endNode(ids.getAndIncrement(), state.getName() + "onErrorEnd", error.getEnd().isTerminate(), process);
                if (error.getEnd().getProduceEvents() != null && !error.getEnd().getProduceEvents().isEmpty()) {
                    produceEvents(error.getEnd().getProduceEvents(), factory, workflow, ids, process, errorNode.getId(), onErrorEnd.getId());
                } else {
                    factory.connect(errorNode.getId(), onErrorEnd.getId(), "connect_" + errorNode.getId() + "_" + onErrorEnd.getId(), process, false);
                }
            } else {
                if (error.getTransition().getNextState() != null) {
                    for (io.automatiko.engine.api.definition.process.Node node : process.getNodes()) {
                        if (node.getName().equals(error.getTransition().getNextState())) {
                            if (error.getTransition().getProduceEvents() != null && !error.getTransition().getProduceEvents().isEmpty()) {
                                produceEvents(error.getTransition().getProduceEvents(), factory, workflow, ids, process, errorNode.getId(), node.getId());
                            } else {
                                factory.connect(errorNode.getId(), node.getId(), "connect_" + errorNode.getId() + "_" + node.getId(), process, false);
                            }
                            break;
                        }
                    }
                }
            }
        }
    }
}
Also used : Arrays(java.util.Arrays) TimerNode(io.automatiko.engine.workflow.process.core.node.TimerNode) Workflow(io.serverlessworkflow.api.Workflow) CompositeContextNode(io.automatiko.engine.workflow.process.core.node.CompositeContextNode) Map(java.util.Map) CompletionType(io.serverlessworkflow.api.states.ParallelState.CompletionType) EventState(io.serverlessworkflow.api.states.EventState) OnEvents(io.serverlessworkflow.api.events.OnEvents) Process(io.automatiko.engine.api.definition.process.Process) InputJqAssignmentAction(io.automatiko.engine.workflow.base.instance.impl.jq.InputJqAssignmentAction) Branch(io.serverlessworkflow.api.branches.Branch) JqReturnValueEvaluator(io.automatiko.engine.workflow.base.instance.impl.jq.JqReturnValueEvaluator) EventCondition(io.serverlessworkflow.api.switchconditions.EventCondition) Invoke(io.serverlessworkflow.api.functions.SubFlowRef.Invoke) InjectState(io.serverlessworkflow.api.states.InjectState) ActionNode(io.automatiko.engine.workflow.process.core.node.ActionNode) ErrorDefinition(io.serverlessworkflow.api.error.ErrorDefinition) Reader(java.io.Reader) UUID(java.util.UUID) ReturnValueConstraintEvaluator(io.automatiko.engine.workflow.base.instance.impl.ReturnValueConstraintEvaluator) ParallelState(io.serverlessworkflow.api.states.ParallelState) StandardCharsets(java.nio.charset.StandardCharsets) UncheckedIOException(java.io.UncheckedIOException) Objects(java.util.Objects) List(java.util.List) State(io.serverlessworkflow.api.interfaces.State) WorkItemNode(io.automatiko.engine.workflow.process.core.node.WorkItemNode) Optional(java.util.Optional) Join(io.automatiko.engine.workflow.process.core.node.Join) WorkflowUtils(io.serverlessworkflow.utils.WorkflowUtils) DefaultState(io.serverlessworkflow.api.states.DefaultState) SubProcessNode(io.automatiko.engine.workflow.process.core.node.SubProcessNode) DataCondition(io.serverlessworkflow.api.switchconditions.DataCondition) Assignment(io.automatiko.engine.workflow.process.core.node.Assignment) Action(io.serverlessworkflow.api.actions.Action) NodeContainer(io.automatiko.engine.workflow.process.core.NodeContainer) Split(io.automatiko.engine.workflow.process.core.node.Split) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) ProduceEvent(io.serverlessworkflow.api.produce.ProduceEvent) OutputJqAssignmentAction(io.automatiko.engine.workflow.base.instance.impl.jq.OutputJqAssignmentAction) DataAssociation(io.automatiko.engine.workflow.process.core.node.DataAssociation) FunctionDefinition(io.serverlessworkflow.api.functions.FunctionDefinition) OperationState(io.serverlessworkflow.api.states.OperationState) BoundaryEventNode(io.automatiko.engine.workflow.process.core.node.BoundaryEventNode) Type(io.serverlessworkflow.api.states.DefaultState.Type) BiConsumer(java.util.function.BiConsumer) WorkflowProcess(io.automatiko.engine.workflow.process.core.WorkflowProcess) Connection(io.automatiko.engine.api.definition.process.Connection) Node(io.automatiko.engine.workflow.process.core.Node) CallbackState(io.serverlessworkflow.api.states.CallbackState) ExecutableProcess(io.automatiko.engine.workflow.process.executable.core.ExecutableProcess) IOException(java.io.IOException) DateTimeUtils(io.automatiko.engine.workflow.base.core.timer.DateTimeUtils) OnParentComplete(io.serverlessworkflow.api.functions.SubFlowRef.OnParentComplete) EventDefinition(io.serverlessworkflow.api.events.EventDefinition) SleepState(io.serverlessworkflow.api.states.SleepState) RetryDefinition(io.serverlessworkflow.api.retry.RetryDefinition) AtomicLong(java.util.concurrent.atomic.AtomicLong) StartNode(io.automatiko.engine.workflow.process.core.node.StartNode) ActionMode(io.serverlessworkflow.api.states.OperationState.ActionMode) SwitchState(io.serverlessworkflow.api.states.SwitchState) Collections(java.util.Collections) EndNode(io.automatiko.engine.workflow.process.core.node.EndNode) EventNode(io.automatiko.engine.workflow.process.core.node.EventNode) ErrorDefinition(io.serverlessworkflow.api.error.ErrorDefinition) ArrayList(java.util.ArrayList) BoundaryEventNode(io.automatiko.engine.workflow.process.core.node.BoundaryEventNode) EndNode(io.automatiko.engine.workflow.process.core.node.EndNode)

Aggregations

EndNode (io.automatiko.engine.workflow.process.core.node.EndNode)36 StartNode (io.automatiko.engine.workflow.process.core.node.StartNode)23 ActionNode (io.automatiko.engine.workflow.process.core.node.ActionNode)19 ExecutableProcess (io.automatiko.engine.workflow.process.executable.core.ExecutableProcess)19 ArrayList (java.util.ArrayList)19 WorkItemNode (io.automatiko.engine.workflow.process.core.node.WorkItemNode)14 ConsequenceAction (io.automatiko.engine.workflow.process.core.impl.ConsequenceAction)13 ProcessAction (io.automatiko.engine.workflow.process.core.ProcessAction)12 EventNode (io.automatiko.engine.workflow.process.core.node.EventNode)11 CompositeNode (io.automatiko.engine.workflow.process.core.node.CompositeNode)10 BoundaryEventNode (io.automatiko.engine.workflow.process.core.node.BoundaryEventNode)9 EventSubProcessNode (io.automatiko.engine.workflow.process.core.node.EventSubProcessNode)9 List (java.util.List)9 EventTypeFilter (io.automatiko.engine.workflow.base.core.event.EventTypeFilter)8 Action (io.automatiko.engine.workflow.base.instance.impl.Action)8 CompositeContextNode (io.automatiko.engine.workflow.process.core.node.CompositeContextNode)8 FaultNode (io.automatiko.engine.workflow.process.core.node.FaultNode)8 Test (org.junit.jupiter.api.Test)8 Node (io.automatiko.engine.api.definition.process.Node)7 ProcessContext (io.automatiko.engine.api.runtime.process.ProcessContext)7