Search in sources :

Example 1 with DeclarationList

use of org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.DeclarationList in project kie-wb-common by kiegroup.

the class AssignmentsInfos method of.

public static AssignmentsInfo of(final List<DataInput> datainput, final List<DataInputAssociation> inputAssociations, final List<DataOutput> dataoutput, final List<DataOutputAssociation> outputAssociations, boolean alternativeEncoding) {
    DeclarationList inputs = dataInputDeclarations(datainput);
    DeclarationList outputs = dataOutputDeclarations(dataoutput);
    AssociationList associations = new AssociationList(inAssociationDeclarations(inputAssociations), outAssociationDeclarations(outputAssociations));
    return new AssignmentsInfo(new ParsedAssignmentsInfo(inputs, outputs, associations, alternativeEncoding).toString());
}
Also used : AssociationList(org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.AssociationList) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) ParsedAssignmentsInfo(org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo) ParsedAssignmentsInfo(org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo) DeclarationList(org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.DeclarationList)

Example 2 with DeclarationList

use of org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.DeclarationList in project kie-wb-common by kiegroup.

the class SubProcessPropertyWriter method setProcessVariables.

public void setProcessVariables(ProcessVariables processVariables) {
    String value = processVariables.getValue();
    DeclarationList declarationList = DeclarationList.fromString(value);
    List<Property> properties = process.getProperties();
    declarationList.getDeclarations().forEach(decl -> {
        VariableScope.Variable variable = variableScope.declare(this.process.getId(), decl.getIdentifier(), decl.getType());
        properties.add(variable.getTypedIdentifier());
    });
}
Also used : DeclarationList(org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.DeclarationList) Property(org.eclipse.bpmn2.Property)

Example 3 with DeclarationList

use of org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.DeclarationList in project kie-wb-common by kiegroup.

the class ProcessPropertyWriter method setProcessVariables.

public void setProcessVariables(ProcessVariables processVariables) {
    String value = processVariables.getValue();
    DeclarationList declarationList = DeclarationList.fromString(value);
    List<Property> properties = process.getProperties();
    declarationList.getDeclarations().forEach(decl -> {
        VariableScope.Variable variable = variableScope.declare(this.process.getId(), decl.getIdentifier(), decl.getType());
        properties.add(variable.getTypedIdentifier());
        this.itemDefinitions.add(variable.getTypeDeclaration());
    });
}
Also used : DeclarationList(org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.DeclarationList) Property(org.eclipse.bpmn2.Property)

Aggregations

DeclarationList (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.DeclarationList)3 Property (org.eclipse.bpmn2.Property)2 AssociationList (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.AssociationList)1 ParsedAssignmentsInfo (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo)1 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)1