Search in sources :

Example 26 with Property

use of org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Property 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)

Example 27 with Property

use of org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Property in project webcert by sklintyg.

the class GrpCollectPollerTest method buildResp.

private CollectResponseType buildResp(ProgressStatusType progressStatusType) {
    CollectResponseType resp = new CollectResponseType();
    resp.setProgressStatus(progressStatusType);
    Property p = new Property();
    p.setName("Subject.SerialNumber");
    p.setValue(PERSON_ID);
    resp.getAttributes().add(p);
    return resp;
}
Also used : CollectResponseType(se.funktionstjanster.grp.v1.CollectResponseType) Property(se.funktionstjanster.grp.v1.Property)

Example 28 with Property

use of org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Property in project kie-wb-common by kiegroup.

the class MultipleInstanceActivityPropertyWriterTest method mockProperty.

private Property mockProperty(String name, String itemSubjectRef) {
    Property property = mock(Property.class);
    when(property.getId()).thenReturn(name);
    when(property.getName()).thenReturn(name);
    ItemDefinition itemDefinition = mock(ItemDefinition.class);
    when(itemDefinition.getId()).thenReturn(itemSubjectRef);
    when(property.getItemSubjectRef()).thenReturn(itemDefinition);
    return property;
}
Also used : ItemDefinition(org.eclipse.bpmn2.ItemDefinition) Property(org.eclipse.bpmn2.Property)

Example 29 with Property

use of org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Property in project kie-wb-common by kiegroup.

the class OutputAssignmentReaderTest method testFromAssociationWithPropertyId.

@Test
public void testFromAssociationWithPropertyId() {
    Property property = mockProperty(TARGET_ID, null);
    DataOutputAssociation outputAssociation = mockDataOutputAssociation(SOURCE_NAME, property);
    OutputAssignmentReader outputReader = OutputAssignmentReader.fromAssociation(outputAssociation);
    assertNotNull(outputReader);
    assertResult(SOURCE_NAME, TARGET_ID, AssociationDeclaration.Type.SourceTarget, outputReader.getAssociationDeclaration());
}
Also used : DataOutputAssociation(org.eclipse.bpmn2.DataOutputAssociation) Property(org.eclipse.bpmn2.Property) Test(org.junit.Test)

Example 30 with Property

use of org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Property in project kie-wb-common by kiegroup.

the class MultipleInstanceActivityPropertyWriter method setCollectionOutput.

public void setCollectionOutput(String collectionOutput) {
    if (isEmpty(collectionOutput)) {
        return;
    }
    setUpLoopCharacteristics();
    String suffix = "OUT_COLLECTION";
    String id = Ids.dataOutput(activity.getId(), suffix);
    DataOutput dataOutputElement = createDataOutput(id, suffix);
    addSafe(ioSpec.getDataOutputs(), dataOutputElement);
    Optional<Property> property = findPropertyById(collectionOutput);
    Optional<DataObject> dataObject = findDataObjectById(collectionOutput);
    if (property.isPresent()) {
        processDataOutput(dataOutputElement, property.get());
    } else if (dataObject.isPresent()) {
        processDataOutput(dataOutputElement, dataObject.get());
    }
}
Also used : DataOutput(org.eclipse.bpmn2.DataOutput) DataObject(org.eclipse.bpmn2.DataObject) Property(org.eclipse.bpmn2.Property)

Aggregations

Property (org.eclipse.bpmn2.Property)21 Test (org.junit.Test)8 Property (io.atlasmap.v2.Property)7 ArrayList (java.util.ArrayList)7 Node (org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Node)7 Process (org.eclipse.bpmn2.Process)6 Property (org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.Property)6 DataObject (org.eclipse.bpmn2.DataObject)5 DataOutputAssociation (org.eclipse.bpmn2.DataOutputAssociation)5 ItemDefinition (org.eclipse.bpmn2.ItemDefinition)5 RootElement (org.eclipse.bpmn2.RootElement)5 NodeAttributes (org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.NodeAttributes)5 PropertyAttributes (org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.PropertyAttributes)5 Properties (io.atlasmap.v2.Properties)4 List (java.util.List)4 DataInput (org.eclipse.bpmn2.DataInput)4 DeclarationList (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.DeclarationList)4 AdHocSubProcess (org.eclipse.bpmn2.AdHocSubProcess)3 DataOutput (org.eclipse.bpmn2.DataOutput)3 FlowElement (org.eclipse.bpmn2.FlowElement)3