Search in sources :

Example 11 with Variable

use of io.automatiko.engine.workflow.base.core.context.variable.Variable in project automatiko-engine by automatiko-io.

the class DataObjectHandler method start.

@SuppressWarnings("unchecked")
public Object start(final String uri, final String localName, final Attributes attrs, final ExtensibleXmlParser parser) throws SAXException {
    parser.startElementBuilder(localName, attrs);
    final String id = attrs.getValue("id");
    final String name = attrs.getValue("name");
    final String itemSubjectRef = attrs.getValue("itemSubjectRef");
    Object parent = parser.getParent();
    if (parent instanceof ContextContainer) {
        ContextContainer contextContainer = (ContextContainer) parent;
        VariableScope variableScope = (VariableScope) contextContainer.getDefaultContext(VariableScope.VARIABLE_SCOPE);
        if (variableScope == null) {
            return null;
        }
        List variables = variableScope.getVariables();
        Variable variable = new Variable();
        variable.setMetaData("DataObject", "true");
        variable.setId(id);
        variable.setName(name);
        variable.setMetaData(id, variable.getName());
        if (localName.equals("dataInput")) {
            variable.setMetaData("DataInput", true);
        } else if (localName.equals("dataOutput")) {
            variable.setMetaData("DataOutput", true);
        }
        // retrieve type from item definition
        DataType dataType = new ObjectDataType();
        Map<String, ItemDefinition> itemDefinitions = (Map<String, ItemDefinition>) ((ProcessBuildData) parser.getData()).getMetaData("ItemDefinitions");
        if (itemDefinitions != null) {
            ItemDefinition itemDefinition = itemDefinitions.get(itemSubjectRef);
            if (itemDefinition != null) {
                String structureRef = itemDefinition.getStructureRef();
                if ("java.lang.Boolean".equals(structureRef) || "Boolean".equals(structureRef)) {
                    dataType = new BooleanDataType();
                } else if ("java.lang.Integer".equals(structureRef) || "Integer".equals(structureRef)) {
                    dataType = new IntegerDataType();
                } else if ("java.lang.Float".equals(structureRef) || "Float".equals(structureRef)) {
                    dataType = new FloatDataType();
                } else if ("java.lang.String".equals(structureRef) || "String".equals(structureRef)) {
                    dataType = new StringDataType();
                } else if ("java.lang.Object".equals(structureRef) || "Object".equals(structureRef)) {
                    // use FQCN of Object
                    dataType = new ObjectDataType(java.lang.Object.class, structureRef);
                } else {
                    dataType = new ObjectDataType(constructClass(structureRef, parser.getClassLoader()), structureRef);
                }
            }
        }
        variable.setType(dataType);
        variables.add(variable);
        return variable;
    }
    return new Variable();
}
Also used : FloatDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.FloatDataType) Variable(io.automatiko.engine.workflow.base.core.context.variable.Variable) IntegerDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.IntegerDataType) ItemDefinition(io.automatiko.engine.workflow.bpmn2.core.ItemDefinition) ObjectDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.ObjectDataType) StringDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.StringDataType) ContextContainer(io.automatiko.engine.workflow.base.core.ContextContainer) DataType(io.automatiko.engine.api.workflow.datatype.DataType) ObjectDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.ObjectDataType) FloatDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.FloatDataType) IntegerDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.IntegerDataType) BooleanDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.BooleanDataType) StringDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.StringDataType) List(java.util.List) BooleanDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.BooleanDataType) Map(java.util.Map) VariableScope(io.automatiko.engine.workflow.base.core.context.variable.VariableScope)

Example 12 with Variable

use of io.automatiko.engine.workflow.base.core.context.variable.Variable in project automatiko-engine by automatiko-io.

the class NodeInnerClassesTest method testNodeReading.

