Пример #1
0
		public static ActionDefinitionReference Create(string actionName, string order, string parameter)
		{
			ActionDefinitionReference actionDefinitionReference = new ActionDefinitionReference()
			{
				ActionName = actionName,
				Order = int.Parse(order),
				ActionParameter = parameter
			};
			return actionDefinitionReference;
		}
Пример #2
0
		public static ConditionDefinition Create(string type, ActionDefinitionReference action, string conditionInversion, string resultOnPreExecution)
		{
			ConditionType conditionType;
			bool? nullable;
			Enum.TryParse<ConditionType>(type, true, out conditionType);
			ConditionDefinition conditionDefinition = new ConditionDefinition()
			{
				Action = action,
				Type = conditionType,
				ConditionInversion = (string.IsNullOrEmpty(conditionInversion) ? false : bool.Parse(conditionInversion))
			};
			ConditionDefinition conditionDefinition1 = conditionDefinition;
			if (string.IsNullOrEmpty(resultOnPreExecution))
			{
				nullable = null;
			}
			else
			{
				nullable = new bool?(bool.Parse(resultOnPreExecution));
			}
			conditionDefinition1.ResultOnPreExecution = nullable;
			return conditionDefinition;
		}
Пример #3
0
		public void AddPreExecutionAction(ActionDefinitionReference action)
		{
			this.PreExecutionImplementation.Add(action);
		}
Пример #4
0
		public void AddAction(ActionDefinitionReference action)
		{
			this.Implementation.Add(action);
		}
Пример #5
0
		private void ExecuteMethod(ActionDefinitionReference method, ExecutionResponseParametersComplete response)
		{
			CodeActionsInvoker codeActionsInvoker = response.ProcessInstance.ProcessScheme.CodeActionsInvoker;
			if (this.GlobalActionsInvoker.ExistsAction(method.ActionName))
			{
				this.GlobalActionsInvoker.InvokeAction(method.ActionName, response.ProcessInstance, this._runtime, method.ActionParameter);
				return;
			}
			if (codeActionsInvoker.ExistsAction(method.ActionName))
			{
				codeActionsInvoker.InvokeAction(method.ActionName, response.ProcessInstance, this._runtime, method.ActionParameter);
				return;
			}
			this.ActionProvider.ExecuteAction(method.ActionName, response.ProcessInstance, this._runtime, method.ActionParameter);
		}