/** * Creates an error event definition and returns a builder for the error event definition. * * @return the error event definition builder object */ public ErrorEventDefinitionBuilder errorEventDefinition() { final ErrorEventDefinition errorEventDefinition = createEmptyErrorEventDefinition(); element.getEventDefinitions().add(errorEventDefinition); return new ErrorEventDefinitionBuilder(modelInstance, errorEventDefinition); }
/** * Sets an error definition for the given error code. If already an error with this code exists it * will be used, otherwise a new error is created. * * @param errorCode the code of the error * @return the builder object */ public B error(String errorCode) { final ErrorEventDefinition errorEventDefinition = createErrorEventDefinition(errorCode); element.getEventDefinitions().add(errorEventDefinition); return myself; }
/** * Sets an escalation definition for the given escalation code. If already an escalation with this * code exists it will be used, otherwise a new escalation is created. * * @param escalationCode the code of the escalation * @return the builder object */ public B escalation(String escalationCode) { final EscalationEventDefinition escalationEventDefinition = createEscalationEventDefinition(escalationCode); element.getEventDefinitions().add(escalationEventDefinition); return myself; }
@Override protected void setWaypointsWithSourceAndTarget( BpmnEdge edge, FlowNode edgeSource, FlowNode edgeTarget) { final BpmnShape source = findBpmnShape(edgeSource); final BpmnShape target = findBpmnShape(edgeTarget); final double targetHeight = targetBounds.getHeight(); final Waypoint w1 = createInstance(Waypoint.class); w1.setX(sourceX + sourceWidth / 2); w1.setY(sourceY + sourceHeight); final Waypoint w2 = createInstance(Waypoint.class); w2.setX(sourceX + sourceWidth / 2); w2.setY(sourceY + sourceHeight + SPACE); final Waypoint w3 = createInstance(Waypoint.class); w3.setX(targetX); w3.setY(targetY + targetHeight / 2);
/** * Sets a catch all error definition. * * @return the builder object */ public B error() { final ErrorEventDefinition errorEventDefinition = createInstance(ErrorEventDefinition.class); element.getEventDefinitions().add(errorEventDefinition); return myself; }
@Override protected void setCoordinates(BpmnShape shape) { final BpmnShape source = findBpmnShape(element); final Bounds shapeBounds = shape.getBounds(); double x = 0; double y = 0; if (source != null) { final Bounds sourceBounds = source.getBounds(); final double sourceX = sourceBounds.getX(); final double sourceWidth = sourceBounds.getWidth(); final double sourceY = sourceBounds.getY(); final double sourceHeight = sourceBounds.getHeight(); final double targetHeight = shapeBounds.getHeight(); x = sourceX + sourceWidth + SPACE / 4; y = sourceY + sourceHeight - targetHeight / 2 + SPACE; } shapeBounds.setX(x); shapeBounds.setY(y); }
@Override protected void setWaypointsWithSourceAndTarget( BpmnEdge edge, FlowNode edgeSource, FlowNode edgeTarget) { final BpmnShape source = findBpmnShape(edgeSource); final BpmnShape target = findBpmnShape(edgeTarget); final double targetHeight = targetBounds.getHeight(); final Waypoint w1 = createInstance(Waypoint.class); w1.setX(sourceX + sourceWidth / 2); w1.setY(sourceY + sourceHeight); final Waypoint w2 = createInstance(Waypoint.class); w2.setX(sourceX + sourceWidth / 2); w2.setY(sourceY + sourceHeight + SPACE); final Waypoint w3 = createInstance(Waypoint.class); w3.setX(targetX); w3.setY(targetY + targetHeight / 2);
/** * Sets a catch all escalation definition. * * @return the builder object */ public B escalation() { final EscalationEventDefinition escalationEventDefinition = createInstance(EscalationEventDefinition.class); element.getEventDefinitions().add(escalationEventDefinition); return myself; }
@Override protected void setCoordinates(BpmnShape shape) { final BpmnShape source = findBpmnShape(element); final Bounds shapeBounds = shape.getBounds(); double x = 0; double y = 0; if (source != null) { final Bounds sourceBounds = source.getBounds(); final double sourceX = sourceBounds.getX(); final double sourceWidth = sourceBounds.getWidth(); final double sourceY = sourceBounds.getY(); final double sourceHeight = sourceBounds.getHeight(); final double targetHeight = shapeBounds.getHeight(); x = sourceX + sourceWidth + SPACE / 4; y = sourceY + sourceHeight - targetHeight / 2 + SPACE; } shapeBounds.setX(x); shapeBounds.setY(y); }
/** * Sets a catch all error definition. * * @return the builder object */ public B error() { final ErrorEventDefinition errorEventDefinition = createInstance(ErrorEventDefinition.class); element.getEventDefinitions().add(errorEventDefinition); return myself; }
/** * Creates an error event definition and returns a builder for the error event definition. * * @return the error event definition builder object */ public ErrorEventDefinitionBuilder errorEventDefinition() { final ErrorEventDefinition errorEventDefinition = createEmptyErrorEventDefinition(); element.getEventDefinitions().add(errorEventDefinition); return new ErrorEventDefinitionBuilder(modelInstance, errorEventDefinition); }
/** * Sets an error definition for the given error code. If already an error with this code exists it * will be used, otherwise a new error is created. * * @param errorCode the code of the error * @return the builder object */ public B error(String errorCode) { final ErrorEventDefinition errorEventDefinition = createErrorEventDefinition(errorCode); element.getEventDefinitions().add(errorEventDefinition); return myself; }
/** * Sets an escalation definition for the given escalation code. If already an escalation with this * code exists it will be used, otherwise a new escalation is created. * * @param escalationCode the code of the escalation * @return the builder object */ public B escalation(String escalationCode) { final EscalationEventDefinition escalationEventDefinition = createEscalationEventDefinition(escalationCode); element.getEventDefinitions().add(escalationEventDefinition); return myself; }
/** * Sets a catch all escalation definition. * * @return the builder object */ public B escalation() { final EscalationEventDefinition escalationEventDefinition = createInstance(EscalationEventDefinition.class); element.getEventDefinitions().add(escalationEventDefinition); return myself; }
/** * Creates an error event definition with an unique id and returns a builder for the error event * definition. * * @return the error event definition builder object */ public ErrorEventDefinitionBuilder errorEventDefinition(String id) { final ErrorEventDefinition errorEventDefinition = createEmptyErrorEventDefinition(); if (id != null) { errorEventDefinition.setId(id); } element.getEventDefinitions().add(errorEventDefinition); return new ErrorEventDefinitionBuilder(modelInstance, errorEventDefinition); }
/** * Creates an error event definition with an unique id and returns a builder for the error event * definition. * * @return the error event definition builder object */ public ErrorEventDefinitionBuilder errorEventDefinition(String id) { final ErrorEventDefinition errorEventDefinition = createEmptyErrorEventDefinition(); if (id != null) { errorEventDefinition.setId(id); } element.getEventDefinitions().add(errorEventDefinition); return new ErrorEventDefinitionBuilder(modelInstance, errorEventDefinition); }