예제 #1
0
        protected internal virtual CmmnExecution eventNotificationsStarted(CmmnExecution execution)
        {
            // set current case execution as "TERMINATED"
            execution.CurrentState = TERMINATED;

            return(execution);
        }
예제 #2
0
        public virtual void execute(CmmnExecution execution)
        {
            execution.CurrentState = SuspendingState;

            CmmnActivityBehavior behavior = getActivityBehavior(execution);

            triggerBehavior(behavior, execution);
        }
예제 #3
0
        protected internal virtual CmmnExecution eventNotificationsStarted(CmmnExecution execution)
        {
            // the case instance perform a transition directly
            // to state ACTIVE
            execution.CurrentState = ACTIVE;

            return(execution);
        }
예제 #4
0
        protected internal override void postTransitionNotification(CmmnExecution execution)
        {
            CmmnExecution parent = execution.Parent;

            if (parent != null)
            {
                notifyParent(parent, execution);
            }
        }
예제 #5
0
        protected internal override void postTransitionNotification(CmmnExecution execution)
        {
            // the case instance is associated with the
            // casePlanModel as activity
            CmmnActivityBehavior behavior = getActivityBehavior(execution);

            // perform start() on associated behavior
            // because the case instance is ACTIVE
            behavior.started(execution);
        }
예제 #6
0
        protected internal virtual void notifyParent(CmmnExecution parent, CmmnExecution execution)
        {
            CmmnActivityBehavior behavior = getActivityBehavior(parent);

            if (behavior is CmmnCompositeActivityBehavior)
            {
                CmmnCompositeActivityBehavior compositeBehavior = (CmmnCompositeActivityBehavior)behavior;
                compositeBehavior.handleChildTermination(parent, execution);
            }
        }
예제 #7
0
        protected internal virtual CmmnExecution eventNotificationsStarted(CmmnExecution execution)
        {
            CmmnActivityBehavior behavior = getActivityBehavior(execution);

            behavior.onCreate(execution);

            execution.CurrentState = AVAILABLE;

            return(execution);
        }
예제 #8
0
        protected internal virtual CmmnExecution eventNotificationsStarted(CmmnExecution execution)
        {
            CmmnActivityBehavior behavior = getActivityBehavior(execution);

            triggerBehavior(behavior, execution);

            CaseExecutionState newState = getPreviousState(execution);

            execution.CurrentState = newState;

            return(execution);
        }
예제 #9
0
        protected internal override void preTransitionNotification(CmmnExecution execution)
        {
            CmmnExecution parent = execution.Parent;

            if (parent != null)
            {
                CmmnActivityBehavior behavior = getActivityBehavior(parent);
                if (behavior is CmmnCompositeActivityBehavior)
                {
                    CmmnCompositeActivityBehavior compositeBehavior = (CmmnCompositeActivityBehavior)behavior;
                    compositeBehavior.handleChildDisabled(parent, execution);
                }
            }
        }
예제 #10
0
        protected internal override void postTransitionNotification(CmmnExecution execution)
        {
            if (!execution.CaseInstanceExecution)
            {
                execution.remove();
            }

            CmmnExecution parent = execution.Parent;

            if (parent != null)
            {
                notifyParent(parent, execution);
            }
        }
예제 #11
0
        public static CmmnActivityBehavior getActivityBehavior(CmmnExecution execution)
        {
            string id = execution.Id;

            CmmnActivity activity = execution.Activity;

            ensureNotNull(typeof(PvmException), "Case execution '" + id + "' has no current activity.", "activity", activity);

            CmmnActivityBehavior behavior = activity.ActivityBehavior;

            ensureNotNull(typeof(PvmException), "There is no behavior specified in " + activity + " for case execution '" + id + "'.", "behavior", behavior);

            return(behavior);
        }