@Test
public void testNodeReading() {
    ExecutableProcess process = new ExecutableProcess();
    process.setId("org.company.core.process.event");
    process.setName("Event Process");
    List<Variable> variables = new ArrayList<Variable>();
    Variable variable = new Variable();
    variable.setName("event");
    ObjectDataType personDataType = new ObjectDataType(Person.class);
    variable.setType(personDataType);
    variables.add(variable);
    process.getVariableScope().setVariables(variables);
    process.setDynamic(true);
    CompositeNode compositeNode = new CompositeNode();
    compositeNode.setName("CompositeNode");
    compositeNode.setId(2);
    ForEachNode forEachNode = new ForEachNode();
    ForEachNode.ForEachSplitNode split = new ForEachNode.ForEachSplitNode();
    split.setName("ForEachSplit");
    split.setMetaData("hidden", true);
    split.setMetaData("UniqueId", forEachNode.getMetaData("Uniqueid") + ":foreach:split");
    forEachNode.internalAddNode(split);
    forEachNode.linkIncomingConnections(io.automatiko.engine.workflow.process.core.Node.CONNECTION_DEFAULT_TYPE, new CompositeNode.NodeAndType(split, io.automatiko.engine.workflow.process.core.Node.CONNECTION_DEFAULT_TYPE));
    process.addNode(forEachNode);
    InternalProcessRuntime ksession = createProcessRuntime(process);
    TestProcessEventListener procEventListener = new TestProcessEventListener();
    ksession.addEventListener(procEventListener);
    ProcessInstance processInstance = ksession.startProcess("org.company.core.process.event");
    assertNotNull(processInstance);
}
Also used : Variable(io.automatiko.engine.workflow.base.core.context.variable.Variable) ArrayList(java.util.ArrayList) ObjectDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.ObjectDataType) CompositeNode(io.automatiko.engine.workflow.process.core.node.CompositeNode) ExecutableProcess(io.automatiko.engine.workflow.process.executable.core.ExecutableProcess) ForEachNode(io.automatiko.engine.workflow.process.core.node.ForEachNode) InternalProcessRuntime(io.automatiko.engine.workflow.base.instance.InternalProcessRuntime) ProcessInstance(io.automatiko.engine.api.runtime.process.ProcessInstance) TestProcessEventListener(io.automatiko.engine.workflow.process.test.TestProcessEventListener) Test(org.junit.jupiter.api.Test) AbstractBaseTest(io.automatiko.engine.workflow.test.util.AbstractBaseTest)

Example 13 with Variable

use of io.automatiko.engine.workflow.base.core.context.variable.Variable in project automatiko-engine by automatiko-io.

the class LambdaSubProcessNodeVisitor method unbind.

private BlockStmt unbind(VariableScope variableScope, SubProcessNode subProcessNode) {
    BlockStmt stmts = new BlockStmt();
    for (Map.Entry<String, String> e : subProcessNode.getOutMappings().entrySet()) {
        // check if given mapping is an expression
        Matcher matcher = PatternConstants.PARAMETER_MATCHER.matcher(e.getValue());
        if (matcher.find()) {
            String expression = matcher.group(1);
            String topLevelVariable = expression.split("\\.")[0];
            Map<String, String> dataOutputs = (Map<String, String>) subProcessNode.getMetaData("BPMN.OutputTypes");
            Variable variable = new Variable();
            variable.setName(topLevelVariable);
            variable.setType(new ObjectDataType(constructClass(dataOutputs.get(e.getKey())), dataOutputs.get(e.getKey())));
            stmts.addStatement(makeAssignment(variableScope.findVariable(topLevelVariable)));
            stmts.addStatement(makeAssignmentFromModel(variable, e.getKey()));
            stmts.addStatement(dotNotationToSetExpression(expression, e.getKey()));
            stmts.addStatement(new MethodCallExpr().setScope(new NameExpr(KCONTEXT_VAR)).setName("setVariable").addArgument(new StringLiteralExpr(topLevelVariable)).addArgument(topLevelVariable));
        } else {
            stmts.addStatement(makeAssignmentFromModel(variableScope.findVariable(e.getValue()), e.getKey()));
            stmts.addStatement(new MethodCallExpr().setScope(new NameExpr(KCONTEXT_VAR)).setName("setVariable").addArgument(new StringLiteralExpr(e.getValue())).addArgument(e.getKey()));
        }
    }
    return stmts;
}
Also used : Variable(io.automatiko.engine.workflow.base.core.context.variable.Variable) Matcher(java.util.regex.Matcher) BlockStmt(com.github.javaparser.ast.stmt.BlockStmt) NameExpr(com.github.javaparser.ast.expr.NameExpr) StringLiteralExpr(com.github.javaparser.ast.expr.StringLiteralExpr) ObjectDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.ObjectDataType) Map(java.util.Map) MethodCallExpr(com.github.javaparser.ast.expr.MethodCallExpr)

