Search in sources :

Example 1 with BusinessRuleTaskPropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.BusinessRuleTaskPropertyWriter 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)

Aggregations

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 BusinessRuleTask (org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask)1 TaskGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet)1 BusinessRuleTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.task.BusinessRuleTaskExecutionSet)1