Beispiel #1
0
        private Collection <string> GetNextEvents(StateMachineWorkflowInstance stateMachine)
        {
            Collection <string> events = new Collection <string>();


            Activity          activ = stateMachine.StateMachineWorkflow.Activities[stateMachine.CurrentStateName];
            CompositeActivity act   = stateMachine.StateMachineWorkflow.Activities[stateMachine.CurrentStateName] as CompositeActivity;

            CompositeActivity act2 = null;

            for (int i = 0; i < act.Activities.Count; i++)
            {
                act2 = act.Activities[i] as CompositeActivity;

                if (act2 is EventDrivenActivity)
                {
                    foreach (Activity act3 in act2.Activities)
                    {
                        if (act3 is HandleExternalEventActivity)
                        {
                            HandleExternalEventActivity handl = act3 as HandleExternalEventActivity;
                            events.Add(handl.EventName);
                        }
                    }
                }
            }

            return(events);
        }
Beispiel #2
0
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.Runtime.CorrelationToken                correlationtoken1         = new System.Workflow.Runtime.CorrelationToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind1             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Runtime.CorrelationToken                correlationtoken2         = new System.Workflow.Runtime.CorrelationToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind2             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     this.handleExternalEvent   = new System.Workflow.Activities.HandleExternalEventActivity();
     this.initializeCorrelation = new System.Workflow.Activities.CallExternalMethodActivity();
     //
     // handleExternalEvent
     //
     correlationtoken1.Name = "token";
     correlationtoken1.OwnerActivityName       = "WaitForExternalEventActivity";
     this.handleExternalEvent.CorrelationToken = correlationtoken1;
     this.handleExternalEvent.EventName        = "OnExternalEvent";
     this.handleExternalEvent.InterfaceType    = typeof(ILoveSharePoint.Workflow.Activities.IWaitForExternalEventService);
     this.handleExternalEvent.Name             = "handleExternalEvent";
     activitybind1.Name = "WaitForExternalEventActivity";
     activitybind1.Path = "ExternalEventArgs";
     workflowparameterbinding1.ParameterName = "e";
     workflowparameterbinding1.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     this.handleExternalEvent.ParameterBindings.Add(workflowparameterbinding1);
     this.handleExternalEvent.Invoked      += new System.EventHandler <System.Workflow.Activities.ExternalDataEventArgs>(this.Invoked);
     this.handleExternalEvent.InterfaceType = typeof(ILoveSharePoint.Workflow.Activities.IWaitForExternalEventService);
     //
     // initializeCorrelation
     //
     correlationtoken2.Name = "token";
     correlationtoken2.OwnerActivityName         = "WaitForExternalEventActivity";
     this.initializeCorrelation.CorrelationToken = correlationtoken2;
     this.initializeCorrelation.InterfaceType    = typeof(ILoveSharePoint.Workflow.Activities.IWaitForExternalEventService);
     this.initializeCorrelation.MethodName       = "Initialize";
     this.initializeCorrelation.Name             = "initializeCorrelation";
     activitybind2.Name = "WaitForExternalEventActivity";
     activitybind2.Path = "CorrelationIdentifier";
     workflowparameterbinding2.ParameterName = "correlationToken";
     workflowparameterbinding2.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     this.initializeCorrelation.ParameterBindings.Add(workflowparameterbinding2);
     this.initializeCorrelation.InterfaceType = typeof(ILoveSharePoint.Workflow.Activities.IWaitForExternalEventService);
     //
     // WaitForExternalEventActivity
     //
     this.Activities.Add(this.initializeCorrelation);
     this.Activities.Add(this.handleExternalEvent);
     this.Name = "WaitForExternalEventActivity";
     this.CanModifyActivities = false;
 }
Beispiel #3
0
 public void AddTrigger(string buttonName, string nextState)
 {
     EventDrivenActivity eda = new EventDrivenActivity();
     HandleExternalEventActivity heea = new HandleExternalEventActivity();
     heea.InterfaceType = _iface;
     heea.EventName = "ButtonPressed";
     SetStateActivity ssa = new SetStateActivity();
     ssa.TargetStateName = nextState;
     eda.Activities.Add(heea);
     eda.Activities.Add(ssa);
     this.CanModifyActivities = true;
     this.Activities.Add(eda);
     this.CanModifyActivities = false;
 }
Beispiel #4
0
        static public WorkflowAction[] GetSubscribedActions(Guid workflowId)
        {
            List <WorkflowAction>       actions          = new List <WorkflowAction>();
            SqlTrackingQuery            sqlTrackingQuery = new SqlTrackingQuery(ConfigurationManager.ConnectionStrings[Constants.Database.TenantWorkflowStore].ConnectionString);
            SqlTrackingWorkflowInstance trackingWorkflow;

            if (!sqlTrackingQuery.TryGetWorkflow(workflowId, out trackingWorkflow) ||
                trackingWorkflow.Status == WorkflowStatus.Completed ||
                trackingWorkflow.Status == WorkflowStatus.Terminated)
            {
                return(actions.ToArray());
            }

            WorkflowInstance instance = Runtime.GetWorkflow(workflowId);
            Activity         workflow = instance.GetWorkflowDefinition();
            ReadOnlyCollection <WorkflowQueueInfo> queues = instance.GetWorkflowQueueData();

            foreach (WorkflowQueueInfo s in queues)
            {
                if (s.SubscribedActivityNames.Count == 0)
                {
                    continue;
                }
                EventQueueName eventQueueName = s.QueueName as EventQueueName;
                if (eventQueueName != null)
                {
                    WorkflowAction action = new WorkflowAction();
                    action.ActionName = eventQueueName.MethodName;
                    string   activityName  = s.SubscribedActivityNames[0];
                    string[] splittedNames = activityName.Split('.');
                    action.StepName = splittedNames[0];
                    HandleExternalEventActivity activity = workflow.GetActivityByName(activityName) as HandleExternalEventActivity;
                    if (activity != null && activity.Roles != null && activity.Roles.Count > 0)
                    {
                        List <string> roleNames = new List <string>();
                        foreach (WorkflowRole role in activity.Roles)
                        {
                            roleNames.Add(role.Name);
                        }
                        action.QualifiedRoles = roleNames.ToArray();
                    }
                    actions.Add(action);
                }
            }
            return(actions.ToArray());
        }
 internal static ActivityExecutionStatus ExecuteForActivity(HandleExternalEventActivity activity, ActivityExecutionContext context, Type interfaceType, string operation, out object[] args)
 {
     WorkflowQueuingService queueSvcs = (WorkflowQueuingService) context.GetService(typeof(WorkflowQueuingService));
     args = null;
     IComparable queueId = CorrelationService.ResolveQueueName(activity, interfaceType, operation);
     if (queueId != null)
     {
         WorkflowQueue queue;
         object msg = DequeueMessage(queueId, queueSvcs, activity, out queue);
         CorrelationService.UninitializeFollowers(interfaceType, operation, queue);
         if (msg != null)
         {
             args = ProcessEvent(activity, context, msg, interfaceType, operation);
             return ActivityExecutionStatus.Closed;
         }
     }
     return ActivityExecutionStatus.Executing;
 }
