use of org.kie.workbench.common.stunner.bpmn.workitem.CustomTaskExecutionSet 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;
}
use of org.kie.workbench.common.stunner.bpmn.workitem.CustomTaskExecutionSet in project kie-wb-common by kiegroup.
the class BaseTaskConverter method jbpmServiceTask.
private BpmnNode jbpmServiceTask(org.eclipse.bpmn2.Task task) {
final ServiceTaskPropertyReader serviceTaskPropertyReader = propertyReaderFactory.ofCustom(task);
final Node<View<CustomTask>, Edge> node = factoryManager.newNode(task.getId(), CustomTask.class);
final CustomTask definition = node.getContent().getDefinition();
definition.setName(serviceTaskPropertyReader.getServiceTaskName());
definition.getTaskType().setRawType(serviceTaskPropertyReader.getServiceTaskName());
definition.setDescription(serviceTaskPropertyReader.getServiceTaskDescription());
definition.setCategory(serviceTaskPropertyReader.getServiceTaskCategory());
definition.setDefaultHandler(serviceTaskPropertyReader.getServiceTaskDefaultHandler());
definition.setGeneral(new TaskGeneralSet(new Name(serviceTaskPropertyReader.getName()), new Documentation(serviceTaskPropertyReader.getDocumentation())));
definition.setDataIOSet(new DataIOSet(serviceTaskPropertyReader.getAssignmentsInfo()));
definition.setExecutionSet(new CustomTaskExecutionSet(new TaskName(serviceTaskPropertyReader.getTaskName()), new IsAsync(serviceTaskPropertyReader.isAsync()), new AdHocAutostart(serviceTaskPropertyReader.isAdHocAutoStart()), new OnEntryAction(serviceTaskPropertyReader.getOnEntryAction()), new OnExitAction(serviceTaskPropertyReader.getOnExitAction()), new SLADueDate(serviceTaskPropertyReader.getSlaDueDate())));
definition.setSimulationSet(serviceTaskPropertyReader.getSimulationSet());
definition.setAdvancedData(new AdvancedData(serviceTaskPropertyReader.getMetaDataAttributes()));
node.getContent().setBounds(serviceTaskPropertyReader.getBounds());
definition.setDimensionsSet(serviceTaskPropertyReader.getRectangleDimensionsSet());
definition.setBackgroundSet(serviceTaskPropertyReader.getBackgroundSet());
definition.setFontSet(serviceTaskPropertyReader.getFontSet());
return BpmnNode.of(node, serviceTaskPropertyReader);
}
Aggregations