Search in sources :

Example 1 with BusinessRuleTaskExecutionSet

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

the class TaskConverter method businessRuleTask.

private PropertyWriter businessRuleTask(Node<View<BusinessRuleTask>, ?> n) {
    org.eclipse.bpmn2.BusinessRuleTask task = bpmn2.createBusinessRuleTask();
    task.setId(n.getUUID());
    BusinessRuleTask definition = n.getContent().getDefinition();
    BusinessRuleTaskPropertyWriter p = propertyWriterFactory.of(task);
    TaskGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    BusinessRuleTaskExecutionSet executionSet = definition.getExecutionSet();
    p.setAsync(executionSet.getIsAsync().getValue());
    p.setOnEntryAction(executionSet.getOnEntryAction());
    p.setOnExitAction(executionSet.getOnExitAction());
    p.setRuleFlowGroup(executionSet.getRuleFlowGroup());
    p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    p.setSimulationSet(definition.getSimulationSet());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : BusinessRuleTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.BusinessRuleTaskExecutionSet) BusinessRuleTask(org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BusinessRuleTaskPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.BusinessRuleTaskPropertyWriter)

Example 2 with BusinessRuleTaskExecutionSet

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

the class TaskConverter method businessRuleTask.

private BpmnNode businessRuleTask(org.eclipse.bpmn2.BusinessRuleTask task) {
    Node<View<BusinessRuleTask>, Edge> node = factoryManager.newNode(task.getId(), BusinessRuleTask.class);
    BusinessRuleTask definition = node.getContent().getDefinition();
    BusinessRuleTaskPropertyReader p = propertyReaderFactory.of(task);
    definition.setGeneral(new TaskGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new BusinessRuleTaskExecutionSet(new RuleFlowGroup(p.getRuleFlowGroup()), new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction()), new IsAsync(p.isAsync()), new AdHocAutostart(p.isAdHocAutoStart())));
    definition.setSimulationSet(p.getSimulationSet());
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    return BpmnNode.of(node);
}
Also used : RuleFlowGroup(org.kie.workbench.common.stunner.bpmn.definition.property.task.RuleFlowGroup) BusinessRuleTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.BusinessRuleTaskExecutionSet) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BusinessRuleTask(org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) OnExitAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction) OnEntryAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction) AdHocAutostart(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) TaskName(org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) BusinessRuleTaskPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.BusinessRuleTaskPropertyReader) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) Edge(org.kie.workbench.common.stunner.core.graph.Edge)

Aggregations

BusinessRuleTask (org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask)2 TaskGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet)2 BusinessRuleTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.task.BusinessRuleTaskExecutionSet)2 Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)1 BusinessRuleTaskPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.BusinessRuleTaskPropertyWriter)1 BusinessRuleTaskPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.BusinessRuleTaskPropertyReader)1 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)1 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)1 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)1 AdHocAutostart (org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart)1 IsAsync (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync)1 OnEntryAction (org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction)1 OnExitAction (org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction)1 RuleFlowGroup (org.kie.workbench.common.stunner.bpmn.definition.property.task.RuleFlowGroup)1 TaskName (org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName)1 Edge (org.kie.workbench.common.stunner.core.graph.Edge)1 View (org.kie.workbench.common.stunner.core.graph.content.view.View)1