use of org.kie.workbench.common.stunner.bpmn.definition.property.task.Script in project kie-wb-common by kiegroup.
the class TaskConverter method scriptTask.
private BpmnNode scriptTask(org.eclipse.bpmn2.ScriptTask task) {
Node<View<ScriptTask>, Edge> node = factoryManager.newNode(task.getId(), ScriptTask.class);
ScriptTask definition = node.getContent().getDefinition();
ScriptTaskPropertyReader p = propertyReaderFactory.of(task);
definition.setGeneral(new TaskGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setExecutionSet(new ScriptTaskExecutionSet(new Script(p.getScript()), new IsAsync(p.isAsync())));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getRectangleDimensionsSet());
definition.setBackgroundSet(p.getBackgroundSet());
definition.setFontSet(p.getFontSet());
definition.setSimulationSet(p.getSimulationSet());
return BpmnNode.of(node);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.task.Script in project kie-wb-common by kiegroup.
the class ScriptTaskConverter method convert.
public Node<? extends View<? extends BPMNViewDefinition>, ?> convert(org.eclipse.bpmn2.ScriptTask task) {
Node<View<ScriptTask>, Edge> node = factoryManager.newNode(task.getId(), ScriptTask.class);
ScriptTask definition = node.getContent().getDefinition();
ScriptTaskPropertyReader p = propertyReaderFactory.of(task);
definition.setGeneral(new TaskGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setExecutionSet(new ScriptTaskExecutionSet(new Script(p.getScript()), new IsAsync(p.isAsync())));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getRectangleDimensionsSet());
definition.setBackgroundSet(p.getBackgroundSet());
definition.setFontSet(p.getFontSet());
definition.setSimulationSet(p.getSimulationSet());
return node;
}
Aggregations