Search in sources :

Example 1 with UserTaskPropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.UserTaskPropertyWriter in project kie-wb-common by kiegroup.

the class TaskConverter method userTask.

private PropertyWriter userTask(Node<View<UserTask>, ?> n) {
    org.eclipse.bpmn2.UserTask task = bpmn2.createUserTask();
    task.setId(n.getUUID());
    UserTask definition = n.getContent().getDefinition();
    UserTaskPropertyWriter p = propertyWriterFactory.of(task);
    TaskGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setSimulationSet(definition.getSimulationSet());
    UserTaskExecutionSet executionSet = definition.getExecutionSet();
    p.setTaskName(executionSet.getTaskName().getValue());
    p.setActors(executionSet.getActors());
    p.setGroupId(executionSet.getGroupid().getValue());
    p.setAssignmentsInfo(executionSet.getAssignmentsinfo());
    p.setAsync(executionSet.getIsAsync().getValue());
    p.setSkippable(executionSet.getSkippable().getValue());
    p.setPriority(executionSet.getPriority().getValue());
    p.setSubject(executionSet.getSubject().getValue());
    p.setDescription(executionSet.getDescription().getValue());
    p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue());
    p.setCreatedBy(executionSet.getCreatedBy().getValue());
    p.setOnEntryAction(executionSet.getOnEntryAction());
    p.setOnExitAction(executionSet.getOnExitAction());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : UserTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.UserTaskExecutionSet) UserTask(org.kie.workbench.common.stunner.bpmn.definition.UserTask) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) UserTaskPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.UserTaskPropertyWriter)

Aggregations

Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)1 UserTaskPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.UserTaskPropertyWriter)1 UserTask (org.kie.workbench.common.stunner.bpmn.definition.UserTask)1 TaskGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet)1 UserTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.task.UserTaskExecutionSet)1