private void ProcessEvent(IBoundaryEvent b) { var shell = b.Shell; if (!shell.IsTerminated && (shell.IsInitialized || TryInit(shell))) { try { _currentLimit = shell.Receive(b, _currentLimit); } catch (Exception ex) { shell.TryAbort(ex); } if (shell.IsTerminated) { _activeInterpreters.Remove(shell); if (_activeInterpreters.Count == 0 && _newShells.Count == 0) { Context.Stop(Self); } } } }
private void addServiceTaskCompensationHandler(IBpmnModelInstance modelInstance, string boundaryEventId, string compensationHandlerId) { IBoundaryEvent boundaryEvent = (IBoundaryEvent)modelInstance.GetModelElementById/*<IBoundaryEvent>*/ (boundaryEventId); IBaseElement scope = (IBaseElement)boundaryEvent.ParentElement; IServiceTask compensationHandler = modelInstance.NewInstance <IServiceTask>(typeof(IServiceTask)); compensationHandler.Id = compensationHandlerId; compensationHandler.ForCompensation = true; //JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.GetName method: compensationHandler.CamundaClass = typeof(IncreaseCurrentTimeServiceTask).FullName; scope.AddChildElement(compensationHandler); IAssociation association = modelInstance.NewInstance <IAssociation>(typeof(IAssociation)); association.AssociationDirection = AssociationDirection.One; association.Source = boundaryEvent; association.Target = compensationHandler; scope.AddChildElement(association); }
public BoundaryEventBuilder(IBpmnModelInstance modelInstance, IBoundaryEvent element) : base(modelInstance, element) { }