예제 #12
0
        public virtual HistoryEvent createCaseInstanceCreateEvt(DelegateCaseExecution caseExecution)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity caseExecutionEntity = (org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity) caseExecution;
            CaseExecutionEntity caseExecutionEntity = (CaseExecutionEntity)caseExecution;

            // create event instance
            HistoricCaseInstanceEventEntity evt = newCaseInstanceEventEntity(caseExecutionEntity);

            // initialize event
            initCaseInstanceEvent(evt, caseExecutionEntity, HistoryEventTypes.CASE_INSTANCE_CREATE);

            // set create time
            evt.CreateTime = ClockUtil.CurrentTime;

            // set create user id
            evt.CreateUserId = Context.CommandContext.AuthenticatedUserId;

            // set super case instance id
            CmmnExecution superCaseExecution = caseExecutionEntity.SuperCaseExecution;

            if (superCaseExecution != null)
            {
                evt.SuperCaseInstanceId = superCaseExecution.CaseInstanceId;
            }

            // set super process instance id
            ExecutionEntity superExecution = caseExecutionEntity.getSuperExecution();

            if (superExecution != null)
            {
                evt.SuperProcessInstanceId = superExecution.ProcessInstanceId;
            }

            return(evt);
        }
예제 #13
0
 protected internal override void postTransitionNotification(CmmnExecution execution)
 {
     execution.performOperation(CmmnAtomicOperation_Fields.CASE_EXECUTION_CREATED);
 }
예제 #14
0
 protected internal override void eventNotificationsCompleted(CmmnExecution execution)
 {
     execution.remove();
 }
예제 #15
0
 protected internal override void triggerBehavior(CmmnActivityBehavior behavior, CmmnExecution execution)
 {
     behavior.onParentSuspension(execution);
 }
예제 #16
0
        protected internal override void postTransitionNotification(CmmnExecution execution)
        {
            CmmnActivityBehavior behavior = getActivityBehavior(execution);

            behavior.reactivated(execution);
        }
예제 #17
0
 protected internal abstract void triggerBehavior(CmmnActivityBehavior behavior, CmmnExecution execution);
예제 #18
0
 public virtual bool isAsync(CmmnExecution execution)
 {
     return(false);
 }
예제 #19
0
 protected internal override void postTransitionNotification(CmmnExecution execution)
 {
     execution.deleteCascade();
 }
예제 #20
0
 protected internal virtual CaseExecutionState getPreviousState(CmmnExecution execution)
 {
     return(execution.PreviousState);
 }
예제 #21
0
 public VariableOnPartListener(CmmnExecution execution)
 {
     this.execution = execution;
 }
예제 #22
0
 protected internal override void triggerBehavior(CmmnActivityBehavior behavior, CmmnExecution execution)
 {
     behavior.onManualCompletion(execution);
 }
예제 #23
0
        public virtual void execute(CmmnExecution execution)
        {
            CmmnActivityBehavior behavior = getActivityBehavior(execution);

            behavior.created(execution);
        }
예제 #24
0
        protected internal virtual string getDefinitionKey(CmmnActivityExecution execution)
        {
            CmmnExecution caseExecution = (CmmnExecution)execution;

            return(CallableElement.getDefinitionKey(caseExecution));
        }
예제 #25
0
        public virtual void execute(CmmnExecution execution)
        {
            CmmnActivityBehavior behavior = getActivityBehavior(execution);

            behavior.fireEntryCriteria(execution);
        }
예제 #26
0
 protected internal override void triggerBehavior(CmmnActivityBehavior behavior, CmmnExecution execution)
 {
     behavior.onTermination(execution);
 }
예제 #27
0
        protected internal virtual int?getVersion(CmmnActivityExecution execution)
        {
            CmmnExecution caseExecution = (CmmnExecution)execution;

            return(CallableElement.getVersion(caseExecution));
        }
예제 #28
0
        protected internal virtual CmmnExecution eventNotificationsStarted(CmmnExecution execution)
        {
            execution.CurrentState = SUSPENDED;

            return(execution);
        }