Search in sources :

Example 1 with CallActivityPropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CallActivityPropertyWriter in project kie-wb-common by kiegroup.

the class ReusableSubprocessConverter method toFlowElement.

public PropertyWriter toFlowElement(Node<View<BaseReusableSubprocess>, ?> n) {
    CallActivity activity = bpmn2.createCallActivity();
    activity.setId(n.getUUID());
    CallActivityPropertyWriter p = propertyWriterFactory.of(activity);
    BaseReusableSubprocess definition = n.getContent().getDefinition();
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    BaseReusableSubprocessTaskExecutionSet executionSet = definition.getExecutionSet();
    p.setOnEntryAction(executionSet.getOnEntryAction());
    p.setOnExitAction(executionSet.getOnExitAction());
    p.setCalledElement(replaceIllegalCharsAttribute(executionSet.getCalledElement().getValue()));
    p.setAsync(executionSet.getIsAsync().getValue());
    p.setIndependent(executionSet.getIndependent().getValue());
    if (Boolean.FALSE.equals(executionSet.getIndependent().getValue())) {
        p.setAbortParent(executionSet.getAbortParent().getValue());
    }
    p.setWaitForCompletion(executionSet.getWaitForCompletion().getValue());
    p.setSlaDueDate(executionSet.getSlaDueDate());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    if (Boolean.TRUE.equals(executionSet.getIsMultipleInstance().getValue())) {
        p.setIsSequential(executionSet.getMultipleInstanceExecutionMode().isSequential());
        p.setCollectionInput(executionSet.getMultipleInstanceCollectionInput().getValue());
        p.setInput(executionSet.getMultipleInstanceDataInput().getValue());
        p.setCollectionOutput(executionSet.getMultipleInstanceCollectionOutput().getValue());
        p.setOutput(executionSet.getMultipleInstanceDataOutput().getValue());
        p.setCompletionCondition(executionSet.getMultipleInstanceCompletionCondition().getValue());
    }
    p.setSimulationSet(definition.getSimulationSet());
    p.setAbsoluteBounds(n);
    p.setCase(executionSet.getIsCase().getValue());
    p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue());
    p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    return p;
}
Also used : CallActivityPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CallActivityPropertyWriter) BaseReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.BaseReusableSubprocess) BaseReusableSubprocessTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.BaseReusableSubprocessTaskExecutionSet) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CallActivity(org.eclipse.bpmn2.CallActivity)

Example 2 with CallActivityPropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CallActivityPropertyWriter in project kie-wb-common by kiegroup.

the class ReusableSubprocessConverter method toFlowElement.

public PropertyWriter toFlowElement(Node<View<ReusableSubprocess>, ?> n) {
    CallActivity activity = bpmn2.createCallActivity();
    activity.setId(n.getUUID());
    CallActivityPropertyWriter p = propertyWriterFactory.of(activity);
    ReusableSubprocess definition = n.getContent().getDefinition();
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    ReusableSubprocessTaskExecutionSet executionSet = definition.getExecutionSet();
    p.setCalledElement(executionSet.getCalledElement().getValue());
    p.setAsync(executionSet.getIsAsync().getValue());
    p.setIndependent(executionSet.getIndependent().getValue());
    p.setWaitForCompletion(executionSet.getIndependent().getValue());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    p.setSimulationSet(definition.getSimulationSet());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : CallActivityPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CallActivityPropertyWriter) ReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CallActivity(org.eclipse.bpmn2.CallActivity) ReusableSubprocessTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.ReusableSubprocessTaskExecutionSet)

Aggregations

CallActivity (org.eclipse.bpmn2.CallActivity)2 CallActivityPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CallActivityPropertyWriter)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 BaseReusableSubprocess (org.kie.workbench.common.stunner.bpmn.definition.BaseReusableSubprocess)1 ReusableSubprocess (org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess)1 BaseReusableSubprocessTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.task.BaseReusableSubprocessTaskExecutionSet)1 ReusableSubprocessTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.task.ReusableSubprocessTaskExecutionSet)1