Beispiel #6
0
        public static IEnumerable <string> GetCurrentEventNames(this StateMachineWorkflowInstance stateMachineWorkflowInstance, Type eventServiceType)
        {
            if (stateMachineWorkflowInstance == null)
            {
                throw new ArgumentNullException("stateMachineWorkflowInstance");
            }
            if (eventServiceType == null)
            {
                throw new ArgumentNullException("eventServiceType");
            }

            Verify.IsNotNull(stateMachineWorkflowInstance.CurrentState, "The workflow has already been canceled.");

            foreach (Activity currentStateActivity in stateMachineWorkflowInstance.CurrentState.Activities)
            {
                if (currentStateActivity.Enabled == false)
                {
                    continue;
                }
                if ((currentStateActivity is EventDrivenActivity) == false)
                {
                    continue;
                }

                HandleExternalEventActivity handleExternalEventActivity = ((EventDrivenActivity)currentStateActivity).EventActivity as HandleExternalEventActivity;
                if (handleExternalEventActivity == null)
                {
                    continue;
                }
                if (handleExternalEventActivity.Enabled == false)
                {
                    continue;
                }
                if (handleExternalEventActivity.InterfaceType != eventServiceType)
                {
                    continue;
                }

                yield return(handleExternalEventActivity.EventName);
            }
        }
 private static object[] ProcessEvent(HandleExternalEventActivity activity, ActivityExecutionContext context, object msg, Type interfaceType, string operation)
 {
     IMethodMessage message = msg as IMethodMessage;
     if (message == null)
     {
         Exception exception = msg as Exception;
         if (exception != null)
         {
             throw exception;
         }
         throw new InvalidOperationException(SR.GetString("Error_InvalidLocalServiceMessage"));
     }
     CorrelationService.InvalidateCorrelationToken(activity, interfaceType, operation, message.Args);
     IdentityContextData data = (IdentityContextData) message.LogicalCallContext.GetData("__identitycontext__");
     ValidateRoles(activity, data.Identity);
     if (ProcessEventParameters(activity.ParameterBindings, message, interfaceType, operation))
     {
         return message.Args;
     }
     return null;
 }
        public override void PerformReflection(ReflectionContext context)
        {
            Type workflowType = ((WorkflowNode)context.CurrentTreeNode).WorkflowType;

            object workflowInstance = null;

            try
            {
                workflowInstance = workflowType.InvokeMember(string.Empty, BindingFlags.CreateInstance, null, null, null, CultureInfo.InvariantCulture);
            }
            catch (Exception exc)
            {
                MessageBox.Show("Workflow type could not be created: " + exc.ToString());
                return;
            }

            Activity root = (Activity)workflowInstance;

            Queue <Activity> toProcess       = new Queue <Activity>();
            List <Type>      foundInterfaces = new List <Type>();

            toProcess.Enqueue(root);

            while (toProcess.Count > 0)
            {
                Activity activity = toProcess.Dequeue();

                if (activity is CompositeActivity)
                {
                    CompositeActivity compositeActivity = (CompositeActivity)activity;

                    foreach (Activity child in compositeActivity.Activities)
                    {
                        toProcess.Enqueue(child);
                    }
                }
                else if (activity is HandleExternalEventActivity)
                {
                    HandleExternalEventActivity eventSink = (HandleExternalEventActivity)activity;

                    if (!foundInterfaces.Contains(eventSink.InterfaceType))
                    {
                        foundInterfaces.Add(eventSink.InterfaceType);
                    }
                }
                else if (activity is CallExternalMethodActivity)
                {
                    CallExternalMethodActivity invoke = (CallExternalMethodActivity)activity;

                    if (!foundInterfaces.Contains(invoke.InterfaceType))
                    {
                        foundInterfaces.Add(invoke.InterfaceType);
                    }
                }
            }

            foreach (Type service in foundInterfaces)
            {
                ServiceInterfaceNode node = new ServiceInterfaceNode();
                node.ServiceInterfaceType = service;
                node.Text = "Required Service: " + service.FullName;
                node.SelectedImageIndex = node.ImageIndex = context.GetImageIndex(typeof(RequiredServiceInterfacesComponent), ServiceInterfaceNodeImageName);

                context.CurrentTreeNode.Nodes.Add(node);
                ReflectChildComponents(context.CreateClone(node));
            }
        }
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference1 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding3 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding4 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding5 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding6 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding7 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding8 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference2 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference3 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference4 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference5 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference6 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference7 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference8 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference9 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference10 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference11 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference12 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference13 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference14 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding9 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding10 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding11 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind7 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding12 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind8 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding13 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind9 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding14 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference15 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.ComponentModel.ActivityBind activitybind10 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding15 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     this.setStateActivity3 = new System.Workflow.Activities.SetStateActivity();
     this.AuthFailed = new System.Workflow.Activities.CallExternalMethodActivity();
     this.SetMenuState = new System.Workflow.Activities.SetStateActivity();
     this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity1 = new System.Workflow.Activities.IfElseBranchActivity();
     this.callExternalMethodActivity7 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.setStateActivity10 = new System.Workflow.Activities.SetStateActivity();
     this.callExternalMethodActivity11 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.codeActivity2 = new System.Workflow.Activities.CodeActivity();
     this.callExternalMethodActivity12 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.callExternalMethodActivity2 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.callExternalMethodActivity3 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.callExternalMethodActivity5 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.setStateActivity9 = new System.Workflow.Activities.SetStateActivity();
     this.ViewCurrentCardNumber = new System.Workflow.Activities.CallExternalMethodActivity();
     this.SetSelectLanguageState = new System.Workflow.Activities.SetStateActivity();
     this.setStateActivity1 = new System.Workflow.Activities.SetStateActivity();
     this.ExitFromBalance = new System.Workflow.Activities.SetStateActivity();
     this.ViewCurrentPin = new System.Workflow.Activities.CallExternalMethodActivity();
     this.ifElseActivity1 = new System.Workflow.Activities.IfElseActivity();
     this.setStateActivity8 = new System.Workflow.Activities.SetStateActivity();
     this.codeActivity1 = new System.Workflow.Activities.CodeActivity();
     this.setStateActivity4 = new System.Workflow.Activities.SetStateActivity();
     this.setStateActivity5 = new System.Workflow.Activities.SetStateActivity();
     this.codeActivity8 = new System.Workflow.Activities.CodeActivity();
     this.setStateActivity7 = new System.Workflow.Activities.SetStateActivity();
     this.codeActivity7 = new System.Workflow.Activities.CodeActivity();
     this.setStateActivity6 = new System.Workflow.Activities.SetStateActivity();
     this.codeActivity5 = new System.Workflow.Activities.CodeActivity();
     this.ifElseBranchActivity13 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity12 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity11 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity10 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity9 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity6 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity5 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity8 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity7 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity4 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity3 = new System.Workflow.Activities.IfElseBranchActivity();
     this.cancellationHandlerActivity1 = new System.Workflow.ComponentModel.CancellationHandlerActivity();
     this.compensatableSequenceActivity5 = new System.Workflow.Activities.CompensatableSequenceActivity();
     this.compensatableSequenceActivity4 = new System.Workflow.Activities.CompensatableSequenceActivity();
     this.compensatableSequenceActivity3 = new System.Workflow.Activities.CompensatableSequenceActivity();
     this.compensatableSequenceActivity2 = new System.Workflow.Activities.CompensatableSequenceActivity();
     this.compensatableSequenceActivity1 = new System.Workflow.Activities.CompensatableSequenceActivity();
     this.ifElseActivity5 = new System.Workflow.Activities.IfElseActivity();
     this.handleExternalEventActivity3 = new System.Workflow.Activities.HandleExternalEventActivity();
     this.callExternalMethodActivity6 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.ifElseActivity4 = new System.Workflow.Activities.IfElseActivity();
     this.handleExternalEventActivity2 = new System.Workflow.Activities.HandleExternalEventActivity();
     this.callExternalMethodActivity4 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.callExternalMethodActivity10 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.callExternalMethodActivity8 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.ReadCardIfElse = new System.Workflow.Activities.IfElseActivity();
     this.ReadCardNumber = new System.Workflow.Activities.HandleExternalEventActivity();
     this.DisplayWelcomeMessage = new System.Workflow.Activities.CallExternalMethodActivity();
     this.InitCode = new System.Workflow.Activities.CodeActivity();
     this.ifElseActivity3 = new System.Workflow.Activities.IfElseActivity();
     this.handleExternalEventActivity1 = new System.Workflow.Activities.HandleExternalEventActivity();
     this.callExternalMethodActivity9 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.ifElseActivity2 = new System.Workflow.Activities.IfElseActivity();
     this.GetPinHandle = new System.Workflow.Activities.HandleExternalEventActivity();
     this.callExternalMethodActivity1 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.setStateActivity2 = new System.Workflow.Activities.SetStateActivity();
     this.conditionedActivityGroup1 = new System.Workflow.Activities.ConditionedActivityGroup();
     this.GetActionToDo = new System.Workflow.Activities.HandleExternalEventActivity();
     this.ViewMenuText = new System.Workflow.Activities.CallExternalMethodActivity();
     this.SetAuthState = new System.Workflow.Activities.SetStateActivity();
     this.GetLanguageHandle = new System.Workflow.Activities.HandleExternalEventActivity();
     this.ViewLanguageMenu = new System.Workflow.Activities.CallExternalMethodActivity();
     this.eventDrivenActivity2 = new System.Workflow.Activities.EventDrivenActivity();
     this.stateInitializationActivity3 = new System.Workflow.Activities.StateInitializationActivity();
     this.eventDrivenActivity1 = new System.Workflow.Activities.EventDrivenActivity();
     this.stateInitializationActivity2 = new System.Workflow.Activities.StateInitializationActivity();
     this.handleExternalEventActivity5 = new System.Workflow.Activities.HandleExternalEventActivity();
     this.handleExternalEventActivity6 = new System.Workflow.Activities.HandleExternalEventActivity();
     this.stateInitializationActivity7 = new System.Workflow.Activities.StateInitializationActivity();
     this.stateInitializationActivity5 = new System.Workflow.Activities.StateInitializationActivity();
     this.EnterCardEvent = new System.Workflow.Activities.EventDrivenActivity();
     this.Init = new System.Workflow.Activities.StateInitializationActivity();
     this.MenuOrExit = new System.Workflow.Activities.EventDrivenActivity();
     this.InitBalace = new System.Workflow.Activities.StateInitializationActivity();
     this.GetPin = new System.Workflow.Activities.EventDrivenActivity();
     this.InitAuth = new System.Workflow.Activities.StateInitializationActivity();
     this.stateInitializationActivity1 = new System.Workflow.Activities.StateInitializationActivity();
     this.SelectActionToDo = new System.Workflow.Activities.EventDrivenActivity();
     this.InitMenu = new System.Workflow.Activities.StateInitializationActivity();
     this.GetLanguage = new System.Workflow.Activities.EventDrivenActivity();
     this.InitLanguage = new System.Workflow.Activities.StateInitializationActivity();
     this.EnterNewPin = new System.Workflow.Activities.StateActivity();
     this.EnterOldPin = new System.Workflow.Activities.StateActivity();
     this.NumHandler = new System.Workflow.Activities.EventDrivenActivity();
     this.ActionHandler = new System.Workflow.Activities.EventDrivenActivity();
     this.Deposit = new System.Workflow.Activities.StateActivity();
     this.Withdrawal = new System.Workflow.Activities.StateActivity();
     this.EnterCard = new System.Workflow.Activities.StateActivity();
     this.ViewBalance = new System.Workflow.Activities.StateActivity();
     this.Authenticate = new System.Workflow.Activities.StateActivity();
     this.Final = new System.Workflow.Activities.StateActivity();
     this.Menu = new System.Workflow.Activities.StateActivity();
     this.SelectLanguage = new System.Workflow.Activities.StateActivity();
     //
     // setStateActivity3
     //
     this.setStateActivity3.Name = "setStateActivity3";
     this.setStateActivity3.TargetStateName = "Final";
     //
     // AuthFailed
     //
     this.AuthFailed.InterfaceType = typeof(Interfaces.IFormService);
     this.AuthFailed.MethodName = "AuthFailed";
     this.AuthFailed.Name = "AuthFailed";
     //
     // SetMenuState
     //
     this.SetMenuState.Name = "SetMenuState";
     this.SetMenuState.TargetStateName = "Menu";
     //
     // ifElseBranchActivity2
     //
     this.ifElseBranchActivity2.Activities.Add(this.AuthFailed);
     this.ifElseBranchActivity2.Activities.Add(this.setStateActivity3);
     this.ifElseBranchActivity2.Name = "ifElseBranchActivity2";
     //
     // ifElseBranchActivity1
     //
     this.ifElseBranchActivity1.Activities.Add(this.SetMenuState);
     ruleconditionreference1.ConditionName = "IsAuth";
     this.ifElseBranchActivity1.Condition = ruleconditionreference1;
     this.ifElseBranchActivity1.Name = "ifElseBranchActivity1";
     //
     // callExternalMethodActivity7
     //
     this.callExternalMethodActivity7.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity7.MethodName = "SendBackMessage";
     this.callExternalMethodActivity7.Name = "callExternalMethodActivity7";
     activitybind1.Name = "BankomatsWorkflow";
     activitybind1.Path = "newPIN";
     workflowparameterbinding1.ParameterName = "message";
     workflowparameterbinding1.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     this.callExternalMethodActivity7.ParameterBindings.Add(workflowparameterbinding1);
     //
     // setStateActivity10
     //
     this.setStateActivity10.Name = "setStateActivity10";
     this.setStateActivity10.TargetStateName = "Menu";
     //
     // callExternalMethodActivity11
     //
     this.callExternalMethodActivity11.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity11.MethodName = "SendBackMessageLine";
     this.callExternalMethodActivity11.Name = "callExternalMethodActivity11";
     workflowparameterbinding2.ParameterName = "message";
     workflowparameterbinding2.Value = "\"Ja pomenjal pin\"";
     this.callExternalMethodActivity11.ParameterBindings.Add(workflowparameterbinding2);
     //
     // codeActivity2
     //
     this.codeActivity2.Name = "codeActivity2";
     this.codeActivity2.ExecuteCode += new System.EventHandler(this.codeActivity2_ExecuteCode_1);
     //
     // callExternalMethodActivity12
     //
     this.callExternalMethodActivity12.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity12.MethodName = "SendBackMessage";
     this.callExternalMethodActivity12.Name = "callExternalMethodActivity12";
     activitybind2.Name = "BankomatsWorkflow";
     activitybind2.Path = "newPIN";
     workflowparameterbinding3.ParameterName = "message";
     workflowparameterbinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     this.callExternalMethodActivity12.ParameterBindings.Add(workflowparameterbinding3);
     //
     // callExternalMethodActivity2
     //
     this.callExternalMethodActivity2.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity2.MethodName = "SendBackMessage";
     this.callExternalMethodActivity2.Name = "callExternalMethodActivity2";
     workflowparameterbinding4.ParameterName = "message";
     workflowparameterbinding4.Value = "\"Ti sosew\"";
     this.callExternalMethodActivity2.ParameterBindings.Add(workflowparameterbinding4);
     //
     // callExternalMethodActivity3
     //
     this.callExternalMethodActivity3.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity3.MethodName = "SendBackMessage";
     this.callExternalMethodActivity3.Name = "callExternalMethodActivity3";
     activitybind3.Name = "BankomatsWorkflow";
     activitybind3.Path = "oldPIN";
     workflowparameterbinding5.ParameterName = "message";
     workflowparameterbinding5.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
     this.callExternalMethodActivity3.ParameterBindings.Add(workflowparameterbinding5);
     //
     // callExternalMethodActivity5
     //
     this.callExternalMethodActivity5.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity5.MethodName = "SendBackMessage";
     this.callExternalMethodActivity5.Name = "callExternalMethodActivity5";
     activitybind4.Name = "BankomatsWorkflow";
     activitybind4.Path = "oldPIN";
     workflowparameterbinding6.ParameterName = "message";
     workflowparameterbinding6.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
     this.callExternalMethodActivity5.ParameterBindings.Add(workflowparameterbinding6);
     //
     // setStateActivity9
     //
     this.setStateActivity9.Name = "setStateActivity9";
     this.setStateActivity9.TargetStateName = "EnterNewPin";
     //
     // ViewCurrentCardNumber
     //
     this.ViewCurrentCardNumber.InterfaceType = typeof(Interfaces.IFormService);
     this.ViewCurrentCardNumber.MethodName = "SendBackMessage";
     this.ViewCurrentCardNumber.Name = "ViewCurrentCardNumber";
     activitybind5.Name = "BankomatsWorkflow";
     activitybind5.Path = "currentAccountNumber";
     workflowparameterbinding7.ParameterName = "message";
     workflowparameterbinding7.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
     this.ViewCurrentCardNumber.ParameterBindings.Add(workflowparameterbinding7);
     //
     // SetSelectLanguageState
     //
     this.SetSelectLanguageState.Name = "SetSelectLanguageState";
     this.SetSelectLanguageState.TargetStateName = "SelectLanguage";
     //
     // setStateActivity1
     //
     this.setStateActivity1.Name = "setStateActivity1";
     this.setStateActivity1.TargetStateName = "Menu";
     //
     // ExitFromBalance
     //
     this.ExitFromBalance.Name = "ExitFromBalance";
     this.ExitFromBalance.TargetStateName = "Final";
     //
     // ViewCurrentPin
     //
     this.ViewCurrentPin.InterfaceType = typeof(Interfaces.IFormService);
     this.ViewCurrentPin.MethodName = "SendBackMessage";
     this.ViewCurrentPin.Name = "ViewCurrentPin";
     activitybind6.Name = "BankomatsWorkflow";
     activitybind6.Path = "tryPIN";
     workflowparameterbinding8.ParameterName = "message";
     workflowparameterbinding8.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
     this.ViewCurrentPin.ParameterBindings.Add(workflowparameterbinding8);
     //
     // ifElseActivity1
     //
     this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity1);
     this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity2);
     this.ifElseActivity1.Name = "ifElseActivity1";
     //
     // setStateActivity8
     //
     this.setStateActivity8.Name = "setStateActivity8";
     this.setStateActivity8.TargetStateName = "EnterOldPin";
     //
     // codeActivity1
     //
     this.codeActivity1.Name = "codeActivity1";
     this.codeActivity1.ExecuteCode += new System.EventHandler(this.ChangeMenu);
     //
     // setStateActivity4
     //
     this.setStateActivity4.Name = "setStateActivity4";
     this.setStateActivity4.TargetStateName = "Final";
     //
     // setStateActivity5
     //
     this.setStateActivity5.Name = "setStateActivity5";
     this.setStateActivity5.TargetStateName = "Deposit";
     //
     // codeActivity8
     //
     this.codeActivity8.Name = "codeActivity8";
     this.codeActivity8.ExecuteCode += new System.EventHandler(this.ChangeMenu);
     //
     // setStateActivity7
     //
     this.setStateActivity7.Name = "setStateActivity7";
     this.setStateActivity7.TargetStateName = "Withdrawal";
     //
     // codeActivity7
     //
     this.codeActivity7.Name = "codeActivity7";
     this.codeActivity7.ExecuteCode += new System.EventHandler(this.ChangeMenu);
     //
     // setStateActivity6
     //
     this.setStateActivity6.Name = "setStateActivity6";
     this.setStateActivity6.TargetStateName = "ViewBalance";
     //
     // codeActivity5
     //
     this.codeActivity5.Name = "codeActivity5";
     this.codeActivity5.ExecuteCode += new System.EventHandler(this.ChangeMenu);
     //
     // ifElseBranchActivity13
     //
     this.ifElseBranchActivity13.Activities.Add(this.callExternalMethodActivity7);
     this.ifElseBranchActivity13.Name = "ifElseBranchActivity13";
     //
     // ifElseBranchActivity12
     //
     this.ifElseBranchActivity12.Activities.Add(this.callExternalMethodActivity12);
     this.ifElseBranchActivity12.Activities.Add(this.codeActivity2);
     this.ifElseBranchActivity12.Activities.Add(this.callExternalMethodActivity11);
     this.ifElseBranchActivity12.Activities.Add(this.setStateActivity10);
     ruleconditionreference2.ConditionName = "NewPinLenght";
     this.ifElseBranchActivity12.Condition = ruleconditionreference2;
     this.ifElseBranchActivity12.Name = "ifElseBranchActivity12";
     //
     // ifElseBranchActivity11
     //
     this.ifElseBranchActivity11.Activities.Add(this.callExternalMethodActivity2);
     ruleconditionreference3.ConditionName = "PinCompare";
     this.ifElseBranchActivity11.Condition = ruleconditionreference3;
     this.ifElseBranchActivity11.Name = "ifElseBranchActivity11";
     //
     // ifElseBranchActivity10
     //
     this.ifElseBranchActivity10.Activities.Add(this.callExternalMethodActivity3);
     ruleconditionreference4.ConditionName = "NewPinLength";
     this.ifElseBranchActivity10.Condition = ruleconditionreference4;
     this.ifElseBranchActivity10.Name = "ifElseBranchActivity10";
     //
     // ifElseBranchActivity9
     //
     this.ifElseBranchActivity9.Activities.Add(this.setStateActivity9);
     this.ifElseBranchActivity9.Activities.Add(this.callExternalMethodActivity5);
     ruleconditionreference5.ConditionName = "NewPinCompare";
     this.ifElseBranchActivity9.Condition = ruleconditionreference5;
     this.ifElseBranchActivity9.Name = "ifElseBranchActivity9";
     //
     // ifElseBranchActivity6
     //
     this.ifElseBranchActivity6.Activities.Add(this.ViewCurrentCardNumber);
     this.ifElseBranchActivity6.Name = "ifElseBranchActivity6";
     //
     // ifElseBranchActivity5
     //
     this.ifElseBranchActivity5.Activities.Add(this.SetSelectLanguageState);
     ruleconditionreference6.ConditionName = "IsFullCardNumber";
     this.ifElseBranchActivity5.Condition = ruleconditionreference6;
     this.ifElseBranchActivity5.Name = "ifElseBranchActivity5";
     //
     // ifElseBranchActivity8
     //
     this.ifElseBranchActivity8.Activities.Add(this.setStateActivity1);
     ruleconditionreference7.ConditionName = "IsAction2";
     this.ifElseBranchActivity8.Condition = ruleconditionreference7;
     this.ifElseBranchActivity8.Name = "ifElseBranchActivity8";
     //
     // ifElseBranchActivity7
     //
     this.ifElseBranchActivity7.Activities.Add(this.ExitFromBalance);
     ruleconditionreference8.ConditionName = "IsAction1";
     this.ifElseBranchActivity7.Condition = ruleconditionreference8;
     this.ifElseBranchActivity7.Name = "ifElseBranchActivity7";
     //
     // ifElseBranchActivity4
     //
     this.ifElseBranchActivity4.Activities.Add(this.ViewCurrentPin);
     this.ifElseBranchActivity4.Name = "ifElseBranchActivity4";
     //
     // ifElseBranchActivity3
     //
     this.ifElseBranchActivity3.Activities.Add(this.ifElseActivity1);
     ruleconditionreference9.ConditionName = "IsFullPin";
     this.ifElseBranchActivity3.Condition = ruleconditionreference9;
     this.ifElseBranchActivity3.Name = "ifElseBranchActivity3";
     //
     // cancellationHandlerActivity1
     //
     this.cancellationHandlerActivity1.Name = "cancellationHandlerActivity1";
     ruleconditionreference10.ConditionName = "IsAction5";
     //
     // compensatableSequenceActivity5
     //
     this.compensatableSequenceActivity5.Activities.Add(this.codeActivity1);
     this.compensatableSequenceActivity5.Activities.Add(this.setStateActivity8);
     this.compensatableSequenceActivity5.Name = "compensatableSequenceActivity5";
     this.compensatableSequenceActivity5.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, ruleconditionreference10);
     ruleconditionreference11.ConditionName = "IsAction4";
     //
     // compensatableSequenceActivity4
     //
     this.compensatableSequenceActivity4.Activities.Add(this.setStateActivity4);
     this.compensatableSequenceActivity4.Name = "compensatableSequenceActivity4";
     this.compensatableSequenceActivity4.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, ruleconditionreference11);
     ruleconditionreference12.ConditionName = "IsAction3";
     //
     // compensatableSequenceActivity3
     //
     this.compensatableSequenceActivity3.Activities.Add(this.codeActivity8);
     this.compensatableSequenceActivity3.Activities.Add(this.setStateActivity5);
     this.compensatableSequenceActivity3.Name = "compensatableSequenceActivity3";
     this.compensatableSequenceActivity3.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, ruleconditionreference12);
     ruleconditionreference13.ConditionName = "IsAction2";
     //
     // compensatableSequenceActivity2
     //
     this.compensatableSequenceActivity2.Activities.Add(this.codeActivity7);
     this.compensatableSequenceActivity2.Activities.Add(this.setStateActivity7);
     this.compensatableSequenceActivity2.Name = "compensatableSequenceActivity2";
     this.compensatableSequenceActivity2.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, ruleconditionreference13);
     ruleconditionreference14.ConditionName = "IsAction1";
     //
     // compensatableSequenceActivity1
     //
     this.compensatableSequenceActivity1.Activities.Add(this.codeActivity5);
     this.compensatableSequenceActivity1.Activities.Add(this.setStateActivity6);
     this.compensatableSequenceActivity1.Name = "compensatableSequenceActivity1";
     this.compensatableSequenceActivity1.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, ruleconditionreference14);
     //
     // ifElseActivity5
     //
     this.ifElseActivity5.Activities.Add(this.ifElseBranchActivity12);
     this.ifElseActivity5.Activities.Add(this.ifElseBranchActivity13);
     this.ifElseActivity5.Name = "ifElseActivity5";
     //
     // handleExternalEventActivity3
     //
     this.handleExternalEventActivity3.EventName = "GetNewNum";
     this.handleExternalEventActivity3.InterfaceType = typeof(Interfaces.IFormService);
     this.handleExternalEventActivity3.Name = "handleExternalEventActivity3";
     this.handleExternalEventActivity3.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.handleExternalEventActivity3_Invoked);
     //
     // callExternalMethodActivity6
     //
     this.callExternalMethodActivity6.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity6.MethodName = "NewPinCodeInvite";
     this.callExternalMethodActivity6.Name = "callExternalMethodActivity6";
     //
     // ifElseActivity4
     //
     this.ifElseActivity4.Activities.Add(this.ifElseBranchActivity9);
     this.ifElseActivity4.Activities.Add(this.ifElseBranchActivity10);
     this.ifElseActivity4.Activities.Add(this.ifElseBranchActivity11);
     this.ifElseActivity4.Name = "ifElseActivity4";
     //
     // handleExternalEventActivity2
     //
     this.handleExternalEventActivity2.EventName = "GetNewNum";
     this.handleExternalEventActivity2.InterfaceType = typeof(Interfaces.IFormService);
     this.handleExternalEventActivity2.Name = "handleExternalEventActivity2";
     this.handleExternalEventActivity2.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.handleExternalEventActivity2_Invoked);
     //
     // callExternalMethodActivity4
     //
     this.callExternalMethodActivity4.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity4.MethodName = "SendBackMessageLine";
     this.callExternalMethodActivity4.Name = "callExternalMethodActivity4";
     workflowparameterbinding9.ParameterName = "message";
     workflowparameterbinding9.Value = "\"VVedite Starij PIN\"";
     this.callExternalMethodActivity4.ParameterBindings.Add(workflowparameterbinding9);
     //
     // callExternalMethodActivity10
     //
     this.callExternalMethodActivity10.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity10.MethodName = "SendBackMessageLine";
     this.callExternalMethodActivity10.Name = "callExternalMethodActivity10";
     workflowparameterbinding10.ParameterName = "message";
     workflowparameterbinding10.Value = "\"я деписоти \"";
     this.callExternalMethodActivity10.ParameterBindings.Add(workflowparameterbinding10);
     //
     // callExternalMethodActivity8
     //
     this.callExternalMethodActivity8.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity8.MethodName = "SendBackMessageLine";
     this.callExternalMethodActivity8.Name = "callExternalMethodActivity8";
     workflowparameterbinding11.ParameterName = "message";
     workflowparameterbinding11.Value = "\"WidtDraw\"";
     this.callExternalMethodActivity8.ParameterBindings.Add(workflowparameterbinding11);
     //
     // ReadCardIfElse
     //
     this.ReadCardIfElse.Activities.Add(this.ifElseBranchActivity5);
     this.ReadCardIfElse.Activities.Add(this.ifElseBranchActivity6);
     this.ReadCardIfElse.Name = "ReadCardIfElse";
     //
     // ReadCardNumber
     //
     this.ReadCardNumber.EventName = "GetNewNum";
     this.ReadCardNumber.InterfaceType = typeof(Interfaces.IFormService);
     this.ReadCardNumber.Name = "ReadCardNumber";
     this.ReadCardNumber.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.GetInputCardNumber);
     //
     // DisplayWelcomeMessage
     //
     this.DisplayWelcomeMessage.InterfaceType = typeof(Interfaces.IFormService);
     this.DisplayWelcomeMessage.MethodName = "WelcomeMessage";
     this.DisplayWelcomeMessage.Name = "DisplayWelcomeMessage";
     //
     // InitCode
     //
     this.InitCode.Name = "InitCode";
     this.InitCode.ExecuteCode += new System.EventHandler(this.WorkFlowInit);
     //
     // ifElseActivity3
     //
     this.ifElseActivity3.Activities.Add(this.ifElseBranchActivity7);
     this.ifElseActivity3.Activities.Add(this.ifElseBranchActivity8);
     this.ifElseActivity3.Name = "ifElseActivity3";
     //
     // handleExternalEventActivity1
     //
     this.handleExternalEventActivity1.EventName = "GetNewAction";
     this.handleExternalEventActivity1.InterfaceType = typeof(Interfaces.IFormService);
     this.handleExternalEventActivity1.Name = "handleExternalEventActivity1";
     activitybind7.Name = "BankomatsWorkflow";
     activitybind7.Path = "buffer";
     workflowparameterbinding12.ParameterName = "e";
     workflowparameterbinding12.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
     this.handleExternalEventActivity1.ParameterBindings.Add(workflowparameterbinding12);
     //
     // callExternalMethodActivity9
     //
     this.callExternalMethodActivity9.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity9.MethodName = "ViewBalance";
     this.callExternalMethodActivity9.Name = "callExternalMethodActivity9";
     activitybind8.Name = "BankomatsWorkflow";
     activitybind8.Path = "CurrentAvailableBalance";
     workflowparameterbinding13.ParameterName = "accountAvailableBalance";
     workflowparameterbinding13.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
     activitybind9.Name = "BankomatsWorkflow";
     activitybind9.Path = "CurrentTotalBalance";
     workflowparameterbinding14.ParameterName = "accountTotalBalance";
     workflowparameterbinding14.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9)));
     this.callExternalMethodActivity9.ParameterBindings.Add(workflowparameterbinding13);
     this.callExternalMethodActivity9.ParameterBindings.Add(workflowparameterbinding14);
     //
     // ifElseActivity2
     //
     this.ifElseActivity2.Activities.Add(this.ifElseBranchActivity3);
     this.ifElseActivity2.Activities.Add(this.ifElseBranchActivity4);
     this.ifElseActivity2.Name = "ifElseActivity2";
     //
     // GetPinHandle
     //
     this.GetPinHandle.EventName = "GetNewNum";
     this.GetPinHandle.InterfaceType = typeof(Interfaces.IFormService);
     this.GetPinHandle.Name = "GetPinHandle";
     this.GetPinHandle.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.GetInputPin);
     //
     // callExternalMethodActivity1
     //
     this.callExternalMethodActivity1.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity1.MethodName = "DisplayAuthMenu";
     this.callExternalMethodActivity1.Name = "callExternalMethodActivity1";
     //
     // setStateActivity2
     //
     this.setStateActivity2.Name = "setStateActivity2";
     this.setStateActivity2.TargetStateName = "EnterCard";
     //
     // conditionedActivityGroup1
     //
     this.conditionedActivityGroup1.Activities.Add(this.compensatableSequenceActivity1);
     this.conditionedActivityGroup1.Activities.Add(this.compensatableSequenceActivity2);
     this.conditionedActivityGroup1.Activities.Add(this.compensatableSequenceActivity3);
     this.conditionedActivityGroup1.Activities.Add(this.compensatableSequenceActivity4);
     this.conditionedActivityGroup1.Activities.Add(this.compensatableSequenceActivity5);
     this.conditionedActivityGroup1.Activities.Add(this.cancellationHandlerActivity1);
     this.conditionedActivityGroup1.Name = "conditionedActivityGroup1";
     ruleconditionreference15.ConditionName = "IsValidMenuAction";
     this.conditionedActivityGroup1.UntilCondition = ruleconditionreference15;
     //
     // GetActionToDo
     //
     this.GetActionToDo.EventName = "GetNewAction";
     this.GetActionToDo.InterfaceType = typeof(Interfaces.IFormService);
     this.GetActionToDo.Name = "GetActionToDo";
     activitybind10.Name = "BankomatsWorkflow";
     activitybind10.Path = "buffer";
     workflowparameterbinding15.ParameterName = "e";
     workflowparameterbinding15.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10)));
     this.GetActionToDo.ParameterBindings.Add(workflowparameterbinding15);
     //
     // ViewMenuText
     //
     this.ViewMenuText.InterfaceType = typeof(Interfaces.IFormService);
     this.ViewMenuText.MethodName = "DisplayMenu";
     this.ViewMenuText.Name = "ViewMenuText";
     //
     // SetAuthState
     //
     this.SetAuthState.Name = "SetAuthState";
     this.SetAuthState.TargetStateName = "Authenticate";
     //
     // GetLanguageHandle
     //
     this.GetLanguageHandle.EventName = "GetNewAction";
     this.GetLanguageHandle.InterfaceType = typeof(Interfaces.IFormService);
     this.GetLanguageHandle.Name = "GetLanguageHandle";
     //
     // ViewLanguageMenu
     //
     this.ViewLanguageMenu.InterfaceType = typeof(Interfaces.IFormService);
     this.ViewLanguageMenu.MethodName = "DisplayLanguage";
     this.ViewLanguageMenu.Name = "ViewLanguageMenu";
     //
     // eventDrivenActivity2
     //
     this.eventDrivenActivity2.Activities.Add(this.handleExternalEventActivity3);
     this.eventDrivenActivity2.Activities.Add(this.ifElseActivity5);
     this.eventDrivenActivity2.Name = "eventDrivenActivity2";
     //
     // stateInitializationActivity3
     //
     this.stateInitializationActivity3.Activities.Add(this.callExternalMethodActivity6);
     this.stateInitializationActivity3.Name = "stateInitializationActivity3";
     //
     // eventDrivenActivity1
     //
     this.eventDrivenActivity1.Activities.Add(this.handleExternalEventActivity2);
     this.eventDrivenActivity1.Activities.Add(this.ifElseActivity4);
     this.eventDrivenActivity1.Name = "eventDrivenActivity1";
     //
     // stateInitializationActivity2
     //
     this.stateInitializationActivity2.Activities.Add(this.callExternalMethodActivity4);
     this.stateInitializationActivity2.Name = "stateInitializationActivity2";
     //
     // handleExternalEventActivity5
     //
     this.handleExternalEventActivity5.EventName = "GetNewNum";
     this.handleExternalEventActivity5.InterfaceType = typeof(Interfaces.IFormService);
     this.handleExternalEventActivity5.Name = "handleExternalEventActivity5";
     //
     // handleExternalEventActivity6
     //
     this.handleExternalEventActivity6.EventName = "GetNewAction";
     this.handleExternalEventActivity6.InterfaceType = typeof(Interfaces.IFormService);
     this.handleExternalEventActivity6.Name = "handleExternalEventActivity6";
     //
     // stateInitializationActivity7
     //
     this.stateInitializationActivity7.Activities.Add(this.callExternalMethodActivity10);
     this.stateInitializationActivity7.Name = "stateInitializationActivity7";
     //
     // stateInitializationActivity5
     //
     this.stateInitializationActivity5.Activities.Add(this.callExternalMethodActivity8);
     this.stateInitializationActivity5.Name = "stateInitializationActivity5";
     //
     // EnterCardEvent
     //
     this.EnterCardEvent.Activities.Add(this.ReadCardNumber);
     this.EnterCardEvent.Activities.Add(this.ReadCardIfElse);
     this.EnterCardEvent.Name = "EnterCardEvent";
     //
     // Init
     //
     this.Init.Activities.Add(this.InitCode);
     this.Init.Activities.Add(this.DisplayWelcomeMessage);
     this.Init.Name = "Init";
     //
     // MenuOrExit
     //
     this.MenuOrExit.Activities.Add(this.handleExternalEventActivity1);
     this.MenuOrExit.Activities.Add(this.ifElseActivity3);
     this.MenuOrExit.Name = "MenuOrExit";
     //
     // InitBalace
     //
     this.InitBalace.Activities.Add(this.callExternalMethodActivity9);
     this.InitBalace.Name = "InitBalace";
     //
     // GetPin
     //
     this.GetPin.Activities.Add(this.GetPinHandle);
     this.GetPin.Activities.Add(this.ifElseActivity2);
     this.GetPin.Name = "GetPin";
     //
     // InitAuth
     //
     this.InitAuth.Activities.Add(this.callExternalMethodActivity1);
     this.InitAuth.Name = "InitAuth";
     //
     // stateInitializationActivity1
     //
     this.stateInitializationActivity1.Activities.Add(this.setStateActivity2);
     this.stateInitializationActivity1.Name = "stateInitializationActivity1";
     //
     // SelectActionToDo
     //
     this.SelectActionToDo.Activities.Add(this.GetActionToDo);
     this.SelectActionToDo.Activities.Add(this.conditionedActivityGroup1);
     this.SelectActionToDo.Name = "SelectActionToDo";
     //
     // InitMenu
     //
     this.InitMenu.Activities.Add(this.ViewMenuText);
     this.InitMenu.Name = "InitMenu";
     //
     // GetLanguage
     //
     this.GetLanguage.Activities.Add(this.GetLanguageHandle);
     this.GetLanguage.Activities.Add(this.SetAuthState);
     this.GetLanguage.Name = "GetLanguage";
     //
     // InitLanguage
     //
     this.InitLanguage.Activities.Add(this.ViewLanguageMenu);
     this.InitLanguage.Name = "InitLanguage";
     //
     // EnterNewPin
     //
     this.EnterNewPin.Activities.Add(this.stateInitializationActivity3);
     this.EnterNewPin.Activities.Add(this.eventDrivenActivity2);
     this.EnterNewPin.Name = "EnterNewPin";
     //
     // EnterOldPin
     //
     this.EnterOldPin.Activities.Add(this.stateInitializationActivity2);
     this.EnterOldPin.Activities.Add(this.eventDrivenActivity1);
     this.EnterOldPin.Name = "EnterOldPin";
     //
     // NumHandler
     //
     this.NumHandler.Activities.Add(this.handleExternalEventActivity5);
     this.NumHandler.Name = "NumHandler";
     //
     // ActionHandler
     //
     this.ActionHandler.Activities.Add(this.handleExternalEventActivity6);
     this.ActionHandler.Name = "ActionHandler";
     //
     // Deposit
     //
     this.Deposit.Activities.Add(this.stateInitializationActivity7);
     this.Deposit.Name = "Deposit";
     //
     // Withdrawal
     //
     this.Withdrawal.Activities.Add(this.stateInitializationActivity5);
     this.Withdrawal.Name = "Withdrawal";
     //
     // EnterCard
     //
     this.EnterCard.Activities.Add(this.Init);
     this.EnterCard.Activities.Add(this.EnterCardEvent);
     this.EnterCard.Name = "EnterCard";
     //
     // ViewBalance
     //
     this.ViewBalance.Activities.Add(this.InitBalace);
     this.ViewBalance.Activities.Add(this.MenuOrExit);
     this.ViewBalance.Name = "ViewBalance";
     //
     // Authenticate
     //
     this.Authenticate.Activities.Add(this.InitAuth);
     this.Authenticate.Activities.Add(this.GetPin);
     this.Authenticate.Name = "Authenticate";
     //
     // Final
     //
     this.Final.Activities.Add(this.stateInitializationActivity1);
     this.Final.Name = "Final";
     //
     // Menu
     //
     this.Menu.Activities.Add(this.InitMenu);
     this.Menu.Activities.Add(this.SelectActionToDo);
     this.Menu.Name = "Menu";
     //
     // SelectLanguage
     //
     this.SelectLanguage.Activities.Add(this.InitLanguage);
     this.SelectLanguage.Activities.Add(this.GetLanguage);
     this.SelectLanguage.Name = "SelectLanguage";
     //
     // BankomatsWorkflow
     //
     this.Activities.Add(this.SelectLanguage);
     this.Activities.Add(this.Menu);
     this.Activities.Add(this.Final);
     this.Activities.Add(this.Authenticate);
     this.Activities.Add(this.ViewBalance);
     this.Activities.Add(this.EnterCard);
     this.Activities.Add(this.Withdrawal);
     this.Activities.Add(this.Deposit);
     this.Activities.Add(this.ActionHandler);
     this.Activities.Add(this.NumHandler);
     this.Activities.Add(this.EnterOldPin);
     this.Activities.Add(this.EnterNewPin);
     this.CompletedStateName = null;
     this.DynamicUpdateCondition = null;
     this.InitialStateName = "EnterCard";
     this.Name = "BankomatsWorkflow";
     this.CanModifyActivities = false;
 }
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition();
     this.NotAuthorizedC2 = new System.Workflow.Activities.CodeActivity();
     this.NotAuthorizedC1 = new System.Workflow.Activities.CodeActivity();
     this.NotAuthorized2 = new System.Workflow.ComponentModel.FaultHandlerActivity();
     this.NotAuthorized1 = new System.Workflow.ComponentModel.FaultHandlerActivity();
     this.ExpireAuthorization = new System.Workflow.Activities.CodeActivity();
     this.AutorizationTimer = new System.Workflow.Activities.DelayActivity();
     this.cancellationHandlerActivity3 = new System.Workflow.ComponentModel.CancellationHandlerActivity();
     this.AuthorizationFailed = new System.Workflow.ComponentModel.FaultHandlersActivity();
     this.Rejected = new System.Workflow.Activities.HandleExternalEventActivity();
     this.AutorizationFailed = new System.Workflow.ComponentModel.FaultHandlersActivity();
     this.cancellationHandlerActivity2 = new System.Workflow.ComponentModel.CancellationHandlerActivity();
     this.Authorized = new System.Workflow.Activities.HandleExternalEventActivity();
     this.AuthorizationExpired = new System.Workflow.Activities.EventDrivenActivity();
     this.AuthorizationRejected = new System.Workflow.Activities.EventDrivenActivity();
     this.AuthorizationAccepted = new System.Workflow.Activities.EventDrivenActivity();
     this.WaitForResponse = new System.Workflow.Activities.ListenActivity();
     this.Warrant = new System.Workflow.Activities.WhileActivity();
     this.NotifyRequest = new CodeFactory.Workflow.SendEmailActivity();
     this.AuthorizationRequested = new System.Workflow.Activities.SequenceActivity();
     //
     // NotAuthorizedC2
     //
     this.NotAuthorizedC2.Name = "NotAuthorizedC2";
     this.NotAuthorizedC2.ExecuteCode += new System.EventHandler(this.HandleAuthorizationException);
     //
     // NotAuthorizedC1
     //
     this.NotAuthorizedC1.Name = "NotAuthorizedC1";
     this.NotAuthorizedC1.ExecuteCode += new System.EventHandler(this.HandleAuthorizationException);
     //
     // NotAuthorized2
     //
     this.NotAuthorized2.Activities.Add(this.NotAuthorizedC2);
     this.NotAuthorized2.FaultType = typeof(System.Workflow.Activities.WorkflowAuthorizationException);
     this.NotAuthorized2.Name = "NotAuthorized2";
     //
     // NotAuthorized1
     //
     this.NotAuthorized1.Activities.Add(this.NotAuthorizedC1);
     this.NotAuthorized1.FaultType = typeof(System.Workflow.Activities.WorkflowAuthorizationException);
     this.NotAuthorized1.Name = "NotAuthorized1";
     //
     // ExpireAuthorization
     //
     this.ExpireAuthorization.Name = "ExpireAuthorization";
     this.ExpireAuthorization.ExecuteCode += new System.EventHandler(this.ExpireAuthorization_ExecuteCode);
     //
     // AutorizationTimer
     //
     this.AutorizationTimer.Name = "AutorizationTimer";
     this.AutorizationTimer.TimeoutDuration = System.TimeSpan.Parse("00:00:00");
     this.AutorizationTimer.InitializeTimeoutDuration += new System.EventHandler(this.AuthorizationTimer_Initialize);
     //
     // cancellationHandlerActivity3
     //
     this.cancellationHandlerActivity3.Name = "cancellationHandlerActivity3";
     //
     // AuthorizationFailed
     //
     this.AuthorizationFailed.Activities.Add(this.NotAuthorized2);
     this.AuthorizationFailed.Name = "AuthorizationFailed";
     activitybind1.Name = "AuthorizeEntries";
     activitybind1.Path = "Authorizers";
     //
     // Rejected
     //
     this.Rejected.EventName = "AuthorizationRejected";
     this.Rejected.InterfaceType = typeof(CodeFactory.Wiki.Workflow.IWikiServiceProvider);
     this.Rejected.Name = "Rejected";
     this.Rejected.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.Rejected_Invoked);
     this.Rejected.SetBinding(System.Workflow.Activities.HandleExternalEventActivity.RolesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     //
     // AutorizationFailed
     //
     this.AutorizationFailed.Activities.Add(this.NotAuthorized1);
     this.AutorizationFailed.Name = "AutorizationFailed";
     //
     // cancellationHandlerActivity2
     //
     this.cancellationHandlerActivity2.Name = "cancellationHandlerActivity2";
     activitybind2.Name = "AuthorizeEntries";
     activitybind2.Path = "Authorizers";
     //
     // Authorized
     //
     this.Authorized.EventName = "AuthorizationAccepted";
     this.Authorized.InterfaceType = typeof(CodeFactory.Wiki.Workflow.IWikiServiceProvider);
     this.Authorized.Name = "Authorized";
     workflowparameterbinding1.ParameterName = "e";
     this.Authorized.ParameterBindings.Add(workflowparameterbinding1);
     this.Authorized.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.Authorized_Invoked);
     this.Authorized.SetBinding(System.Workflow.Activities.HandleExternalEventActivity.RolesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     //
     // AuthorizationExpired
     //
     this.AuthorizationExpired.Activities.Add(this.AutorizationTimer);
     this.AuthorizationExpired.Activities.Add(this.ExpireAuthorization);
     this.AuthorizationExpired.Name = "AuthorizationExpired";
     //
     // AuthorizationRejected
     //
     this.AuthorizationRejected.Activities.Add(this.Rejected);
     this.AuthorizationRejected.Activities.Add(this.AuthorizationFailed);
     this.AuthorizationRejected.Activities.Add(this.cancellationHandlerActivity3);
     this.AuthorizationRejected.Name = "AuthorizationRejected";
     //
     // AuthorizationAccepted
     //
     this.AuthorizationAccepted.Activities.Add(this.Authorized);
     this.AuthorizationAccepted.Activities.Add(this.cancellationHandlerActivity2);
     this.AuthorizationAccepted.Activities.Add(this.AutorizationFailed);
     this.AuthorizationAccepted.Name = "AuthorizationAccepted";
     //
     // WaitForResponse
     //
     this.WaitForResponse.Activities.Add(this.AuthorizationAccepted);
     this.WaitForResponse.Activities.Add(this.AuthorizationRejected);
     this.WaitForResponse.Activities.Add(this.AuthorizationExpired);
     this.WaitForResponse.Name = "WaitForResponse";
     //
     // Warrant
     //
     this.Warrant.Activities.Add(this.WaitForResponse);
     codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.EvaluateAuthorization);
     this.Warrant.Condition = codecondition1;
     this.Warrant.Name = "Warrant";
     //
     // NotifyRequest
     //
     this.NotifyRequest.Bcc = null;
     this.NotifyRequest.Body = null;
     this.NotifyRequest.CC = null;
     this.NotifyRequest.Description = "Notifica al autorizador de la solicitud recibida.";
     this.NotifyRequest.From = "*****@*****.**";
     this.NotifyRequest.Name = "NotifyRequest";
     this.NotifyRequest.Port = 25;
     this.NotifyRequest.ReplyTo = null;
     this.NotifyRequest.SmtpHost = "localhost";
     this.NotifyRequest.Subject = null;
     this.NotifyRequest.To = "*****@*****.**";
     this.NotifyRequest.SendingEmail += new System.EventHandler(this.NotifyRequest_SendingEmail);
     //
     // AuthorizationRequested
     //
     this.AuthorizationRequested.Activities.Add(this.NotifyRequest);
     this.AuthorizationRequested.Activities.Add(this.Warrant);
     this.AuthorizationRequested.Name = "AuthorizationRequested";
     //
     // AuthorizeEntries
     //
     this.Activities.Add(this.AuthorizationRequested);
     this.Name = "AuthorizeEntries";
     this.Initialized += new System.EventHandler(this.InitializeProcessing);
     this.CanModifyActivities = false;
 }
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference1 = new System.Workflow.Activities.Rules.RuleConditionReference();
     this.CheckRequested = new System.Workflow.Activities.HandleExternalEventActivity();
     this.AddToBill = new System.Workflow.Activities.HandleExternalEventActivity();
     this.FoodIsRequested = new System.Workflow.Activities.HandleExternalEventActivity();
     this.CustomerRequestsCheck = new System.Workflow.Activities.EventDrivenActivity();
     this.AddFoodToBill = new System.Workflow.Activities.EventDrivenActivity();
     this.FoodOrderRequest = new System.Workflow.Activities.EventDrivenActivity();
     this.WaitForCustomerInput = new System.Workflow.Activities.ListenActivity();
     this.CustomerPaied = new System.Workflow.Activities.HandleExternalEventActivity();
     this.OrderLoop = new System.Workflow.Activities.WhileActivity();
     //
     // CheckRequested
     //
     this.CheckRequested.EventName = "RequestCheck";
     this.CheckRequested.InterfaceType = typeof(WorkflowLocalService.ICustomerLocalService);
     this.CheckRequested.Name = "CheckRequested";
     this.CheckRequested.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.CheckRequest);
     //
     // AddToBill
     //
     this.AddToBill.EventName = "AddFoodOrderToBill";
     this.AddToBill.InterfaceType = typeof(WorkflowLocalService.ICustomerLocalService);
     this.AddToBill.Name = "AddToBill";
     this.AddToBill.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.AddFoodOrderToBill);
     //
     // FoodIsRequested
     //
     this.FoodIsRequested.EventName = "PlaceFoodOrder";
     this.FoodIsRequested.InterfaceType = typeof(WorkflowLocalService.ICustomerLocalService);
     this.FoodIsRequested.Name = "FoodIsRequested";
     //
     // CustomerRequestsCheck
     //
     this.CustomerRequestsCheck.Activities.Add(this.CheckRequested);
     this.CustomerRequestsCheck.Name = "CustomerRequestsCheck";
     //
     // AddFoodToBill
     //
     this.AddFoodToBill.Activities.Add(this.AddToBill);
     this.AddFoodToBill.Name = "AddFoodToBill";
     //
     // FoodOrderRequest
     //
     this.FoodOrderRequest.Activities.Add(this.FoodIsRequested);
     this.FoodOrderRequest.Name = "FoodOrderRequest";
     //
     // WaitForCustomerInput
     //
     this.WaitForCustomerInput.Activities.Add(this.FoodOrderRequest);
     this.WaitForCustomerInput.Activities.Add(this.AddFoodToBill);
     this.WaitForCustomerInput.Activities.Add(this.CustomerRequestsCheck);
     this.WaitForCustomerInput.Name = "WaitForCustomerInput";
     //
     // CustomerPaied
     //
     this.CustomerPaied.EventName = "OrderPaied";
     this.CustomerPaied.InterfaceType = typeof(WorkflowLocalService.ICustomerLocalService);
     this.CustomerPaied.Name = "CustomerPaied";
     this.CustomerPaied.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.Paied);
     //
     // OrderLoop
     //
     this.OrderLoop.Activities.Add(this.WaitForCustomerInput);
     ruleconditionreference1.ConditionName = "Condition1";
     this.OrderLoop.Condition = ruleconditionreference1;
     this.OrderLoop.Name = "OrderLoop";
     //
     // CustomerWorkflow
     //
     this.Activities.Add(this.OrderLoop);
     this.Activities.Add(this.CustomerPaied);
     this.Name = "CustomerWorkflow";
     this.CanModifyActivities = false;
 }