use of org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTaskExecutionSet 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.ScriptTaskExecutionSet in project kie-wb-common by kiegroup.
the class TaskConverter method scriptTask.
private PropertyWriter scriptTask(Node<View<ScriptTask>, ?> n) {
org.eclipse.bpmn2.ScriptTask task = bpmn2.createScriptTask();
task.setId(n.getUUID());
ScriptTask definition = n.getContent().getDefinition();
ScriptTaskPropertyWriter p = propertyWriterFactory.of(task);
TaskGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
ScriptTaskExecutionSet executionSet = definition.getExecutionSet();
p.setScript(executionSet.getScript().getValue());
p.setAsync(executionSet.getIsAsync().getValue());
p.setSimulationSet(definition.getSimulationSet());
p.setBounds(n.getContent().getBounds());
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTaskExecutionSet 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