Search in sources :

Example 1 with ScriptTaskPropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ScriptTaskPropertyWriter 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;
}
Also used : ScriptTaskPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ScriptTaskPropertyWriter) ScriptTask(org.kie.workbench.common.stunner.bpmn.definition.ScriptTask) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) ScriptTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTaskExecutionSet)

Aggregations

Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)1 ScriptTaskPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ScriptTaskPropertyWriter)1 ScriptTask (org.kie.workbench.common.stunner.bpmn.definition.ScriptTask)1 TaskGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet)1 ScriptTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTaskExecutionSet)1