use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GenericServiceTaskPropertyWriter in project kie-wb-common by kiegroup.
the class TaskConverter method genericServiceTask.
private PropertyWriter genericServiceTask(Node<View<GenericServiceTask>, ?> n) {
org.eclipse.bpmn2.ServiceTask task = bpmn2.createServiceTask();
task.setId(n.getUUID());
GenericServiceTask definition = n.getContent().getDefinition();
GenericServiceTaskPropertyWriter p = propertyWriterFactory.of(task);
TaskGeneralSet general = definition.getGeneral();
GenericServiceTaskExecutionSet executionSet = definition.getExecutionSet();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setAbsoluteBounds(n);
p.setSimulationSet(definition.getSimulationSet());
p.setValue(executionSet.getGenericServiceTaskInfo().getValue());
p.setAsync(executionSet.getIsAsync().getValue());
p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue());
if (Boolean.TRUE.equals(executionSet.getIsMultipleInstance().getValue())) {
p.setIsSequential(executionSet.getMultipleInstanceExecutionMode().isSequential());
p.setCollectionInput(executionSet.getMultipleInstanceCollectionInput().getValue());
p.setInput(executionSet.getMultipleInstanceDataInput().getValue());
p.setCollectionOutput(executionSet.getMultipleInstanceCollectionOutput().getValue());
p.setOutput(executionSet.getMultipleInstanceDataOutput().getValue());
p.setCompletionCondition(executionSet.getMultipleInstanceCompletionCondition().getValue());
}
p.setOnEntryAction(executionSet.getOnEntryAction());
p.setOnExitAction(executionSet.getOnExitAction());
p.setSLADueDate(executionSet.getSlaDueDate().getValue());
p.setAssignmentsInfo(executionSet.getAssignmentsinfo());
p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
return p;
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GenericServiceTaskPropertyWriter in project kie-wb-common by kiegroup.
the class GenericServiceTaskPropertyReaderTest method setUp.
@Before
public void setUp() {
ServiceTask serviceTask = bpmn2.createServiceTask();
value = new GenericServiceTaskValue("java", "serviceInterface", "serviceOperation", "inMessageStructure", "outMessageStructure");
GenericServiceTaskPropertyWriter writer = new GenericServiceTaskPropertyWriter(serviceTask, null, new HashSet<>());
writer.setValue(value);
writer.setSLADueDate(SLA_DUE_DATE);
writer.setAsync(false);
writer.setAdHocAutostart(true);
OnEntryAction onEntryAction = new OnEntryAction();
onEntryAction.setValue(new ScriptTypeListValue());
writer.setOnEntryAction(onEntryAction);
OnExitAction onExitAction = new OnExitAction();
onExitAction.setValue(new ScriptTypeListValue());
writer.setOnExitAction(onExitAction);
writer.setAssignmentsInfo(new AssignmentsInfo());
reader = new GenericServiceTaskPropertyReader(serviceTask, diagram, definitionResolver);
}
Aggregations