Search in sources :

Example 1 with BaseAdHocSubprocessTaskExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.task.BaseAdHocSubprocessTaskExecutionSet in project kie-wb-common by kiegroup.

the class SubProcessConverter method convertAdHocSubprocessNode.

protected SubProcessPropertyWriter convertAdHocSubprocessNode(Node<View<BaseAdHocSubprocess>, ?> n) {
    org.eclipse.bpmn2.AdHocSubProcess process = bpmn2.createAdHocSubProcess();
    process.setId(n.getUUID());
    AdHocSubProcessPropertyWriter p = propertyWriterFactory.of(process);
    BaseAdHocSubprocess definition = n.getContent().getDefinition();
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    BaseProcessData processData = definition.getProcessData();
    p.setProcessVariables(processData.getProcessVariables());
    BaseAdHocSubprocessTaskExecutionSet executionSet = definition.getExecutionSet();
    p.setAdHocActivationCondition(executionSet.getAdHocActivationCondition());
    p.setAdHocCompletionCondition(executionSet.getAdHocCompletionCondition());
    p.setAdHocOrdering(executionSet.getAdHocOrdering());
    p.setOnEntryAction(executionSet.getOnEntryAction());
    p.setOnExitAction(executionSet.getOnExitAction());
    p.setAsync(executionSet.getIsAsync().getValue());
    p.setSlaDueDate(executionSet.getSlaDueDate());
    p.setSimulationSet(definition.getSimulationSet());
    p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    p.setAbsoluteBounds(n);
    p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue());
    return p;
}
Also used : AdHocSubProcessPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.AdHocSubProcessPropertyWriter) BaseAdHocSubprocess(org.kie.workbench.common.stunner.bpmn.definition.BaseAdHocSubprocess) BaseProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.BaseProcessData) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) BaseAdHocSubprocessTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.BaseAdHocSubprocessTaskExecutionSet)

Aggregations

Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)1 AdHocSubProcessPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.AdHocSubProcessPropertyWriter)1 BaseAdHocSubprocess (org.kie.workbench.common.stunner.bpmn.definition.BaseAdHocSubprocess)1 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)1 BaseAdHocSubprocessTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.task.BaseAdHocSubprocessTaskExecutionSet)1 BaseProcessData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.BaseProcessData)1