Ejemplo n.º 1
0
        public static void addUserTaskCompensationHandler(BpmnModelInstance modelInstance, string boundaryEventId, string compensationHandlerId)
        {
            BoundaryEvent boundaryEvent = modelInstance.getModelElementById(boundaryEventId);
            BaseElement   scope         = (BaseElement)boundaryEvent.ParentElement;

            UserTask compensationHandler = modelInstance.newInstance(typeof(UserTask));

            compensationHandler.Id = compensationHandlerId;
            compensationHandler.ForCompensation = true;
            scope.addChildElement(compensationHandler);

            Association association = modelInstance.newInstance(typeof(Association));

            association.AssociationDirection = AssociationDirection.One;
            association.Source = boundaryEvent;
            association.Target = compensationHandler;
            scope.addChildElement(association);
        }
Ejemplo n.º 2
0
 public BoundaryEventBuilder(BpmnModelInstance modelInstance, BoundaryEvent element) : base(modelInstance, element, typeof(BoundaryEventBuilder))
 {
 }