Search in sources :

Example 1 with TaskGeneralSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet 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)

Example 2 with TaskGeneralSet

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

the class TaskConverter method businessRuleTask.

private PropertyWriter businessRuleTask(Node<View<BusinessRuleTask>, ?> n) {
    org.eclipse.bpmn2.BusinessRuleTask task = bpmn2.createBusinessRuleTask();
    task.setId(n.getUUID());
    BusinessRuleTask definition = n.getContent().getDefinition();
    BusinessRuleTaskPropertyWriter p = propertyWriterFactory.of(task);
    TaskGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    BusinessRuleTaskExecutionSet executionSet = definition.getExecutionSet();
    p.setAsync(executionSet.getIsAsync().getValue());
    p.setOnEntryAction(executionSet.getOnEntryAction());
    p.setOnExitAction(executionSet.getOnExitAction());
    p.setRuleFlowGroup(executionSet.getRuleFlowGroup());
    p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue());
    p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
    p.setSimulationSet(definition.getSimulationSet());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : BusinessRuleTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.BusinessRuleTaskExecutionSet) BusinessRuleTask(org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BusinessRuleTaskPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.BusinessRuleTaskPropertyWriter)

Example 3 with TaskGeneralSet

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

the class TaskConverter method userTask.

private BpmnNode userTask(org.eclipse.bpmn2.UserTask task) {
    Node<View<UserTask>, Edge> node = factoryManager.newNode(task.getId(), UserTask.class);
    UserTask definition = node.getContent().getDefinition();
    UserTaskPropertyReader p = propertyReaderFactory.of(task);
    definition.setGeneral(new TaskGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setSimulationSet(p.getSimulationSet());
    definition.setExecutionSet(new UserTaskExecutionSet(new TaskName(p.getTaskName()), p.getActors(), new Groupid(p.getGroupid()), p.getAssignmentsInfo(), new IsAsync(p.isAsync()), new Skippable(p.isSkippable()), new Priority(p.getPriority()), new Subject(p.getSubject()), new Description(p.getDescription()), new CreatedBy(p.getCreatedBy()), new AdHocAutostart(p.isAdHocAutostart()), new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    return BpmnNode.of(node);
}
Also used : Description(org.kie.workbench.common.stunner.bpmn.definition.property.task.Description) CreatedBy(org.kie.workbench.common.stunner.bpmn.definition.property.task.CreatedBy) Priority(org.kie.workbench.common.stunner.bpmn.definition.property.connectors.Priority) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) 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) UserTaskPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.UserTaskPropertyReader) OnExitAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction) AdHocAutostart(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart) OnEntryAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Subject(org.kie.workbench.common.stunner.bpmn.definition.property.task.Subject) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) TaskName(org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName) Groupid(org.kie.workbench.common.stunner.bpmn.definition.property.assignee.Groupid) TaskName(org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName) Skippable(org.kie.workbench.common.stunner.bpmn.definition.property.task.Skippable) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) Edge(org.kie.workbench.common.stunner.core.graph.Edge)

Example 4 with TaskGeneralSet

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

the class TaskConverter method businessRuleTask.

private BpmnNode businessRuleTask(org.eclipse.bpmn2.BusinessRuleTask task) {
    Node<View<BusinessRuleTask>, Edge> node = factoryManager.newNode(task.getId(), BusinessRuleTask.class);
    BusinessRuleTask definition = node.getContent().getDefinition();
    BusinessRuleTaskPropertyReader p = propertyReaderFactory.of(task);
    definition.setGeneral(new TaskGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new BusinessRuleTaskExecutionSet(new RuleFlowGroup(p.getRuleFlowGroup()), new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction()), new IsAsync(p.isAsync()), new AdHocAutostart(p.isAdHocAutoStart())));
    definition.setSimulationSet(p.getSimulationSet());
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    return BpmnNode.of(node);
}
Also used : RuleFlowGroup(org.kie.workbench.common.stunner.bpmn.definition.property.task.RuleFlowGroup) BusinessRuleTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.BusinessRuleTaskExecutionSet) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BusinessRuleTask(org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) OnExitAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction) OnEntryAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction) AdHocAutostart(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) TaskName(org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) BusinessRuleTaskPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.BusinessRuleTaskPropertyReader) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) Edge(org.kie.workbench.common.stunner.core.graph.Edge)

Example 5 with TaskGeneralSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet 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);
}
Also used : Script(org.kie.workbench.common.stunner.bpmn.definition.property.task.Script) ScriptTask(org.kie.workbench.common.stunner.bpmn.definition.ScriptTask) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) ScriptTaskPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ScriptTaskPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) TaskName(org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName) ScriptTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTaskExecutionSet)

Aggregations

TaskGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet)9 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)6 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)5 Edge (org.kie.workbench.common.stunner.core.graph.Edge)5 View (org.kie.workbench.common.stunner.core.graph.content.view.View)5 ScriptTask (org.kie.workbench.common.stunner.bpmn.definition.ScriptTask)4 IsAsync (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync)4 TaskName (org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName)4 Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)3 ScriptTaskPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ScriptTaskPropertyReader)3 UserTask (org.kie.workbench.common.stunner.bpmn.definition.UserTask)3 ScriptTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTaskExecutionSet)3 BusinessRuleTaskPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.BusinessRuleTaskPropertyReader)2 UserTaskPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.UserTaskPropertyReader)2 BusinessRuleTask (org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask)2 AdHocAutostart (org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart)2 BusinessRuleTaskExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.task.BusinessRuleTaskExecutionSet)2 OnEntryAction (org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction)2 OnExitAction (org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction)2 Script (org.kie.workbench.common.stunner.bpmn.definition.property.task.Script)2