예제 #1
0
        private IAuthorizationHandler GetAuthorizationHandler(ProcessDefinitionImpl processDefinition)
        {
            IAuthorizationHandler authorizationHandler = null;
            DelegationImpl        delegation           = processDefinition.AuthorizationDelegation;

            if (delegation != null)
            {
                authorizationHandler = (IAuthorizationHandler)delegation.GetDelegate();
            }
            return(authorizationHandler);
        }
예제 #2
0
 public void DelegateFork(DelegationImpl delegation, ExecutionContextImpl executionContext)
 {
     try
     {
         // delegate the fork
         IForkHandler forker = (IForkHandler)delegation.GetDelegate();
         executionContext.SetConfiguration(ParseConfiguration(delegation));
         forker.Fork(executionContext);
     }
     catch (Exception t)
     {
         HandleException(delegation, executionContext, t);
     }
 }
예제 #3
0
        public String DelegateAssignment(DelegationImpl delegation, ExecutionContextImpl executionContext)
        {
            String actorId = null;

            try
            {
                IAssignmentHandler assigner = (IAssignmentHandler)delegation.GetDelegate();
                executionContext.SetConfiguration(ParseConfiguration(delegation));
                actorId = assigner.SelectActor(executionContext);
            }
            catch (Exception t)
            {
                HandleException(delegation, executionContext, t);
            }

            return(actorId);
        }
예제 #4
0
        public bool DelegateJoin(DelegationImpl delegation, ExecutionContextImpl executionContext)
        {
            bool reactivateParent = false;

            try
            {
                IJoinHandler joiner = (IJoinHandler)delegation.GetDelegate();
                executionContext.SetConfiguration(ParseConfiguration(delegation));
                reactivateParent = joiner.Join(executionContext);
            }
            catch (Exception t)
            {
                HandleException(delegation, executionContext, t);
            }

            return(reactivateParent);
        }
예제 #5
0
		public String DelegateAssignment(DelegationImpl delegation, ExecutionContextImpl executionContext)
		{
			String actorId = null;

			try
			{
				IAssignmentHandler assigner = (IAssignmentHandler) delegation.GetDelegate();
				executionContext.SetConfiguration(ParseConfiguration(delegation));
				actorId = assigner.SelectActor(executionContext);
			}
			catch (Exception t)
			{
				HandleException(delegation, executionContext, t);
			}

			return actorId;
		}
예제 #6
0
		public bool DelegateJoin(DelegationImpl delegation, ExecutionContextImpl executionContext)
		{
			bool reactivateParent = false;

			try
			{
				IJoinHandler joiner = (IJoinHandler) delegation.GetDelegate();
				executionContext.SetConfiguration(ParseConfiguration(delegation));
				reactivateParent = joiner.Join(executionContext);
			}
			catch (Exception t)
			{
				HandleException(delegation, executionContext, t);
			}

			return reactivateParent;
		}
예제 #7
0
		public void DelegateFork(DelegationImpl delegation, ExecutionContextImpl executionContext)
		{
			try
			{
				// delegate the fork
				IForkHandler forker = (IForkHandler) delegation.GetDelegate();
				executionContext.SetConfiguration(ParseConfiguration(delegation));
				forker.Fork(executionContext);
			}
			catch (Exception t)
			{
				HandleException(delegation, executionContext, t);
			}
		}
예제 #8
0
		public Object[] DelegateProcessTermination(DelegationImpl delegation, ExecutionContextImpl executionContext)
		{
			Object[] completionData = new Object[2];
			try
			{
				IProcessInvocationHandler processInvoker = (IProcessInvocationHandler) delegation.GetDelegate();
				log.Debug("collecting results from the sub-process...");
				executionContext.SetConfiguration(ParseConfiguration(delegation));
				completionData[0] = processInvoker.CollectResults(executionContext);
				completionData[1] = processInvoker.GetCompletionTransitionName(executionContext);
			}
			catch (Exception t)
			{
				HandleException(delegation, executionContext, t);
			}
			return completionData;
		}
예제 #9
0
		public Object[] DelegateProcessInvocation(DelegationImpl delegation, ExecutionContextImpl executionContext)
		{
			Object[] invocationData = new Object[2];
			try
			{
				IProcessInvocationHandler processInvoker = (IProcessInvocationHandler) delegation.GetDelegate();
				log.Debug("requesting the attributeValues from the process invoker...");
				executionContext.SetConfiguration(ParseConfiguration(delegation));
				invocationData[0] = processInvoker.GetStartTransitionName(executionContext);
				invocationData[1] = processInvoker.GetStartAttributeValues(executionContext);
				log.Debug("process invoker specified transition '" + invocationData[0] + "' and supplied attributeValues '" + invocationData[1] + "'");
			}
			catch (Exception t)
			{
				HandleException(delegation, executionContext, t);
			}
			return invocationData;
		}
예제 #10
0
 public Object[] DelegateProcessTermination(DelegationImpl delegation, ExecutionContextImpl executionContext)
 {
     Object[] completionData = new Object[2];
     try
     {
         IProcessInvocationHandler processInvoker = (IProcessInvocationHandler)delegation.GetDelegate();
         log.Debug("collecting results from the sub-process...");
         executionContext.SetConfiguration(ParseConfiguration(delegation));
         completionData[0] = processInvoker.CollectResults(executionContext);
         completionData[1] = processInvoker.GetCompletionTransitionName(executionContext);
     }
     catch (Exception t)
     {
         HandleException(delegation, executionContext, t);
     }
     return(completionData);
 }
예제 #11
0
 public Object[] DelegateProcessInvocation(DelegationImpl delegation, ExecutionContextImpl executionContext)
 {
     Object[] invocationData = new Object[2];
     try
     {
         IProcessInvocationHandler processInvoker = (IProcessInvocationHandler)delegation.GetDelegate();
         log.Debug("requesting the attributeValues from the process invoker...");
         executionContext.SetConfiguration(ParseConfiguration(delegation));
         invocationData[0] = processInvoker.GetStartTransitionName(executionContext);
         invocationData[1] = processInvoker.GetStartAttributeValues(executionContext);
         log.Debug("process invoker specified transition '" + invocationData[0] + "' and supplied attributeValues '" + invocationData[1] + "'");
     }
     catch (Exception t)
     {
         HandleException(delegation, executionContext, t);
     }
     return(invocationData);
 }