@Before public void setup() { when(definitionResolver.getResolutionFactor()).thenReturn(RESOLUTION_FACTOR); when(catchEvent.getId()).thenReturn(CATCH_EVENT_ID); when(boundaryEvent.getId()).thenReturn(BOUNDARY_EVENT_ID); when(throwEvent.getId()).thenReturn(THROW_EVENT_ID); when(gateway.getId()).thenReturn(GATEWAY_EVENT_ID); when(definitionResolver.getShape(eq(CATCH_EVENT_ID))).thenReturn(catchEventShape); when(definitionResolver.getShape(eq(BOUNDARY_EVENT_ID))).thenReturn(boundaryEventShape); when(definitionResolver.getShape(eq(THROW_EVENT_ID))).thenReturn(throwEventShape); when(definitionResolver.getShape(eq(GATEWAY_EVENT_ID))).thenReturn(gatewayEventShape); this.catchEventPropertyReader = new CatchEventPropertyReader(catchEvent, diagram, definitionResolver); this.boundaryEventPropertyReader = spy(new BoundaryEventPropertyReader(boundaryEvent, diagram, definitionResolver)); this.throwEventPropertyReader = new ThrowEventPropertyReader(throwEvent, diagram, definitionResolver); this.gatewayPropertyReader = new GatewayPropertyReader(gateway, diagram, gatewayEventShape, RESOLUTION_FACTOR); }
String[] doutputParts = dataOutput.split(":\\s*"); if (doutputParts.length == 2) { nextOutput.setId(event.getId() + "_" + doutputParts[0]); nextOutput.setName(doutputParts[0]); ExtendedMetaData metadata = ExtendedMetaData.INSTANCE; nextOutput.getAnyAttribute().add(extensionEntry); } else { nextOutput.setId(event.getId() + "_" + dataOutput); nextOutput.setName(dataOutput); ExtendedMetaData metadata = ExtendedMetaData.INSTANCE; if (dataOutputs != null) { for (DataOutput ddo : dataOutputs) { if (ddo.getId().equals(event.getId() + "_" + fromPart)) { doa.getSourceRef().add(ddo); if (_simulationElementParameters.containsKey(event.getId())) { _simulationElementParameters.get(event.getId()).add(timeParams); } else { List<EObject> values = new ArrayList<EObject>(); values.add(timeParams); _simulationElementParameters.put(event.getId(), values); probParam.getParameterValue().add(probParamValueParam); controlParams.setProbability(probParam); if (_simulationElementParameters.containsKey(event.getId())) { _simulationElementParameters.get(event.getId()).add(controlParams);
ceElementName); be.setId(ce.getId()); be.setAttachedToRef(((Activity) entry.getKey())); ((Activity) entry.getKey()).getBoundaryEventRefs().add(be);
List<DataOutput> dataOutputs = ce.getDataOutputs(); for (DataOutput dout : dataOutputs) { if (dout.getId().equals(ce.getId() + "_" + da.getId() + "OutputX")) { foundDataOutput = true; dataout.setId(ce.getId() + "_" + da.getId() + "OutputX"); dataout.setName(da.getId() + "OutputX"); ce.getDataOutputs().add(dataout);
private BpmnNode compensationEvent(CatchEvent event, CompensateEventDefinition e) { String nodeId = event.getId(); Node<View<IntermediateCompensationEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateCompensationEvent.class); IntermediateCompensationEvent definition = node.getContent().getDefinition(); CatchEventPropertyReader p = propertyReaderFactory.of(event); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); node.getContent().setBounds(p.getBounds()); definition.setDimensionsSet(p.getCircleDimensionSet()); definition.setFontSet(p.getFontSet()); definition.setBackgroundSet(p.getBackgroundSet()); return BpmnNode.of(node); }
private BpmnNode conditionalEvent(CatchEvent event, ConditionalEventDefinition e) { String nodeId = event.getId(); Node<View<IntermediateConditionalEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateConditionalEvent.class); IntermediateConditionalEvent definition = node.getContent().getDefinition(); CatchEventPropertyReader p = propertyReaderFactory.of(event); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setExecutionSet(new CancellingConditionalEventExecutionSet( new CancelActivity(p.isCancelActivity()), p.getConditionExpression(e) )); node.getContent().setBounds(p.getBounds()); definition.setDimensionsSet(p.getCircleDimensionSet()); definition.setFontSet(p.getFontSet()); definition.setBackgroundSet(p.getBackgroundSet()); return BpmnNode.of(node); }
private BpmnNode timerEvent(CatchEvent event, TimerEventDefinition e) { String nodeId = event.getId(); Node<View<IntermediateTimerEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateTimerEvent.class); IntermediateTimerEvent definition = node.getContent().getDefinition(); CatchEventPropertyReader p = propertyReaderFactory.of(event); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setExecutionSet(new CancellingTimerEventExecutionSet( new CancelActivity(p.isCancelActivity()), new TimerSettings(p.getTimerSettings(e)) )); node.getContent().setBounds(p.getBounds()); definition.setDimensionsSet(p.getCircleDimensionSet()); definition.setFontSet(p.getFontSet()); definition.setBackgroundSet(p.getBackgroundSet()); return BpmnNode.of(node); }
private BpmnNode messageEvent(CatchEvent event, MessageEventDefinition e) { String nodeId = event.getId(); Node<View<IntermediateMessageEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateMessageEventCatching.class); IntermediateMessageEventCatching definition = node.getContent().getDefinition(); CatchEventPropertyReader p = propertyReaderFactory.of(event); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setDataIOSet(new DataIOSet( p.getAssignmentsInfo() )); definition.setExecutionSet(new CancellingMessageEventExecutionSet( new CancelActivity(p.isCancelActivity()), new MessageRef(EventDefinitionReader.messageRefOf(e)) )); node.getContent().setBounds(p.getBounds()); definition.setDimensionsSet(p.getCircleDimensionSet()); definition.setFontSet(p.getFontSet()); definition.setBackgroundSet(p.getBackgroundSet()); return BpmnNode.of(node); }
private BpmnNode signalEvent(CatchEvent event, SignalEventDefinition e) { String nodeId = event.getId(); Node<View<IntermediateSignalEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateSignalEventCatching.class); IntermediateSignalEventCatching definition = node.getContent().getDefinition(); CatchEventPropertyReader p = propertyReaderFactory.of(event); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setDataIOSet(new DataIOSet( p.getAssignmentsInfo() )); definition.setExecutionSet(new CancellingSignalEventExecutionSet( new CancelActivity(p.isCancelActivity()), new SignalRef(p.getSignalRef()) )); node.getContent().setBounds(p.getBounds()); definition.setDimensionsSet(p.getCircleDimensionSet()); definition.setFontSet(p.getFontSet()); definition.setBackgroundSet(p.getBackgroundSet()); return BpmnNode.of(node); }
private BpmnNode escalationEvent(CatchEvent event, EscalationEventDefinition e) { String nodeId = event.getId(); Node<View<IntermediateEscalationEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateEscalationEvent.class); IntermediateEscalationEvent definition = node.getContent().getDefinition(); CatchEventPropertyReader p = propertyReaderFactory.of(event); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setDataIOSet( new DataIOSet(p.getAssignmentsInfo())); definition.setExecutionSet(new CancellingEscalationEventExecutionSet( new CancelActivity(p.isCancelActivity()), new EscalationRef(EventDefinitionReader.escalationRefOf(e)) )); node.getContent().setBounds(p.getBounds()); definition.setDimensionsSet(p.getCircleDimensionSet()); definition.setFontSet(p.getFontSet()); definition.setBackgroundSet(p.getBackgroundSet()); return BpmnNode.of(node); }
private BpmnNode errorEvent(CatchEvent event, ErrorEventDefinition e) { String nodeId = event.getId(); Node<View<IntermediateErrorEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateErrorEventCatching.class); IntermediateErrorEventCatching definition = node.getContent().getDefinition(); CatchEventPropertyReader p = propertyReaderFactory.of(event); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setDataIOSet( new DataIOSet( p.getAssignmentsInfo())); definition.setExecutionSet(new CancellingErrorEventExecutionSet( new CancelActivity(p.isCancelActivity()), new ErrorRef(EventDefinitionReader.errorRefOf(e)) )); node.getContent().setBounds(p.getBounds()); definition.setDimensionsSet(p.getCircleDimensionSet()); definition.setFontSet(p.getFontSet()); definition.setBackgroundSet(p.getBackgroundSet()); return BpmnNode.of(node); }