Example 14 with Variable

use of io.automatiko.engine.workflow.base.core.context.variable.Variable in project automatiko-engine by automatiko-io.

the class LambdaSubProcessNodeVisitor method bind.

private BlockStmt bind(VariableScope variableScope, SubProcessNode subProcessNode, ModelMetaData subProcessModel) {
    BlockStmt actionBody = new BlockStmt();
    actionBody.addStatement(subProcessModel.newInstance("model"));
    for (Map.Entry<String, String> e : subProcessNode.getInMappings().entrySet()) {
        // check if given mapping is an expression
        Matcher matcher = PatternConstants.PARAMETER_MATCHER.matcher(e.getValue());
        if (matcher.find()) {
            String expression = matcher.group(1);
            String topLevelVariable = expression.split("\\.")[0];
            Variable v = variableScope.findVariable(topLevelVariable);
            if (actionBody.findFirst(VariableDeclarationExpr.class, vd -> vd.getVariable(0).getNameAsString().equals(v.getSanitizedName())).isEmpty()) {
                actionBody.addStatement(makeAssignment(v));
            }
            actionBody.addStatement(subProcessModel.callSetter("model", e.getKey(), dotNotationToGetExpression(expression)));
        } else {
            Variable v = variableScope.findVariable(e.getValue());
            if (v != null) {
                if (actionBody.findFirst(VariableDeclarationExpr.class, vd -> vd.getVariable(0).getNameAsString().equals(v.getSanitizedName())).isEmpty()) {
                    actionBody.addStatement(makeAssignment(v));
                }
                actionBody.addStatement(subProcessModel.callSetter("model", e.getKey(), e.getValue()));
            }
        }
    }
    actionBody.addStatement(new ReturnStmt(new NameExpr("model")));
    return actionBody;
}
Also used : SubProcessNode(io.automatiko.engine.workflow.process.core.node.SubProcessNode) ClassOrInterfaceType(com.github.javaparser.ast.type.ClassOrInterfaceType) ConditionalExpr(com.github.javaparser.ast.expr.ConditionalExpr) ReturnStmt(com.github.javaparser.ast.stmt.ReturnStmt) StaticJavaParser.parse(com.github.javaparser.StaticJavaParser.parse) ObjectDataType(io.automatiko.engine.workflow.base.core.datatype.impl.type.ObjectDataType) NullLiteralExpr(com.github.javaparser.ast.expr.NullLiteralExpr) Matcher(java.util.regex.Matcher) Map(java.util.Map) StringUtils(io.automatiko.engine.services.utils.StringUtils) Expression(com.github.javaparser.ast.expr.Expression) BinaryExpr(com.github.javaparser.ast.expr.BinaryExpr) METHOD_WAIT_FOR_COMPLETION(io.automatiko.engine.workflow.process.executable.core.factory.SubProcessNodeFactory.METHOD_WAIT_FOR_COMPLETION) BooleanLiteralExpr(com.github.javaparser.ast.expr.BooleanLiteralExpr) METHOD_PROCESS_ID(io.automatiko.engine.workflow.process.executable.core.factory.SubProcessNodeFactory.METHOD_PROCESS_ID) MethodCallExpr(com.github.javaparser.ast.expr.MethodCallExpr) WorkflowProcess(io.automatiko.engine.api.definition.process.WorkflowProcess) AssignExpr(com.github.javaparser.ast.expr.AssignExpr) NameExpr(com.github.javaparser.ast.expr.NameExpr) SubProcessNodeFactory(io.automatiko.engine.workflow.process.executable.core.factory.SubProcessNodeFactory) VariableScope(io.automatiko.engine.workflow.base.core.context.variable.VariableScope) StringLiteralExpr(com.github.javaparser.ast.expr.StringLiteralExpr) ClassUtils.constructClass(io.automatiko.engine.workflow.compiler.util.ClassUtils.constructClass) VariableDeclarationExpr(com.github.javaparser.ast.expr.VariableDeclarationExpr) PatternConstants(io.automatiko.engine.workflow.util.PatternConstants) MethodDeclaration(com.github.javaparser.ast.body.MethodDeclaration) Optional(java.util.Optional) Variable(io.automatiko.engine.workflow.base.core.context.variable.Variable) LongLiteralExpr(com.github.javaparser.ast.expr.LongLiteralExpr) BlockStmt(com.github.javaparser.ast.stmt.BlockStmt) METHOD_PROCESS_VERSION(io.automatiko.engine.workflow.process.executable.core.factory.SubProcessNodeFactory.METHOD_PROCESS_VERSION) METHOD_PROCESS_NAME(io.automatiko.engine.workflow.process.executable.core.factory.SubProcessNodeFactory.METHOD_PROCESS_NAME) METHOD_INDEPENDENT(io.automatiko.engine.workflow.process.executable.core.factory.SubProcessNodeFactory.METHOD_INDEPENDENT) InputStream(java.io.InputStream) VariableDeclarationExpr(com.github.javaparser.ast.expr.VariableDeclarationExpr) Variable(io.automatiko.engine.workflow.base.core.context.variable.Variable) Matcher(java.util.regex.Matcher) BlockStmt(com.github.javaparser.ast.stmt.BlockStmt) NameExpr(com.github.javaparser.ast.expr.NameExpr) Map(java.util.Map) ReturnStmt(com.github.javaparser.ast.stmt.ReturnStmt)

