Search in sources :

Example 1 with ServiceTaskPropertyWriter

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

the class TaskConverter method customTask.

private PropertyWriter customTask(Node<View<CustomTask>, ?> n) {
    org.eclipse.bpmn2.Task task = bpmn2.createTask();
    task.setId(n.getUUID());
    CustomTask definition = n.getContent().getDefinition();
    ServiceTaskPropertyWriter p = propertyWriterFactory.of(task);
    p.setServiceTaskName(definition.getName());
    TaskGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    CustomTaskExecutionSet executionSet = definition.getExecutionSet();
    p.setTaskName(executionSet.getTaskName().getValue());
    p.setAsync(executionSet.getIsAsync().getValue());
    p.setOnEntryAction(executionSet.getOnEntryAction());
    p.setOnExitAction(executionSet.getOnExitAction());
    p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue());
    p.setSlaDueDate(executionSet.getSlaDueDate().getValue());
    p.setSimulationSet(definition.getSimulationSet());
    p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    p.setAbsoluteBounds(n);
    return p;
}
Also used : GenericServiceTaskPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GenericServiceTaskPropertyWriter) ServiceTaskPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ServiceTaskPropertyWriter) CustomTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.workitem.CustomTaskExecutionSet) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) Task(org.eclipse.bpmn2.Task) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) CustomTask(org.kie.workbench.common.stunner.bpmn.workitem.CustomTask)

Aggregations

Task (org.eclipse.bpmn2.Task)1 Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)1 GenericServiceTaskPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GenericServiceTaskPropertyWriter)1 ServiceTaskPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ServiceTaskPropertyWriter)1 TaskGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet)1 CustomTask (org.kie.workbench.common.stunner.bpmn.workitem.CustomTask)1 CustomTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.workitem.CustomTaskExecutionSet)1