Beispiel #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: protected void performNotification(final org.camunda.bpm.engine.delegate.DelegateExecution execution, java.util.concurrent.Callable<Void> notification) throws Exception
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
        protected internal virtual void performNotification(DelegateExecution execution, Callable <Void> notification)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.application.ProcessApplicationReference processApp = org.camunda.bpm.engine.impl.context.ProcessApplicationContextUtil.getTargetProcessApplication((org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity) execution);
            ProcessApplicationReference processApp = ProcessApplicationContextUtil.getTargetProcessApplication((ExecutionEntity)execution);

            if (processApp == null)
            {
                // ignore silently
                LOG.noTargetProcessApplicationForExecution(execution);
            }
            else
            {
                if (ProcessApplicationContextUtil.requiresContextSwitch(processApp))
                {
                    // this should not be necessary since context switch is already performed by OperationContext and / or DelegateInterceptor
                    Context.executeWithinProcessApplication(notification, processApp, new InvocationContext(execution));
                }
                else
                {
                    // context switch already performed
                    notification.call();
                }
            }
        }
Beispiel #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void signal(final org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution execution, final String signalName, final Object signalData) throws Exception
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
        public virtual void signal(ActivityExecution execution, string signalName, object signalData)
        {
            ProcessApplicationReference targetProcessApplication = ProcessApplicationContextUtil.getTargetProcessApplication((ExecutionEntity)execution);

            if (ProcessApplicationContextUtil.requiresContextSwitch(targetProcessApplication))
            {
                Context.executeWithinProcessApplication(new CallableAnonymousInnerClass(this, execution, signalName, signalData)
                                                        , targetProcessApplication, new InvocationContext(execution));
            }
            else
            {
                doSignal(execution, signalName, signalData);
            }
        }
Beispiel #3
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: public Object resolveDelegateClass(final org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution execution)
        public virtual object resolveDelegateClass(ActivityExecution execution)
        {
            ProcessApplicationReference targetProcessApplication = ProcessApplicationContextUtil.getTargetProcessApplication((ExecutionEntity)execution);

            if (ProcessApplicationContextUtil.requiresContextSwitch(targetProcessApplication))
            {
                return(Context.executeWithinProcessApplication(new CallableAnonymousInnerClass(this, execution)
                                                               , targetProcessApplication, new InvocationContext(execution)));
            }
            else
            {
                return(instantiateDelegateClass(execution));
            }
        }
Beispiel #4
0
 protected internal virtual bool requiresContextSwitch(ProcessApplicationReference processApplicationReference)
 {
     return(ProcessApplicationContextUtil.requiresContextSwitch(processApplicationReference));
 }