Example 15 with Variable

use of io.automatiko.engine.workflow.base.core.context.variable.Variable in project automatiko-engine by automatiko-io.

the class ModelMetaData method compilationUnit.

private CompilationUnit compilationUnit(String... annotations) {
    CompilationUnit compilationUnit = parse(this.getClass().getResourceAsStream(templateName));
    compilationUnit.setPackageDeclaration(packageName);
    Optional<ClassOrInterfaceDeclaration> processMethod = compilationUnit.findFirst(ClassOrInterfaceDeclaration.class, sl1 -> true);
    if (!processMethod.isPresent()) {
        throw new NoSuchElementException("Cannot find class declaration in the template");
    }
    ClassOrInterfaceDeclaration modelClass = processMethod.get();
    for (String annotation : annotations) {
        modelClass.addAnnotation(annotation);
    }
    if (asEntity) {
        modelClass.addExtendedType("io.automatiko.engine.addons.persistence.db.model.ProcessInstanceEntity");
        modelClass.addAnnotation(new NormalAnnotationExpr(new Name("javax.persistence.Entity"), NodeList.nodeList(new MemberValuePair("name", new StringLiteralExpr(camelToSnake(processId.toUpperCase() + version(version).toUpperCase()))))));
        modelClass.findAll(FieldDeclaration.class, fd -> fd.getVariable(0).getNameAsString().equals("metadata")).forEach(fd -> fd.addAnnotation("javax.persistence.Transient"));
    }
    if (supportsOpenApi) {
        modelClass.addAnnotation(new NormalAnnotationExpr(new Name("org.eclipse.microprofile.openapi.annotations.media.Schema"), NodeList.nodeList(new MemberValuePair("name", new StringLiteralExpr(name.replaceAll("\\s", ""))), new MemberValuePair("description", new StringLiteralExpr(description)))));
    }
    if (!WorkflowProcess.PRIVATE_VISIBILITY.equals(visibility)) {
        modelClass.addAnnotation(new NormalAnnotationExpr(new Name(Generated.class.getCanonicalName()), NodeList.nodeList(new MemberValuePair("value", new StringLiteralExpr("automatik-codegen")), new MemberValuePair("reference", new StringLiteralExpr(processId)), new MemberValuePair("name", new StringLiteralExpr(StringUtils.capitalize(ProcessToExecModelGenerator.extractProcessId(processId, version)))), new MemberValuePair("hidden", new BooleanLiteralExpr(hidden)))));
    }
    modelClass.setName(modelClassSimpleName);
    modelClass.getConstructors().forEach(c -> c.setName(modelClass.getName()));
    modelClass.findAll(MethodDeclaration.class, md -> md.getNameAsString().equals("build")).forEach(md -> {
        md.getBody().get().findAll(SimpleName.class).stream().findFirst().ifPresent(o -> {
            o.setIdentifier(modelClassSimpleName);
        });
        md.toString();
    });
    modelClass.findAll(AnnotationExpr.class, ae -> ae.getNameAsString().equals("JsonDeserialize")).forEach(ae -> {
        ae.findAll(ClassOrInterfaceType.class, cit -> cit.getNameAsString().contains("$TYPE$")).stream().findFirst().ifPresent(cit -> cit.setName(cit.getNameAsString().replaceAll("\\$TYPE\\$", modelClassSimpleName)));
        ae.toString();
    });
    // setup of the toMap method body
    BlockStmt toMapBody = new BlockStmt();
    ClassOrInterfaceType toMap = new ClassOrInterfaceType(null, new SimpleName(Map.class.getSimpleName()), NodeList.nodeList(new ClassOrInterfaceType(null, String.class.getSimpleName()), new ClassOrInterfaceType(null, Object.class.getSimpleName())));
    VariableDeclarationExpr paramsField = new VariableDeclarationExpr(toMap, "params");
    toMapBody.addStatement(new AssignExpr(paramsField, new ObjectCreationExpr(null, new ClassOrInterfaceType(null, new SimpleName(HashMap.class.getSimpleName()), NodeList.nodeList(new ClassOrInterfaceType(null, String.class.getSimpleName()), new ClassOrInterfaceType(null, Object.class.getSimpleName()))), NodeList.nodeList()), AssignExpr.Operator.ASSIGN));
    // setup of static fromMap method body
    BlockStmt staticFromMap = new BlockStmt();
    if (modelClass.findFirst(MethodDeclaration.class, md -> md.getNameAsString().equals("getId")).isPresent()) {
        FieldAccessExpr idField = new FieldAccessExpr(new ThisExpr(), "id");
        staticFromMap.addStatement(new AssignExpr(idField, new NameExpr("id"), AssignExpr.Operator.ASSIGN));
    }
    for (Map.Entry<String, Variable> variable : variableScope.getTypes().entrySet()) {
        String varName = variable.getValue().getName();
        String vtype = variable.getValue().getType().getStringType();
        String sanitizedName = variable.getValue().getSanitizedName();
        FieldDeclaration fd = declareField(sanitizedName, vtype);
        modelClass.addMember(fd);
        List<String> tags = variable.getValue().getTags();
        fd.addAnnotation(new NormalAnnotationExpr(new Name(VariableInfo.class.getCanonicalName()), NodeList.nodeList(new MemberValuePair("tags", new StringLiteralExpr(tags.stream().collect(Collectors.joining(",")))))));
        fd.addAnnotation(new NormalAnnotationExpr(new Name(JsonProperty.class.getCanonicalName()), NodeList.nodeList(new MemberValuePair("value", new StringLiteralExpr(varName)))));
        if (asEntity && tags.contains(Variable.TRANSIENT_TAG)) {
            fd.addAnnotation("javax.persistence.Transient");
        }
        if (supportsOpenApi) {
            fd.addAnnotation(new NormalAnnotationExpr(new Name("org.eclipse.microprofile.openapi.annotations.media.Schema"), NodeList.nodeList(new MemberValuePair("name", new StringLiteralExpr(sanitizedName)), new MemberValuePair("description", new StringLiteralExpr(getOrDefault((String) variable.getValue().getMetaData("Documentation"), ""))))));
        }
        applyValidation(fd, tags);
        applyPersistence(variable.getValue().getType(), fd, tags);
        fd.createGetter();
        fd.createSetter();
        // toMap method body
        MethodCallExpr putVariable = new MethodCallExpr(new NameExpr("params"), "put");
        putVariable.addArgument(new StringLiteralExpr(varName));
        putVariable.addArgument(new FieldAccessExpr(new ThisExpr(), sanitizedName));
        toMapBody.addStatement(putVariable);
        ClassOrInterfaceType type = parseClassOrInterfaceType(vtype);
        // from map instance method body
        FieldAccessExpr instanceField = new FieldAccessExpr(new ThisExpr(), sanitizedName);
        staticFromMap.addStatement(new AssignExpr(instanceField, new CastExpr(type, new MethodCallExpr(new NameExpr("params"), "get").addArgument(new StringLiteralExpr(varName))), AssignExpr.Operator.ASSIGN));
    }
    Optional<MethodDeclaration> toMapMethod = modelClass.findFirst(MethodDeclaration.class, sl -> sl.getName().asString().equals("toMap"));
    toMapBody.addStatement(new ReturnStmt(new NameExpr("params")));
    toMapMethod.ifPresent(methodDeclaration -> methodDeclaration.setBody(toMapBody));
    modelClass.findFirst(MethodDeclaration.class, // make sure
    sl -> sl.getName().asString().equals("fromMap") && sl.getParameters().size() == 2).ifPresent(m -> m.setBody(staticFromMap));
    for (Consumer<CompilationUnit> augmentor : augmentors) {
        augmentor.accept(compilationUnit);
    }
    if (!workflowType.equals(Process.WORKFLOW_TYPE)) {
        // remove metadata field and it's getters/setters
        modelClass.findFirst(FieldDeclaration.class, fd -> fd.getVariable(0).getNameAsString().equals("metadata")).ifPresent(fd -> fd.removeForced());
        modelClass.findAll(MethodDeclaration.class, md -> md.getNameAsString().equals("getMetadata") || md.getNameAsString().equals("setMetadata")).forEach(md -> md.removeForced());
    }
    return compilationUnit;
}
Also used : StaticJavaParser.parseClassOrInterfaceType(com.github.javaparser.StaticJavaParser.parseClassOrInterfaceType) JsonProperty(com.fasterxml.jackson.annotation.JsonProperty) ClassOrInterfaceType(com.github.javaparser.ast.type.ClassOrInterfaceType) StaticJavaParser.parse(com.github.javaparser.StaticJavaParser.parse) DataType(io.automatiko.engine.api.workflow.datatype.DataType) ThisExpr(com.github.javaparser.ast.expr.ThisExpr) Type(com.github.javaparser.ast.type.Type) ObjectCreationExpr(com.github.javaparser.ast.expr.ObjectCreationExpr) Map(java.util.Map) Expression(com.github.javaparser.ast.expr.Expression) CompilationUnit(com.github.javaparser.ast.CompilationUnit) Process(io.automatiko.engine.api.definition.process.Process) NodeList(com.github.javaparser.ast.NodeList) SimpleName(com.github.javaparser.ast.expr.SimpleName) Collection(java.util.Collection) MethodCallExpr(com.github.javaparser.ast.expr.MethodCallExpr) Collectors(java.util.stream.Collectors) StringLiteralExpr(com.github.javaparser.ast.expr.StringLiteralExpr) EnclosedExpr(com.github.javaparser.ast.expr.EnclosedExpr) Modifier(com.github.javaparser.ast.Modifier) VariableDeclarationExpr(com.github.javaparser.ast.expr.VariableDeclarationExpr) List(java.util.List) Stream(java.util.stream.Stream) Optional(java.util.Optional) Variable(io.automatiko.engine.workflow.base.core.context.variable.Variable) BlockStmt(com.github.javaparser.ast.stmt.BlockStmt) ArrayInitializerExpr(com.github.javaparser.ast.expr.ArrayInitializerExpr) FieldAccessExpr(com.github.javaparser.ast.expr.FieldAccessExpr) ClassOrInterfaceDeclaration(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration) Generated(io.automatiko.engine.api.codegen.Generated) ReturnStmt(com.github.javaparser.ast.stmt.ReturnStmt) Name(com.github.javaparser.ast.expr.Name) AnnotationExpr(com.github.javaparser.ast.expr.AnnotationExpr) HashMap(java.util.HashMap) CastExpr(com.github.javaparser.ast.expr.CastExpr) ArrayList(java.util.ArrayList) VariableDeclarator(com.github.javaparser.ast.body.VariableDeclarator) StringUtils(io.automatiko.engine.services.utils.StringUtils) VariableInfo(io.automatiko.engine.api.codegen.VariableInfo) NoSuchElementException(java.util.NoSuchElementException) BooleanLiteralExpr(com.github.javaparser.ast.expr.BooleanLiteralExpr) WorkflowProcess(io.automatiko.engine.api.definition.process.WorkflowProcess) AssignExpr(com.github.javaparser.ast.expr.AssignExpr) NameExpr(com.github.javaparser.ast.expr.NameExpr) NormalAnnotationExpr(com.github.javaparser.ast.expr.NormalAnnotationExpr) Consumer(java.util.function.Consumer) FieldDeclaration(com.github.javaparser.ast.body.FieldDeclaration) MethodDeclaration(com.github.javaparser.ast.body.MethodDeclaration) MemberValuePair(com.github.javaparser.ast.expr.MemberValuePair) ObjectCreationExpr(com.github.javaparser.ast.expr.ObjectCreationExpr) Variable(io.automatiko.engine.workflow.base.core.context.variable.Variable) JsonProperty(com.fasterxml.jackson.annotation.JsonProperty) AnnotationExpr(com.github.javaparser.ast.expr.AnnotationExpr) NormalAnnotationExpr(com.github.javaparser.ast.expr.NormalAnnotationExpr) ClassOrInterfaceDeclaration(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration) HashMap(java.util.HashMap) SimpleName(com.github.javaparser.ast.expr.SimpleName) StringLiteralExpr(com.github.javaparser.ast.expr.StringLiteralExpr) NameExpr(com.github.javaparser.ast.expr.NameExpr) StaticJavaParser.parseClassOrInterfaceType(com.github.javaparser.StaticJavaParser.parseClassOrInterfaceType) ClassOrInterfaceType(com.github.javaparser.ast.type.ClassOrInterfaceType) FieldDeclaration(com.github.javaparser.ast.body.FieldDeclaration) SimpleName(com.github.javaparser.ast.expr.SimpleName) Name(com.github.javaparser.ast.expr.Name) AssignExpr(com.github.javaparser.ast.expr.AssignExpr) MemberValuePair(com.github.javaparser.ast.expr.MemberValuePair) BooleanLiteralExpr(com.github.javaparser.ast.expr.BooleanLiteralExpr) CastExpr(com.github.javaparser.ast.expr.CastExpr) FieldAccessExpr(com.github.javaparser.ast.expr.FieldAccessExpr) NormalAnnotationExpr(com.github.javaparser.ast.expr.NormalAnnotationExpr) ThisExpr(com.github.javaparser.ast.expr.ThisExpr) 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) BlockStmt(com.github.javaparser.ast.stmt.BlockStmt) VariableInfo(io.automatiko.engine.api.codegen.VariableInfo) Map(java.util.Map) HashMap(java.util.HashMap) ReturnStmt(com.github.javaparser.ast.stmt.ReturnStmt) NoSuchElementException(java.util.NoSuchElementException) MethodCallExpr(com.github.javaparser.ast.expr.MethodCallExpr)

