Search in sources :

Example 1 with BaseUserTaskExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.task.BaseUserTaskExecutionSet in project kie-wb-common by kiegroup.

the class TaskConverter method userTask.

public PropertyWriter userTask(Node<View<BaseUserTask>, ?> n) {
    org.eclipse.bpmn2.UserTask task = bpmn2.createUserTask();
    task.setId(n.getUUID());
    BaseUserTask 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());
    BaseUserTaskExecutionSet executionSet = definition.getExecutionSet();
    p.setTaskName(executionSet.getTaskName().getValue());
    p.setActors(executionSet.getActors());
    p.setAssignmentsInfo(executionSet.getAssignmentsinfo());
    p.setReassignments(executionSet.getReassignmentsInfo());
    p.setNotifications(executionSet.getNotificationsInfo());
    p.setSkippable(executionSet.getSkippable().getValue());
    p.setGroupId(executionSet.getGroupid().getValue());
    p.setSubject(executionSet.getSubject().getValue());
    p.setDescription(executionSet.getDescription().getValue());
    p.setPriority(StringUtils.replaceIllegalCharsAttribute(executionSet.getPriority().getValue()));
    p.setAsync(executionSet.getIsAsync().getValue());
    p.setCreatedBy(executionSet.getCreatedBy().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.setContent(executionSet.getContent().getValue());
    p.setSLADueDate(executionSet.getSlaDueDate().getValue());
    p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    p.setAbsoluteBounds(n);
    return p;
}
Also used : BaseUserTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.BaseUserTaskExecutionSet) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BaseUserTask(org.kie.workbench.common.stunner.bpmn.definition.BaseUserTask) 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 BaseUserTask (org.kie.workbench.common.stunner.bpmn.definition.BaseUserTask)1 TaskGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet)1 BaseUserTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.task.BaseUserTaskExecutionSet)1