예제 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void execute(final org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution execution) throws Exception
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
        public virtual void execute(ActivityExecution execution)
        {
            if (isAfterEventBasedGateway || conditionalEvent.tryEvaluate(execution))
            {
                leave(execution);
            }
        }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: @Override public void leaveOnSatisfiedCondition(final org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity eventSubscription, final org.camunda.bpm.engine.impl.core.variable.event.VariableEvent variableEvent)
        public virtual void leaveOnSatisfiedCondition(EventSubscriptionEntity eventSubscription, VariableEvent variableEvent)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl execution = eventSubscription.getExecution();
            PvmExecutionImpl execution = eventSubscription.Execution;

            if (execution != null && !execution.Ended && execution.Scope && conditionalEvent.tryEvaluate(variableEvent, execution))
            {
                execution.executeEventHandlerActivity(eventSubscription.Activity);
            }
        }
예제 #3
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: @Override public void leaveOnSatisfiedCondition(final org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity eventSubscription, final org.camunda.bpm.engine.impl.core.variable.event.VariableEvent variableEvent)
        public virtual void leaveOnSatisfiedCondition(EventSubscriptionEntity eventSubscription, VariableEvent variableEvent)
        {
            PvmExecutionImpl execution = eventSubscription.Execution;

            if (execution != null && !execution.Ended && execution.Scope && conditionalEvent.tryEvaluate(variableEvent, execution))
            {
                ActivityImpl activity = eventSubscription.Activity;
                activity = (ActivityImpl)activity.FlowScope;
                execution.executeEventHandlerActivity(activity);
            }
        }
예제 #4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void execute(org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution execution) throws Exception
        public virtual void execute(ActivityExecution execution)
        {
            // If conditional events exist after the event based gateway they should be evaluated.
            // If a condition is satisfied the event based gateway should be left,
            // otherwise the event based gateway is a wait state
            ActivityImpl eventBasedGateway = (ActivityImpl)execution.Activity;

            foreach (ActivityImpl act in eventBasedGateway.EventActivities)
            {
                ActivityBehavior activityBehavior = act.ActivityBehavior;
                if (activityBehavior is ConditionalEventBehavior)
                {
                    ConditionalEventBehavior   conditionalEventBehavior   = (ConditionalEventBehavior)activityBehavior;
                    ConditionalEventDefinition conditionalEventDefinition = conditionalEventBehavior.ConditionalEventDefinition;
                    if (conditionalEventDefinition.tryEvaluate(execution))
                    {
                        ((ExecutionEntity)execution).executeEventHandlerActivity(conditionalEventDefinition.ConditionalActivity);
                        return;
                    }
                }
            }
        }