public BPMNGeneralSet(final String name, final String documentation) { this.name = new Name(name); this.documentation = new Documentation(documentation); }
void assertGeneralSet(BPMNGeneralSet generalSet, String nodeName, String documentation) { assertThat(generalSet).isNotNull(); assertThat(generalSet.getName()).isNotNull(); assertThat(generalSet.getDocumentation()).isNotNull(); assertThat(generalSet.getName().getValue()).isEqualTo(nodeName); assertThat(generalSet.getDocumentation().getValue()).isEqualTo(documentation); }
@Override public boolean equals(Object o) { if (o instanceof TaskGeneralSet) { TaskGeneralSet other = (TaskGeneralSet) o; return name.equals(other.name) && documentation.equals(other.documentation); } return false; } }
@Override public int hashCode() { return HashUtil.combineHashCodes(name.hashCode(), documentation.hashCode()); }
@Override public ServiceTask build() { final ServiceTask serviceTask = newInstance(); final String name = workItemDefinition.getName(); setProperties(workItemDefinition, serviceTask); serviceTask.getExecutionSet().getTaskName().setValue(name); serviceTask.getGeneral().getName().setValue(workItemDefinition.getDisplayName()); serviceTask.getGeneral().getDocumentation().setValue(workItemDefinition.getDocumentation()); serviceTask.setDescription(workItemDefinition.getDescription()); serviceTask.getDataIOSet() .getAssignmentsinfo() .setValue(workItemDefinition.getParameters() + workItemDefinition.getResults()); return serviceTask; }
@Override public int hashCode() { return HashUtil.combineHashCodes(name.hashCode(), documentation.hashCode(), id.hashCode(), packageProperty.hashCode(), version.hashCode(), adHoc.hashCode(), processInstanceDescription.hashCode(), executable.hashCode()); }
public BPMNGeneralSet() { this(new Name(""), new Documentation()); }
void assertGeneralSet(BPMNGeneralSet generalSet, String nodeName, String documentation) { assertThat(generalSet).isNotNull(); assertThat(generalSet.getName()).isNotNull(); assertThat(generalSet.getDocumentation()).isNotNull(); assertThat(generalSet.getName().getValue()).isEqualTo(nodeName); assertThat(generalSet.getDocumentation().getValue()).isEqualTo(documentation); }
@Override public boolean equals(Object o) { if (o instanceof DiagramSet) { DiagramSet other = (DiagramSet) o; return name.equals(other.name) && documentation.equals(other.documentation) && id.equals(other.id) && packageProperty.equals(other.packageProperty) && version.equals(other.version) && adHoc.equals(other.adHoc) && processInstanceDescription.equals(other.processInstanceDescription) && executable.equals(other.executable); } return false; } }
public TaskGeneralSet() { this(new Name(""), new Documentation()); }
private void assertGeneralSet(BPMNGeneralSet generalSet, String nodeName, String documentation) { assertThat(generalSet).isNotNull(); assertThat(generalSet.getName()).isNotNull(); assertThat(generalSet.getDocumentation()).isNotNull(); assertThat(generalSet.getName().getValue()).isEqualTo(nodeName); assertThat(generalSet.getDocumentation().getValue()).isEqualTo(documentation); }
public BPMNGeneralSet(String name) { this.name = new Name(name); this.documentation = new Documentation(); }
private void assertDocumentation(Diagram<Graph, Metadata> diagram, String id, String value) { Optional<BPMNDefinition> documentation = getNodes(diagram).stream() .filter(node -> node.getContent() instanceof View && node.getUUID().equals(id)) .map(node -> (View) node.getContent()) .filter(view -> view.getDefinition() instanceof BPMNDefinition) .map(view -> (BPMNDefinition) view.getDefinition()) .findFirst(); String documentationValue = (documentation.isPresent() ? documentation.get().getGeneral().getDocumentation().getValue() : null); assertEquals(value, documentationValue); }
public ScriptTask() { this(new TaskGeneralSet(new Name("Task"), new Documentation("")), new ScriptTaskExecutionSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new TaskType(TaskTypes.SCRIPT)); }
public static void assertDocumentation(Diagram<Graph, Metadata> diagram, String id, String value) { Optional<BPMNDefinition> documentation = getNodes(diagram).stream() .filter(node -> node.getContent() instanceof View && node.getUUID().equals(id)) .map(node -> (View) node.getContent()) .filter(view -> view.getDefinition() instanceof BPMNDefinition) .map(view -> (BPMNDefinition) view.getDefinition()) .findFirst(); String documentationValue = (documentation.isPresent() ? documentation.get().getGeneral().getDocumentation().getValue() : null); assertEquals(value, documentationValue); } }
public NoneTask() { this(new TaskGeneralSet(new Name("Task"), new Documentation("")), new EmptyTaskExecutionSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new TaskType(TaskTypes.NONE)); }
private PropertyWriter noneEvent(Node<View<EndNoneEvent>, ?> n) { EndEvent event = bpmn2.createEndEvent(); event.setId(n.getUUID()); BaseEndEvent definition = n.getContent().getDefinition(); ThrowEventPropertyWriter p = propertyWriterFactory.of(event); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); p.setBounds(n.getContent().getBounds()); return p; }
public UserTask() { this(new TaskGeneralSet(new Name("Task"), new Documentation("")), new UserTaskExecutionSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new TaskType(TaskTypes.USER)); }
@Test public void testConvertEdge() { associationConverter.convertEdge(association, nodes); verify(definition).setGeneral(generalSetCaptor.capture()); assertEquals(ASSOCIATION_DOCUMENTATION, generalSetCaptor.getValue().getDocumentation().getValue()); BpmnEdge.Simple result = (BpmnEdge.Simple) associationConverter.convertEdge(association, nodes); assertEquals(sourceNode, result.getSource()); assertEquals(targetNode, result.getTarget()); assertEquals(sourceConnection, result.getSourceConnection()); assertEquals(targetConnection, result.getTargetConnection()); assertEquals(controlPoints, result.getControlPoints()); } }
public BusinessRuleTask() { this(new TaskGeneralSet(new Name("Task"), new Documentation("")), new BusinessRuleTaskExecutionSet(), new DataIOSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new TaskType(TaskTypes.BUSINESS_RULE)); }