Class ProcessEngineAgent

    • Field Detail

      • remcoms

        protected java.util.Map<Tuple2<java.lang.String,​IResourceIdentifier>,​java.util.List<java.lang.Runnable>> remcoms
        The remove commands.
      • eventmapper

        protected EventMapper eventmapper
        The event mapper.
      • waitqueue

        protected java.util.Map<java.lang.String,​java.util.Set<java.lang.Object>> waitqueue
        The event waitqueue.
      • waitqueuetypes

        protected java.util.Map<java.lang.String,​java.util.Set<Tuple2<java.lang.String,​IResourceIdentifier>>> waitqueuetypes
        The event types to be put in waitqueue.
      • creating

        protected java.util.Set<Future<java.lang.Void>> creating
        The set of currently creating process instances.
    • Constructor Detail

      • ProcessEngineAgent

        public ProcessEngineAgent()
    • Method Detail

      • init

        public IFuture<java.lang.Void> init()
        Init method.
      • extractDomainEventTypes

        protected void extractDomainEventTypes​(MActivity mevent,
                                               Tuple2<java.lang.String,​IResourceIdentifier> model,
                                               java.util.Set<java.lang.String> evs)
      • removeBpmnModel

        public IFuture<java.lang.Void> removeBpmnModel​(java.lang.String model,
                                                       IResourceIdentifier rid)
        Remove a bpmn model.
        Specified by:
        removeBpmnModel in interface IProcessEngineService
        Parameters:
        model - The bpmn model
        rid - The resource identifier (null for all platform jar resources).
      • processEvent

        public IFuture<java.lang.Void> processEvent​(java.lang.Object event,
                                                    java.lang.String type)
        Process an event and get the consequence events.
        Specified by:
        processEvent in interface IProcessEngineService
      • internalProcessEvent

        protected IFuture<java.lang.Void> internalProcessEvent​(java.lang.Object event,
                                                               java.lang.String atype,
                                                               boolean add)
        Process an event and get the consequence events. Called internally when event should not be added to waitqueue.
      • dispatchToWaitqueue

        protected void dispatchToWaitqueue​(java.lang.Object event,
                                           java.lang.String type)
      • dispatchFromWaitqueue

        protected void dispatchFromWaitqueue​(java.lang.String type,
                                             boolean add)
        Dispatch events from the waitqueue.
        Parameters:
        type - The event type. Events of that type will be redispatched.
      • defer

        protected IFuture<java.lang.Void> defer()
      • addEventMatcher

        public IFuture<java.lang.String> addEventMatcher​(java.lang.String[] events,
                                                         UnparsedExpression uexp,
                                                         java.lang.String[] imports,
                                                         java.util.Map<java.lang.String,​java.lang.Object> vals,
                                                         boolean remove,
                                                         IResultCommand<IFuture<java.lang.Void>,​java.lang.Object> cmd)
        Register an event description to be notified, when the event happens.
        Specified by:
        addEventMatcher in interface IInternalProcessEngineService
        Returns:
        An id to be used for deregistration.
      • addRemoveCommand

        protected void addRemoveCommand​(java.lang.Runnable com,
                                        Tuple2<java.lang.String,​IResourceIdentifier> key)
      • createCronCreateCommand

        protected static CronCreateCommand createCronCreateCommand​(IResourceIdentifier rid,
                                                                   java.lang.String model,
                                                                   java.lang.String mactid)
        Create a new cron create component command.