Example #1
0
 /// <summary>
 /// Provide a context execution or resource definition in which context the invocation
 ///   should be performed. If both parameters are null, the invocation is performed in the
 ///   current context.
 /// </summary>
 /// <param name="contextExecution"> set to an execution </param>
 public DelegateInvocation(BaseDelegateExecution contextExecution, ResourceDefinitionEntity contextResource)
 {
     // This constructor forces sub classes to call it, thereby making it more visible
     // whether a context switch is going to be performed for them.
     this.contextExecution = contextExecution;
     this.contextResource  = contextResource;
 }
Example #2
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: protected org.camunda.bpm.application.ProcessApplicationReference getProcessApplicationForInvocation(final DelegateInvocation invocation)
        protected internal virtual ProcessApplicationReference getProcessApplicationForInvocation(DelegateInvocation invocation)
        {
            BaseDelegateExecution    contextExecution = invocation.ContextExecution;
            ResourceDefinitionEntity contextResource  = invocation.ContextResource;

            if (contextExecution != null)
            {
                return(ProcessApplicationContextUtil.getTargetProcessApplication((CoreExecution)contextExecution));
            }
            else if (contextResource != null)
            {
                return(ProcessApplicationContextUtil.getTargetProcessApplication(contextResource));
            }
            else
            {
                return(null);
            }
        }