private boolean isParentEventSubprocess(FlowElement fe) { if (fe.eContainer() instanceof SubProcess && ((SubProcess) fe.eContainer()).isTriggeredByEvent()){ return true; } return false; }
protected List<EventDefinition> getEventDefinitions(FlowElement startAt) { List<EventDefinition> throwDefinitions = null; if (startAt instanceof IntermediateThrowEvent) { throwDefinitions = ((IntermediateThrowEvent) startAt) .getEventDefinitions(); } else if (startAt instanceof EndEvent) { EndEvent end = (EndEvent) startAt; throwDefinitions = end.getEventDefinitions(); } return throwDefinitions; }
private OutputSet getOutputSet() { OutputSet outputSet = event.getOutputSet(); if (outputSet == null) { outputSet = bpmn2.createOutputSet(); event.setOutputSet(outputSet); } return outputSet; }
private Assignment assignment(String from, String to) { Assignment assignment = bpmn2.createAssignment(); FormalExpression fromExpr = bpmn2.createFormalExpression(); fromExpr.setBody(asCData(from)); assignment.setFrom(fromExpr); FormalExpression toExpr = bpmn2.createFormalExpression(); toExpr.setBody(to); assignment.setTo(toExpr); return assignment; }
public MultipleInstanceSubProcessPropertyWriter(SubProcess process, VariableScope variableScope) { super(process, variableScope); this.miloop = bpmn2.createMultiInstanceLoopCharacteristics(); process.setLoopCharacteristics(miloop); this.ioSpec = bpmn2.createInputOutputSpecification(); this.inputSet = bpmn2.createInputSet(); this.ioSpec.getInputSets().add(inputSet); this.outputSet = bpmn2.createOutputSet(); this.ioSpec.getOutputSets().add(outputSet); process.setIoSpecification(ioSpec); }
protected FeatureMap getExtensionElements(BaseElement element) { if (element.getExtensionValues() == null || element.getExtensionValues().isEmpty()) { ExtensionAttributeValue eav = Bpmn2Factory.eINSTANCE.createExtensionAttributeValue(); element.getExtensionValues().add(eav); return eav.getValue(); } else { return element.getExtensionValues().get(0).getValue(); } }
private InputOutputSpecification getIoSpecification(Task element) { InputOutputSpecification ioSpecification = element.getIoSpecification(); if (ioSpecification == null) { ioSpecification = bpmn2.createInputOutputSpecification(); element.setIoSpecification(ioSpecification); } List<InputSet> inputSets = ioSpecification.getInputSets(); if (inputSets.isEmpty()) { inputSets.add(bpmn2.createInputSet()); } return ioSpecification; }
public VariableDeclaration(String identifier, String type) { this.identifier = identifier; this.type = type; this.typeDeclaration = bpmn2.createItemDefinition(); this.typeDeclaration.setId(Ids.item(identifier)); this.typeDeclaration.setStructureRef(type); this.typedIdentifier = bpmn2.createProperty(); this.typedIdentifier.setId(Ids.typedIdentifier("GLOBAL", identifier)); this.typedIdentifier.setName(identifier); this.typedIdentifier.setItemSubjectRef(typeDeclaration); }
public void setCompletionCondition(String expression) { FormalExpression formalExpression = bpmn2.createFormalExpression(); formalExpression.setBody(asCData(expression)); this.miloop.setCompletionCondition(formalExpression); } }
public void setOutput(String name) { DataOutput dataOutput = createDataOutput(name); miloop.setOutputDataItem(dataOutput); ItemDefinition item = bpmn2.createItemDefinition(); item.setId(Ids.multiInstanceItemType(process.getId(), name)); dataOutput.setItemSubjectRef(item); this.addItemDefinition(item); }
private InputOutputSpecification getIoSpecification() { InputOutputSpecification ioSpecification = activity.getIoSpecification(); if (ioSpecification == null) { ioSpecification = bpmn2.createInputOutputSpecification(); activity.setIoSpecification(ioSpecification); } return ioSpecification; }
private ItemDefinition typedefInput(String name, String type) { ItemDefinition typeDef = bpmn2.createItemDefinition(); typeDef.setId(Ids.dataInputItem(element.getId(), name)); typeDef.setStructureRef(type); return typeDef; } }
private boolean isGatewaySplit(FlowElement fe) { if ((fe instanceof ExclusiveGateway || fe instanceof InclusiveGateway || fe instanceof EventBasedGateway) && ((Gateway) fe).getGatewayDirection().equals(GatewayDirection.DIVERGING)) { return true; } return false; } }
private InputSet getInputSet() { InputSet inputSet = throwEvent.getInputSet(); if (inputSet == null) { inputSet = bpmn2.createInputSet(); throwEvent.setInputSet(inputSet); } return inputSet; }
private Documentation createDocumentation(String text) { Documentation doc = Bpmn2Factory.eINSTANCE.createDocumentation(); doc.setText(text); return doc; }
public String getAdHocOrdering() { return process.getOrdering().toString(); } }
protected List<EventDefinition> getEventDefinitions(FlowElement startAt) { List<EventDefinition> throwDefinitions = null; if (startAt instanceof IntermediateThrowEvent) { throwDefinitions = ((IntermediateThrowEvent) startAt) .getEventDefinitions(); } else if (startAt instanceof EndEvent) { EndEvent end = (EndEvent) startAt; throwDefinitions = end.getEventDefinitions(); } return throwDefinitions; }
private boolean isParentEventSubprocess(FlowElement fe) { if (fe.eContainer() instanceof SubProcess && ((SubProcess) fe.eContainer()).isTriggeredByEvent()){ return true; } return false; }
private boolean isGatewaySplit(FlowElement fe) { if ((fe instanceof ExclusiveGateway || fe instanceof InclusiveGateway || fe instanceof EventBasedGateway) && ((Gateway) fe).getGatewayDirection().equals(GatewayDirection.DIVERGING)) { return true; } return false; } }
protected List<EventDefinition> getEventDefinitions(FlowElement startAt) { List<EventDefinition> throwDefinitions = null; if (startAt instanceof IntermediateThrowEvent) { throwDefinitions = ((IntermediateThrowEvent) startAt) .getEventDefinitions(); } else if (startAt instanceof EndEvent) { EndEvent end = (EndEvent) startAt; throwDefinitions = end.getEventDefinitions(); } return throwDefinitions; }