Aggregations

Variable (io.automatiko.engine.workflow.base.core.context.variable.Variable)57 VariableScope (io.automatiko.engine.workflow.base.core.context.variable.VariableScope)27 Map (java.util.Map)22 HashMap (java.util.HashMap)18 StringLiteralExpr (com.github.javaparser.ast.expr.StringLiteralExpr)16 ObjectDataType (io.automatiko.engine.workflow.base.core.datatype.impl.type.ObjectDataType)16 ArrayList (java.util.ArrayList)14 NameExpr (com.github.javaparser.ast.expr.NameExpr)12 Matcher (java.util.regex.Matcher)12 VariableScopeInstance (io.automatiko.engine.workflow.base.instance.context.variable.VariableScopeInstance)11 BlockStmt (com.github.javaparser.ast.stmt.BlockStmt)10 MethodCallExpr (com.github.javaparser.ast.expr.MethodCallExpr)9 ClassOrInterfaceType (com.github.javaparser.ast.type.ClassOrInterfaceType)9 ActionNode (io.automatiko.engine.workflow.process.core.node.ActionNode)9 EndNode (io.automatiko.engine.workflow.process.core.node.EndNode)9 List (java.util.List)9 ReturnStmt (com.github.javaparser.ast.stmt.ReturnStmt)8 DataAssociation (io.automatiko.engine.workflow.process.core.node.DataAssociation)8 StartNode (io.automatiko.engine.workflow.process.core.node.StartNode)8 ExecutableProcess (io.automatiko.engine.workflow.process.executable.core.ExecutableProcess)8