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;
}
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;
}
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);
}
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);
}
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);
}
Aggregations