internal override void Execute(ActivityExecutionContext context) { base.Execute(context); EventDrivenActivity eventDriven = (EventDrivenActivity)base.State.Activities[this.EventDrivenName]; StateActivity.ExecuteEventDriven(context, eventDriven); }
public override ValidationErrorCollection Validate(ValidationManager manager, object obj) { ValidationErrorCollection errors = base.Validate(manager, obj); EventDrivenActivity activity = obj as EventDrivenActivity; if (activity == null) { throw new ArgumentException(SR.GetString("Error_UnexpectedArgumentType", new object[] { typeof(EventDrivenActivity).FullName }), "obj"); } if ((!(activity.Parent is ListenActivity) && !(activity.Parent is EventHandlersActivity)) && !(activity.Parent is StateActivity)) { errors.Add(new ValidationError(SR.GetError_EventDrivenParentNotListen(), 0x510)); } string errorText = string.Empty; int errorNumber = -1; Activity activity2 = (activity.EnabledActivities.Count > 0) ? activity.EnabledActivities[0] : null; if (activity2 == null) { errorText = SR.GetString("Error_EventDrivenNoFirstActivity"); errorNumber = 0x511; } else if (!(activity2 is IEventActivity)) { errorText = SR.GetError_EventDrivenInvalidFirstActivity(); errorNumber = 0x512; } if (errorText.Length > 0) { errors.Add(new ValidationError(errorText, errorNumber)); } return(errors); }
internal override void Execute(ActivityExecutionContext context) { base.Execute(context); EventDrivenActivity eventDriven = (EventDrivenActivity)base.State.Activities[this.EventDrivenName]; base.SubscriptionManager.UnsubscribeEventDriven(context, eventDriven); }
protected sealed override void OnActivityChangeRemove(ActivityExecutionContext executionContext, Activity removedActivity) { if (executionContext == null) { throw new ArgumentNullException("executionContext"); } if (removedActivity == null) { throw new ArgumentNullException("removedActivity"); } ListenActivity activity = executionContext.Activity as ListenActivity; if (((activity.ExecutionStatus == ActivityExecutionStatus.Executing) && (activity.ActivityState != null)) && !activity.IsListenTrigerred) { EventDrivenActivity activity2 = removedActivity as EventDrivenActivity; for (int i = 0; i < activity.ActivityState.Count; i++) { ListenEventActivitySubscriber parentEventHandler = activity.ActivityState[i]; if (parentEventHandler.eventDrivenActivity.QualifiedName.Equals(activity2.QualifiedName)) { activity2.EventActivity.Unsubscribe(executionContext, parentEventHandler); activity.ActivityState.RemoveAt(i); return; } } } else if (this.IsListenTrigerred && (removedActivity.ExecutionStatus == ActivityExecutionStatus.Closed)) { this.activeBranchRemoved = true; } }
protected override sealed void OnActivityChangeRemove(ActivityExecutionContext executionContext, Activity removedActivity) { if (executionContext == null) { throw new ArgumentNullException("executionContext"); } if (removedActivity == null) { throw new ArgumentNullException("removedActivity"); } ListenActivity listen = executionContext.Activity as ListenActivity; if (listen.ExecutionStatus == ActivityExecutionStatus.Executing && listen.ActivityState != null && !listen.IsListenTrigerred) { EventDrivenActivity eda = removedActivity as EventDrivenActivity; for (int i = 0; i < listen.ActivityState.Count; ++i) { ListenEventActivitySubscriber listenEventSubscriber = listen.ActivityState[i]; if (listenEventSubscriber.eventDrivenActivity.QualifiedName.Equals(eda.QualifiedName)) { eda.EventActivity.Unsubscribe(executionContext, listenEventSubscriber); listen.ActivityState.RemoveAt(i); return; } } } else if (this.IsListenTrigerred && removedActivity.ExecutionStatus == ActivityExecutionStatus.Closed) { activeBranchRemoved = true; } }
internal void UnsubscribeEventDriven(ActivityExecutionContext context, EventDrivenActivity eventDriven) { Debug.Assert(IsEventDrivenSubscribed(eventDriven)); IEventActivity eventActivity = StateMachineHelpers.GetEventActivity(eventDriven); UnsubscribeEventActivity(context, eventActivity); }
void IActivityEventListener <QueueEventArgs> .OnEvent(object sender, QueueEventArgs e) { if (sender == null) { throw new ArgumentNullException("sender"); } if (e == null) { throw new ArgumentNullException("e"); } ActivityExecutionContext parentContext = sender as ActivityExecutionContext; if (parentContext == null) { throw new ArgumentException(SR.Error_SenderMustBeActivityExecutionContext, "sender"); } ListenActivity activityStatusChangeListener = parentContext.Activity as ListenActivity; if (((!activityStatusChangeListener.IsListenTrigerred && (activityStatusChangeListener.ExecutionStatus != ActivityExecutionStatus.Canceling)) && (activityStatusChangeListener.ExecutionStatus != ActivityExecutionStatus.Closed)) && activityStatusChangeListener.EnabledActivities.Contains(this.eventDrivenActivity)) { activityStatusChangeListener.IsListenTrigerred = true; for (int i = 0; i < activityStatusChangeListener.EnabledActivities.Count; i++) { EventDrivenActivity activity2 = activityStatusChangeListener.EnabledActivities[i] as EventDrivenActivity; ListenActivity.ListenEventActivitySubscriber parentEventHandler = activityStatusChangeListener.ActivityState[i]; activity2.EventActivity.Unsubscribe(parentContext, parentEventHandler); } this.eventDrivenActivity.RegisterForStatusChange(Activity.ClosedEvent, activityStatusChangeListener); parentContext.ExecuteActivity(this.eventDrivenActivity); } }
internal override void Execute(ActivityExecutionContext context) { base.Execute(context); StateActivity rootState = StateMachineHelpers.GetRootState(base.State); Queue <StateActivity> queue = new Queue <StateActivity>(); queue.Enqueue(rootState); while (queue.Count > 0) { foreach (Activity activity3 in queue.Dequeue().EnabledActivities) { EventDrivenActivity eventDriven = activity3 as EventDrivenActivity; if (eventDriven != null) { IComparable queueName = StateMachineHelpers.GetEventActivity(eventDriven).QueueName; if (queueName != null) { WorkflowQueue workflowQueue = StateMachineSubscriptionManager.GetWorkflowQueue(context, queueName); if (workflowQueue != null) { workflowQueue.Enabled = base.SubscriptionManager.Subscriptions.ContainsKey(queueName); } } } else { StateActivity item = activity3 as StateActivity; if (item != null) { queue.Enqueue(item); } } } } }
protected override void OnActivityChangeAdd(ActivityExecutionContext executionContext, Activity addedActivity) { if (executionContext == null) { throw new ArgumentNullException("executionContext"); } if (addedActivity == null) { throw new ArgumentNullException("addedActivity"); } if (addedActivity.Enabled && (executionContext.Activity.ExecutionStatus == ActivityExecutionStatus.Executing)) { EventDrivenActivity eventDriven = addedActivity as EventDrivenActivity; if (eventDriven != null) { StateMachineSubscriptionManager.ChangeEventDrivenQueueState(executionContext, eventDriven, false); StateMachineExecutionState state = StateMachineExecutionState.Get(StateMachineHelpers.GetRootState(executionContext.Activity as StateActivity)); if (StateMachineHelpers.GetCurrentState(executionContext) != null) { state.SubscriptionManager.ReevaluateSubscriptions(executionContext); state.LockQueue(); state.ProcessActions(executionContext); } } } }
public override ValidationError ValidateActivityChange(Activity activity, ActivityChangeAction action) { if (activity == null) { throw new ArgumentNullException("activity"); } if (action == null) { throw new ArgumentNullException("action"); } if (((activity.ExecutionStatus != ActivityExecutionStatus.Initialized) && (activity.ExecutionStatus != ActivityExecutionStatus.Executing)) && (activity.ExecutionStatus != ActivityExecutionStatus.Closed)) { return(new ValidationError(SR.GetString("Error_DynamicActivity2", new object[] { activity.QualifiedName, activity.ExecutionStatus, activity.GetType().FullName }), 0x50f)); } RemovedActivityAction action2 = action as RemovedActivityAction; if (action2 != null) { StateActivity originalRemovedActivity = action2.OriginalRemovedActivity as StateActivity; if (originalRemovedActivity != null) { return(new ValidationError(SR.GetError_CantRemoveState(originalRemovedActivity.QualifiedName), 0x61b)); } if (activity.ExecutionStatus == ActivityExecutionStatus.Executing) { EventDrivenActivity activity3 = action2.OriginalRemovedActivity as EventDrivenActivity; if (activity3 != null) { return(new ValidationError(SR.GetError_CantRemoveEventDrivenFromExecutingState(activity3.QualifiedName, activity.QualifiedName), 0x620)); } } } return(null); }
protected override void OnActivityChangeRemove(ActivityExecutionContext executionContext, Activity removedActivity) { if (executionContext == null) { throw new ArgumentNullException("executionContext"); } if (removedActivity == null) { throw new ArgumentNullException("removedActivity"); } EventDrivenActivity eda = removedActivity as EventDrivenActivity; // find out the status of the scope EventHandlersActivity activity = (EventHandlersActivity)executionContext.Activity as EventHandlersActivity; if (activity.ExecutionStatus == ActivityExecutionStatus.Executing && activity.ActivityState != null && !activity.IsScopeCompleted) { for (int i = 0; i < activity.ActivityState.Count; ++i) { EventHandlerEventActivitySubscriber eventSubscriber = activity.ActivityState[i]; if (eventSubscriber.eventDrivenActivity.QualifiedName.Equals(removedActivity.QualifiedName)) { eda.EventActivity.Unsubscribe(executionContext, eventSubscriber); activity.ActivityState.RemoveAt(i); return; } } } }
private bool IsEventDrivenSubscribed(EventDrivenActivity eventDriven) { IEventActivity eventActivity = StateMachineHelpers.GetEventActivity(eventDriven); EventActivitySubscription subscription = GetSubscription(eventActivity); return(subscription != null); }
protected override void OnActivityChangeRemove(ActivityExecutionContext executionContext, Activity removedActivity) { if (executionContext == null) { throw new ArgumentNullException("executionContext"); } if (removedActivity == null) { throw new ArgumentNullException("removedActivity"); } EventDrivenActivity activity = removedActivity as EventDrivenActivity; EventHandlersActivity activity2 = (EventHandlersActivity)executionContext.Activity; if (((activity2.ExecutionStatus == ActivityExecutionStatus.Executing) && (activity2.ActivityState != null)) && !activity2.IsScopeCompleted) { for (int i = 0; i < activity2.ActivityState.Count; i++) { EventHandlerEventActivitySubscriber parentEventHandler = activity2.ActivityState[i]; if (parentEventHandler.eventDrivenActivity.QualifiedName.Equals(removedActivity.QualifiedName)) { activity.EventActivity.Unsubscribe(executionContext, parentEventHandler); activity2.ActivityState.RemoveAt(i); return; } } } }
private static bool ValidateMultipleIEventActivityInCompositeActivity(EventDrivenActivity eventDriven, IEventActivity firstEventActivity, CompositeActivity parent, ValidationErrorCollection validationErrors) { foreach (Activity activity in parent.Activities) { // Skip disabled activities or the first IEventActivity // Note that we don't use EnabledActivities because we want to // enforce this rule inside Cancellation and Exception Handlers. if (!activity.Enabled || activity == firstEventActivity) { continue; } if (activity is IEventActivity) { validationErrors.Add(new ValidationError( SR.GetString(SR.Error_EventDrivenMultipleEventActivity, eventDriven.Name, typeof(IEventActivity).FullName, typeof(EventDrivenActivity).Name), ErrorNumbers.Error_EventDrivenMultipleEventActivity)); return(false); } else { CompositeActivity compositeActivity = activity as CompositeActivity; if (compositeActivity != null) { bool result = ValidateMultipleIEventActivityInCompositeActivity(eventDriven, firstEventActivity, compositeActivity, validationErrors); if (!result) { return(false); } } } } return(true); }
internal static void ExecuteEventDriven(ActivityExecutionContext context, EventDrivenActivity eventDriven) { StateMachineExecutionState executionState = GetExecutionState(context); Debug.Assert(!executionState.HasEnqueuedActions); ExecuteChild(context, eventDriven); }
internal void SubscribeEventDriven(ActivityExecutionContext context, EventDrivenActivity eventDriven) { IEventActivity eventActivity = StateMachineHelpers.GetEventActivity(eventDriven); Activity activity1 = (Activity)eventActivity; GetQueueName(eventActivity); this.SubscribeEventActivity(context, eventActivity); }
internal override void Execute(ActivityExecutionContext context) { base.Execute(context); EventDrivenActivity eventDriven = (EventDrivenActivity)this.State.Activities[this.EventDrivenName]; Debug.Assert(eventDriven.Enabled); StateActivity.ExecuteEventDriven(context, eventDriven); }
protected override ActivityExecutionStatus Cancel(ActivityExecutionContext executionContext) { if (executionContext == null) { throw new ArgumentNullException("executionContext"); } if (this.ActivityState == null) { return(ActivityExecutionStatus.Closed); } bool scopeCompleted = this.IsScopeCompleted; bool canCloseNow = true; for (int i = 0; i < this.EnabledActivities.Count; ++i) { EventDrivenActivity childActivity = this.EnabledActivities[i] as EventDrivenActivity; EventHandlerEventActivitySubscriber eventActivitySubscriber = this.ActivityState[i] as EventHandlerEventActivitySubscriber; eventActivitySubscriber.PendingExecutionCount = 0; ActivityExecutionContextManager contextManager = executionContext.ExecutionContextManager; ActivityExecutionContext childContext = contextManager.GetExecutionContext(childActivity); if (childContext != null) { switch (childContext.Activity.ExecutionStatus) { case ActivityExecutionStatus.Canceling: case ActivityExecutionStatus.Faulting: canCloseNow = false; break; case ActivityExecutionStatus.Executing: childContext.CancelActivity(childContext.Activity); canCloseNow = false; break; } } if (!scopeCompleted) //UnSubscribe from event. { childActivity.EventActivity.Unsubscribe(executionContext, eventActivitySubscriber); } } if (canCloseNow) { this.ActivityState = null; return(ActivityExecutionStatus.Closed); } else { return(this.ExecutionStatus); } }
internal void SubscribeEventDriven(ActivityExecutionContext context, EventDrivenActivity eventDriven) { IEventActivity eventActivity = StateMachineHelpers.GetEventActivity(eventDriven); Activity activity = (Activity)eventActivity; IComparable queueName = GetQueueName(eventActivity); Debug.Assert(!this.Subscriptions.ContainsKey(queueName)); SubscribeEventActivity(context, eventActivity); }
static internal IEventActivity GetEventActivity(EventDrivenActivity eventDriven) { CompositeActivity sequenceActivity = eventDriven as CompositeActivity; Debug.Assert(eventDriven.EnabledActivities.Count > 0); IEventActivity eventActivity = sequenceActivity.EnabledActivities[0] as IEventActivity; Debug.Assert(eventActivity != null); return(eventActivity); }
private static bool ValidateMultipleIEventActivity(EventDrivenActivity eventDriven, ValidationErrorCollection validationErrors) { IEventActivity firstEventActivity = null; if (eventDriven.EnabledActivities.Count > 0) { firstEventActivity = eventDriven.EnabledActivities[0] as IEventActivity; } return(ValidateMultipleIEventActivityInCompositeActivity(eventDriven, firstEventActivity, eventDriven, validationErrors)); }
private static void ChangeStateWorkflowQueuesState(ActivityExecutionContext context, StateActivity state, bool enabled) { foreach (Activity activity in state.EnabledActivities) { EventDrivenActivity eventDriven = activity as EventDrivenActivity; if (eventDriven != null) { ChangeEventDrivenQueueState(context, eventDriven, enabled); } } }
protected override ActivityExecutionStatus Cancel(ActivityExecutionContext executionContext) { if (executionContext == null) { throw new ArgumentNullException("executionContext"); } if (this.ActivityState == null) { return(ActivityExecutionStatus.Closed); } try { if (this.IsListenTrigerred) { //We need to cancel the active running branch for (int i = 0; i < this.EnabledActivities.Count; ++i) { EventDrivenActivity eventDriven = this.EnabledActivities[i] as EventDrivenActivity; if (eventDriven.ExecutionStatus == ActivityExecutionStatus.Executing) { executionContext.CancelActivity(eventDriven); return(ActivityExecutionStatus.Canceling); } //If the branch is faulting let it close. else if (eventDriven.ExecutionStatus == ActivityExecutionStatus.Faulting) { return(ActivityExecutionStatus.Canceling); } } } else { //Everything is passive. Lets unsubscribe all and close. for (int i = 0; i < this.ActivityState.Count; ++i) { EventDrivenActivity eventDrivenChild = this.EnabledActivities[i] as EventDrivenActivity; ListenEventActivitySubscriber eventActivitySubscriber = this.ActivityState[i]; eventDrivenChild.EventActivity.Unsubscribe(executionContext, eventActivitySubscriber); } } } finally { // We null out ActivityState in the finally block to ensure that if // eventDrivenChild.EventActivity.Unsubscribe above throws then the // Cancel method does not get called repeatedly. this.ActivityState = null; } return(ActivityExecutionStatus.Closed); }
internal static void ChangeEventDrivenQueueState(ActivityExecutionContext context, EventDrivenActivity eventDriven, bool enabled) { IComparable queueName = GetQueueName(StateMachineHelpers.GetEventActivity(eventDriven)); if (queueName != null) { WorkflowQueue workflowQueue = GetWorkflowQueue(context, queueName); if (workflowQueue != null) { workflowQueue.Enabled = enabled; } } }
internal static EventDrivenActivity GetParentEventDriven(IEventActivity eventActivity) { for (Activity activity = ((Activity)eventActivity).Parent; activity != null; activity = activity.Parent) { EventDrivenActivity activity2 = activity as EventDrivenActivity; if (activity2 != null) { return(activity2); } } return(null); }
internal void Subscribe(ActivityExecutionContext context, StateActivity state, IEventActivity eventActivity) { eventActivity.Subscribe(context, this); Activity activity = (Activity)eventActivity; this._queueName = eventActivity.QueueName; this._eventActivityName = activity.QualifiedName; this._stateName = state.QualifiedName; base.SubscriptionId = Guid.NewGuid(); EventDrivenActivity parentEventDriven = StateMachineHelpers.GetParentEventDriven(eventActivity); this._eventDrivenName = parentEventDriven.QualifiedName; }
internal void UnsubscribeState(ActivityExecutionContext context) { StateActivity activity = (StateActivity)context.Activity; foreach (Activity activity2 in activity.EnabledActivities) { EventDrivenActivity eventDriven = activity2 as EventDrivenActivity; if ((eventDriven != null) && this.IsEventDrivenSubscribed(eventDriven)) { this.UnsubscribeEventDriven(context, eventDriven); } } }
internal void ReevaluateSubscriptions(ActivityExecutionContext context) { Dictionary <IComparable, StateMachineSubscription> subscriptionsShallowCopy = this.GetSubscriptionsShallowCopy(); List <IComparable> list = new List <IComparable>(); for (StateActivity activity = StateMachineHelpers.GetCurrentState(context); activity != null; activity = activity.Parent as StateActivity) { foreach (Activity activity2 in activity.EnabledActivities) { EventDrivenActivity eventDriven = activity2 as EventDrivenActivity; if (eventDriven != null) { IComparable queueName = StateMachineHelpers.GetEventActivity(eventDriven).QueueName; if (queueName != null) { StateMachineSubscription subscription; subscriptionsShallowCopy.TryGetValue(queueName, out subscription); EventActivitySubscription subscription2 = subscription as EventActivitySubscription; if (subscription2 != null) { if (subscription2.EventDrivenName.Equals(eventDriven.QualifiedName)) { list.Add(queueName); continue; } if (subscription2.StateName.Equals(activity.QualifiedName)) { throw new InvalidOperationException(SR.GetStateAlreadySubscribesToThisEvent(activity.QualifiedName, queueName)); } if (this.IsParentState(activity, subscription2.StateName)) { UnsubscribeAction action = new UnsubscribeAction(subscription2.StateName, subscription2.EventDrivenName); this.ExecutionState.EnqueueAction(action); subscriptionsShallowCopy.Remove(queueName); } } if (!list.Contains(queueName)) { SubscribeAction action2 = new SubscribeAction(activity.QualifiedName, eventDriven.QualifiedName); this.ExecutionState.EnqueueAction(action2); list.Add(queueName); } } } } } DisableQueuesAction action3 = new DisableQueuesAction(StateMachineHelpers.GetCurrentState(context).QualifiedName); this.ExecutionState.EnqueueAction(action3); }
private bool AllHandlersAreQuiet(EventHandlersActivity handlers, ActivityExecutionContext context) { ActivityExecutionContextManager executionContextManager = context.ExecutionContextManager; for (int i = 0; i < handlers.EnabledActivities.Count; i++) { EventDrivenActivity activity = handlers.EnabledActivities[i] as EventDrivenActivity; if ((executionContextManager.GetExecutionContext(activity) != null) || ((handlers.ActivityState != null) && (handlers.ActivityState[i].PendingExecutionCount > 0))) { return(false); } } return(true); }
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; }
private bool AllHandlersAreQuiet(EventHandlersActivity handlers, ActivityExecutionContext context) { ActivityExecutionContextManager contextManager = context.ExecutionContextManager; for (int i = 0; i < handlers.EnabledActivities.Count; ++i) { EventDrivenActivity eventDriven = handlers.EnabledActivities[i] as EventDrivenActivity; if (contextManager.GetExecutionContext(eventDriven) != null || (handlers.ActivityState != null && handlers.ActivityState[i].PendingExecutionCount > 0)) { return(false); } } return(true); }
private void OnUnsubscribeAndClose(object sender, EventArgs args) { if (sender == null) { throw new ArgumentNullException("sender"); } if (args == null) { throw new ArgumentNullException("args"); } ActivityExecutionContext context = (ActivityExecutionContext)sender; if (context == null) { throw new ArgumentException("sender"); } EventHandlersActivity handlers = context.Activity as EventHandlersActivity; if (context.Activity.ExecutionStatus != ActivityExecutionStatus.Executing) { return; } Debug.Assert(!handlers.IsScopeCompleted, "Only notified of scope body completion once"); handlers.IsScopeCompleted = true; ActivityExecutionContextManager contextManager = context.ExecutionContextManager; bool readyToClose = true; for (int i = 0; i < handlers.EnabledActivities.Count; ++i) { EventDrivenActivity evtDriven = handlers.EnabledActivities[i] as EventDrivenActivity; EventHandlerEventActivitySubscriber eventSubscriber = handlers.ActivityState[i]; evtDriven.EventActivity.Unsubscribe(context, eventSubscriber); if (contextManager.GetExecutionContext(evtDriven) != null || handlers.ActivityState[i].PendingExecutionCount != 0) { readyToClose = false; } } if (readyToClose) { handlers.ActivityState = null; context.CloseActivity(); } }
private void InitializeComponent() { this.CanModifyActivities = true; System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition(); this.setStateActivity5 = new System.Workflow.Activities.SetStateActivity(); this.viewCodeActivity_ShowMessage = new System.Workflow.Activities.CodeActivity(); this.viewDocumentFormActivity = new Composite.C1Console.Workflow.Activities.DocumentFormActivity(); this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity1 = new System.Workflow.Activities.IfElseBranchActivity(); this.setStateActivity4 = new System.Workflow.Activities.SetStateActivity(); this.installAddOnCodeActivity_Execute = new System.Workflow.Activities.CodeActivity(); this.setStateActivity3 = new System.Workflow.Activities.SetStateActivity(); this.customEvent01HandleExternalEventActivity1 = new Composite.C1Console.Workflow.Activities.CustomEvent01HandleExternalEventActivity(); this.ifElseActivity_AddOnDescriptionExists = new System.Workflow.Activities.IfElseActivity(); this.viewStateCodeActivity_Initialize = new System.Workflow.Activities.CodeActivity(); this.setStateActivity2 = new System.Workflow.Activities.SetStateActivity(); this.installAddOnStateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.viewSateEventDrivenActivity_Install = new System.Workflow.Activities.EventDrivenActivity(); this.viewStateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.initializeStateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.setStateActivity1 = new System.Workflow.Activities.SetStateActivity(); this.cancelHandleExternalEventActivity1 = new Composite.C1Console.Workflow.Activities.CancelHandleExternalEventActivity(); this.installAddOnStateActivity = new System.Workflow.Activities.StateActivity(); this.viewStateActivity = new System.Workflow.Activities.StateActivity(); this.finalStateActivity = new System.Workflow.Activities.StateActivity(); this.initializeStateActivity = new System.Workflow.Activities.StateActivity(); this.eventDrivenActivity_GlobalCancel = new System.Workflow.Activities.EventDrivenActivity(); // // setStateActivity5 // this.setStateActivity5.Name = "setStateActivity5"; this.setStateActivity5.TargetStateName = "finalStateActivity"; // // viewCodeActivity_ShowMessage // this.viewCodeActivity_ShowMessage.Name = "viewCodeActivity_ShowMessage"; this.viewCodeActivity_ShowMessage.ExecuteCode += new System.EventHandler(this.viewCodeActivity_ShowMessage_ExecuteCode); // // viewDocumentFormActivity // this.viewDocumentFormActivity.ContainerLabel = null; this.viewDocumentFormActivity.CustomToolbarDefinitionFileName = null; this.viewDocumentFormActivity.FormDefinitionFileName = "\\Administrative\\PackageElementProviderViewAvailablePackageInformation.xml"; this.viewDocumentFormActivity.Name = "viewDocumentFormActivity"; // // ifElseBranchActivity2 // this.ifElseBranchActivity2.Activities.Add(this.viewCodeActivity_ShowMessage); this.ifElseBranchActivity2.Activities.Add(this.setStateActivity5); this.ifElseBranchActivity2.Name = "ifElseBranchActivity2"; // // ifElseBranchActivity1 // this.ifElseBranchActivity1.Activities.Add(this.viewDocumentFormActivity); codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.AddOnDescriptionExists); this.ifElseBranchActivity1.Condition = codecondition1; this.ifElseBranchActivity1.Name = "ifElseBranchActivity1"; // // setStateActivity4 // this.setStateActivity4.Name = "setStateActivity4"; this.setStateActivity4.TargetStateName = "viewStateActivity"; // // installAddOnCodeActivity_Execute // this.installAddOnCodeActivity_Execute.Name = "installAddOnCodeActivity_Execute"; this.installAddOnCodeActivity_Execute.ExecuteCode += new System.EventHandler(this.installAddOnCodeActivity_Execute_ExecuteCode); // // setStateActivity3 // this.setStateActivity3.Name = "setStateActivity3"; this.setStateActivity3.TargetStateName = "installAddOnStateActivity"; // // customEvent01HandleExternalEventActivity1 // this.customEvent01HandleExternalEventActivity1.EventName = "CustomEvent01"; this.customEvent01HandleExternalEventActivity1.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.customEvent01HandleExternalEventActivity1.Name = "customEvent01HandleExternalEventActivity1"; // // ifElseActivity_AddOnDescriptionExists // this.ifElseActivity_AddOnDescriptionExists.Activities.Add(this.ifElseBranchActivity1); this.ifElseActivity_AddOnDescriptionExists.Activities.Add(this.ifElseBranchActivity2); this.ifElseActivity_AddOnDescriptionExists.Name = "ifElseActivity_AddOnDescriptionExists"; // // viewStateCodeActivity_Initialize // this.viewStateCodeActivity_Initialize.Name = "viewStateCodeActivity_Initialize"; this.viewStateCodeActivity_Initialize.ExecuteCode += new System.EventHandler(this.viewStateCodeActivity_Initialize_ExecuteCode); // // setStateActivity2 // this.setStateActivity2.Name = "setStateActivity2"; this.setStateActivity2.TargetStateName = "viewStateActivity"; // // installAddOnStateInitializationActivity // this.installAddOnStateInitializationActivity.Activities.Add(this.installAddOnCodeActivity_Execute); this.installAddOnStateInitializationActivity.Activities.Add(this.setStateActivity4); this.installAddOnStateInitializationActivity.Name = "installAddOnStateInitializationActivity"; // // viewSateEventDrivenActivity_Install // this.viewSateEventDrivenActivity_Install.Activities.Add(this.customEvent01HandleExternalEventActivity1); this.viewSateEventDrivenActivity_Install.Activities.Add(this.setStateActivity3); this.viewSateEventDrivenActivity_Install.Name = "viewSateEventDrivenActivity_Install"; // // viewStateInitializationActivity // this.viewStateInitializationActivity.Activities.Add(this.viewStateCodeActivity_Initialize); this.viewStateInitializationActivity.Activities.Add(this.ifElseActivity_AddOnDescriptionExists); this.viewStateInitializationActivity.Name = "viewStateInitializationActivity"; // // initializeStateInitializationActivity // this.initializeStateInitializationActivity.Activities.Add(this.setStateActivity2); this.initializeStateInitializationActivity.Name = "initializeStateInitializationActivity"; // // setStateActivity1 // this.setStateActivity1.Name = "setStateActivity1"; this.setStateActivity1.TargetStateName = "finalStateActivity"; // // cancelHandleExternalEventActivity1 // this.cancelHandleExternalEventActivity1.EventName = "Cancel"; this.cancelHandleExternalEventActivity1.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.cancelHandleExternalEventActivity1.Name = "cancelHandleExternalEventActivity1"; // // installAddOnStateActivity // this.installAddOnStateActivity.Activities.Add(this.installAddOnStateInitializationActivity); this.installAddOnStateActivity.Name = "installAddOnStateActivity"; // // viewStateActivity // this.viewStateActivity.Activities.Add(this.viewStateInitializationActivity); this.viewStateActivity.Activities.Add(this.viewSateEventDrivenActivity_Install); this.viewStateActivity.Name = "viewStateActivity"; // // finalStateActivity // this.finalStateActivity.Name = "finalStateActivity"; // // initializeStateActivity // this.initializeStateActivity.Activities.Add(this.initializeStateInitializationActivity); this.initializeStateActivity.Name = "initializeStateActivity"; // // eventDrivenActivity_GlobalCancel // this.eventDrivenActivity_GlobalCancel.Activities.Add(this.cancelHandleExternalEventActivity1); this.eventDrivenActivity_GlobalCancel.Activities.Add(this.setStateActivity1); this.eventDrivenActivity_GlobalCancel.Name = "eventDrivenActivity_GlobalCancel"; // // ViewAvailableAddOnInfoWorkflowWorkflow // this.Activities.Add(this.eventDrivenActivity_GlobalCancel); this.Activities.Add(this.initializeStateActivity); this.Activities.Add(this.finalStateActivity); this.Activities.Add(this.viewStateActivity); this.Activities.Add(this.installAddOnStateActivity); this.CompletedStateName = "finalStateActivity"; this.DynamicUpdateCondition = null; this.InitialStateName = "initializeStateActivity"; this.Name = "ViewAvailableAddOnInfoWorkflowWorkflow"; this.CanModifyActivities = false; }
private void InitializeComponent() { this.CanModifyActivities = true; System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition(); System.Workflow.Activities.CodeCondition codecondition2 = new System.Workflow.Activities.CodeCondition(); System.Workflow.Activities.CodeCondition codecondition3 = new System.Workflow.Activities.CodeCondition(); System.Workflow.Activities.CodeCondition codecondition4 = new System.Workflow.Activities.CodeCondition(); System.Workflow.Activities.CodeCondition codecondition5 = new System.Workflow.Activities.CodeCondition(); System.Workflow.Activities.CodeCondition codecondition6 = new System.Workflow.Activities.CodeCondition(); this.setStateActivity3 = new System.Workflow.Activities.SetStateActivity(); this.setStateActivity2 = new System.Workflow.Activities.SetStateActivity(); this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity1 = new System.Workflow.Activities.IfElseBranchActivity(); this.setStateActivity10 = new System.Workflow.Activities.SetStateActivity(); this.setStateActivity9 = new System.Workflow.Activities.SetStateActivity(); this.setStateActivity7 = new System.Workflow.Activities.SetStateActivity(); this.setStateActivity6 = new System.Workflow.Activities.SetStateActivity(); this.setStateActivity19 = new System.Workflow.Activities.SetStateActivity(); this.showFieldMessageActivity1 = new Composite.C1Console.Workflow.Activities.ShowFieldMessageActivity(); this.setStateActivity5 = new System.Workflow.Activities.SetStateActivity(); this.setStateActivity17 = new System.Workflow.Activities.SetStateActivity(); this.step2WizardFormActivity = new Composite.C1Console.Workflow.Activities.WizardFormActivity(); this.setStateActivity18 = new System.Workflow.Activities.SetStateActivity(); this.initializeIfElseActivity_IsAddOnFree = new System.Workflow.Activities.IfElseActivity(); this.ifElseBranchActivity6 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity5 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity4 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity3 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity12 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity11 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity8 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity7 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity10 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity9 = new System.Workflow.Activities.IfElseBranchActivity(); this.setStateActivity12 = new System.Workflow.Activities.SetStateActivity(); this.cleanupCodeActivity_Cleanup = new System.Workflow.Activities.CodeActivity(); this.setStateActivity11 = new System.Workflow.Activities.SetStateActivity(); this.step5CodeActivity_RefreshTree = new System.Workflow.Activities.CodeActivity(); this.closeCurrentViewActivity1 = new Composite.C1Console.Workflow.Activities.CloseCurrentViewActivity(); this.finishHandleExternalEventActivity2 = new Composite.C1Console.Workflow.Activities.FinishHandleExternalEventActivity(); this.step5WizardFormActivity = new Composite.C1Console.Workflow.Activities.WizardFormActivity(); this.setStateActivity16 = new System.Workflow.Activities.SetStateActivity(); this.cancelHandleExternalEventActivity5 = new Composite.C1Console.Workflow.Activities.CancelHandleExternalEventActivity(); this.step4IfElseActivity_DidValidate = new System.Workflow.Activities.IfElseActivity(); this.step4CodeActivity_Install = new System.Workflow.Activities.CodeActivity(); this.nextHandleExternalEventActivity4 = new Composite.C1Console.Workflow.Activities.NextHandleExternalEventActivity(); this.step4WizardFormActivity = new Composite.C1Console.Workflow.Activities.WizardFormActivity(); this.setStateActivity8 = new System.Workflow.Activities.SetStateActivity(); this.finishHandleExternalEventActivity1 = new Composite.C1Console.Workflow.Activities.FinishHandleExternalEventActivity(); this.showErrorWizardFormActivity = new Composite.C1Console.Workflow.Activities.WizardFormActivity(); this.showErrorCodeActivity_Initialize = new System.Workflow.Activities.CodeActivity(); this.setStateActivity15 = new System.Workflow.Activities.SetStateActivity(); this.cancelHandleExternalEventActivity4 = new Composite.C1Console.Workflow.Activities.CancelHandleExternalEventActivity(); this.step3IfElseActivity_DidValidate = new System.Workflow.Activities.IfElseActivity(); this.step3CodeActivity_DownloadAndValidate = new System.Workflow.Activities.CodeActivity(); this.nextHandleExternalEventActivity3 = new Composite.C1Console.Workflow.Activities.NextHandleExternalEventActivity(); this.step3WizardFormActivity = new Composite.C1Console.Workflow.Activities.WizardFormActivity(); this.setStateActivity14 = new System.Workflow.Activities.SetStateActivity(); this.cancelHandleExternalEventActivity3 = new Composite.C1Console.Workflow.Activities.CancelHandleExternalEventActivity(); this.ifElseActivity2 = new System.Workflow.Activities.IfElseActivity(); this.nextHandleExternalEventActivity2 = new Composite.C1Console.Workflow.Activities.NextHandleExternalEventActivity(); this.ifElseActivity1 = new System.Workflow.Activities.IfElseActivity(); this.step2StateStepcodeActivity_Initialize = new System.Workflow.Activities.CodeActivity(); this.setStateActivity13 = new System.Workflow.Activities.SetStateActivity(); this.cancelHandleExternalEventActivity2 = new Composite.C1Console.Workflow.Activities.CancelHandleExternalEventActivity(); this.setStateActivity4 = new System.Workflow.Activities.SetStateActivity(); this.nextHandleExternalEventActivity1 = new Composite.C1Console.Workflow.Activities.NextHandleExternalEventActivity(); this.step1WizardFormActivity = new Composite.C1Console.Workflow.Activities.WizardFormActivity(); this.initializeIfElseActivity_DidValidate = new System.Workflow.Activities.IfElseActivity(); this.initializeStateCodeActivity_Initialize = new System.Workflow.Activities.CodeActivity(); this.cleanupStateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.step5EventDrivenActivity_Finish = new System.Workflow.Activities.EventDrivenActivity(); this.step5StateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.step4EventDrivenActivity_Cancel = new System.Workflow.Activities.EventDrivenActivity(); this.step4EventDrivenActivity_Next = new System.Workflow.Activities.EventDrivenActivity(); this.step4StateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.showErrorEventDrivenActivity_Finish = new System.Workflow.Activities.EventDrivenActivity(); this.showErrorStateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.step3EventDrivenActivity_Cancel = new System.Workflow.Activities.EventDrivenActivity(); this.step3EventDrivenActivity_Next = new System.Workflow.Activities.EventDrivenActivity(); this.step3StateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.step2EventDrivenActivity_Cancel = new System.Workflow.Activities.EventDrivenActivity(); this.step2EventDrivenActivity_Next = new System.Workflow.Activities.EventDrivenActivity(); this.step2StateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.step1EventDrivenActivity_Cancel = new System.Workflow.Activities.EventDrivenActivity(); this.step1EventDrivenActivity_Next = new System.Workflow.Activities.EventDrivenActivity(); this.step1StateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.initializeStateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.setStateActivity1 = new System.Workflow.Activities.SetStateActivity(); this.cancelHandleExternalEventActivity1 = new Composite.C1Console.Workflow.Activities.CancelHandleExternalEventActivity(); this.cleanupStateActivity = new System.Workflow.Activities.StateActivity(); this.step5StateActivity = new System.Workflow.Activities.StateActivity(); this.step4StateActivity = new System.Workflow.Activities.StateActivity(); this.showErrorStateActivity = new System.Workflow.Activities.StateActivity(); this.step3StateActivity = new System.Workflow.Activities.StateActivity(); this.step2StateActivity = new System.Workflow.Activities.StateActivity(); this.step1StateActivity = new System.Workflow.Activities.StateActivity(); this.finalStateActivity = new System.Workflow.Activities.StateActivity(); this.initializeStateActivity = new System.Workflow.Activities.StateActivity(); this.eventDrivenActivity_GlobalCancel = new System.Workflow.Activities.EventDrivenActivity(); // // setStateActivity3 // this.setStateActivity3.Name = "setStateActivity3"; this.setStateActivity3.TargetStateName = "step1StateActivity"; // // setStateActivity2 // this.setStateActivity2.Name = "setStateActivity2"; this.setStateActivity2.TargetStateName = "step2StateActivity"; // // ifElseBranchActivity2 // this.ifElseBranchActivity2.Activities.Add(this.setStateActivity3); this.ifElseBranchActivity2.Name = "ifElseBranchActivity2"; // // ifElseBranchActivity1 // this.ifElseBranchActivity1.Activities.Add(this.setStateActivity2); codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IsPackageFree); this.ifElseBranchActivity1.Condition = codecondition1; this.ifElseBranchActivity1.Name = "ifElseBranchActivity1"; // // setStateActivity10 // this.setStateActivity10.Name = "setStateActivity10"; this.setStateActivity10.TargetStateName = "showErrorStateActivity"; // // setStateActivity9 // this.setStateActivity9.Name = "setStateActivity9"; this.setStateActivity9.TargetStateName = "step5StateActivity"; // // setStateActivity7 // this.setStateActivity7.Name = "setStateActivity7"; this.setStateActivity7.TargetStateName = "showErrorStateActivity"; // // setStateActivity6 // this.setStateActivity6.Name = "setStateActivity6"; this.setStateActivity6.TargetStateName = "step4StateActivity"; // // setStateActivity19 // this.setStateActivity19.Name = "setStateActivity19"; this.setStateActivity19.TargetStateName = "step2StateActivity"; // // showFieldMessageActivity1 // this.showFieldMessageActivity1.FieldBindingPath = "EulaAccepted"; this.showFieldMessageActivity1.Message = "${Composite.Plugins.PackageElementProvider, InstallRemotePackage.Step2.AcceptMissin" + "g}"; this.showFieldMessageActivity1.Name = "showFieldMessageActivity1"; // // setStateActivity5 // this.setStateActivity5.Name = "setStateActivity5"; this.setStateActivity5.TargetStateName = "step3StateActivity"; // // setStateActivity17 // this.setStateActivity17.Name = "setStateActivity17"; this.setStateActivity17.TargetStateName = "showErrorStateActivity"; // // step2WizardFormActivity // this.step2WizardFormActivity.ContainerLabel = null; this.step2WizardFormActivity.FormDefinitionFileName = "\\Administrative\\PackageElementProviderInstallRemotePackageStep2.xml"; this.step2WizardFormActivity.Name = "step2WizardFormActivity"; // // setStateActivity18 // this.setStateActivity18.Name = "setStateActivity18"; this.setStateActivity18.TargetStateName = "showErrorStateActivity"; // // initializeIfElseActivity_IsAddOnFree // this.initializeIfElseActivity_IsAddOnFree.Activities.Add(this.ifElseBranchActivity1); this.initializeIfElseActivity_IsAddOnFree.Activities.Add(this.ifElseBranchActivity2); this.initializeIfElseActivity_IsAddOnFree.Name = "initializeIfElseActivity_IsAddOnFree"; // // ifElseBranchActivity6 // this.ifElseBranchActivity6.Activities.Add(this.setStateActivity10); this.ifElseBranchActivity6.Name = "ifElseBranchActivity6"; // // ifElseBranchActivity5 // this.ifElseBranchActivity5.Activities.Add(this.setStateActivity9); codecondition2.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.DidValidate); this.ifElseBranchActivity5.Condition = codecondition2; this.ifElseBranchActivity5.Name = "ifElseBranchActivity5"; // // ifElseBranchActivity4 // this.ifElseBranchActivity4.Activities.Add(this.setStateActivity7); this.ifElseBranchActivity4.Name = "ifElseBranchActivity4"; // // ifElseBranchActivity3 // this.ifElseBranchActivity3.Activities.Add(this.setStateActivity6); codecondition3.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.DidValidate); this.ifElseBranchActivity3.Condition = codecondition3; this.ifElseBranchActivity3.Name = "ifElseBranchActivity3"; // // ifElseBranchActivity12 // this.ifElseBranchActivity12.Activities.Add(this.showFieldMessageActivity1); this.ifElseBranchActivity12.Activities.Add(this.setStateActivity19); this.ifElseBranchActivity12.Name = "ifElseBranchActivity12"; // // ifElseBranchActivity11 // this.ifElseBranchActivity11.Activities.Add(this.setStateActivity5); codecondition4.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.EulaAccepted); this.ifElseBranchActivity11.Condition = codecondition4; this.ifElseBranchActivity11.Name = "ifElseBranchActivity11"; // // ifElseBranchActivity8 // this.ifElseBranchActivity8.Activities.Add(this.setStateActivity17); this.ifElseBranchActivity8.Name = "ifElseBranchActivity8"; // // ifElseBranchActivity7 // this.ifElseBranchActivity7.Activities.Add(this.step2WizardFormActivity); codecondition5.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.DidValidate); this.ifElseBranchActivity7.Condition = codecondition5; this.ifElseBranchActivity7.Name = "ifElseBranchActivity7"; // // ifElseBranchActivity10 // this.ifElseBranchActivity10.Activities.Add(this.setStateActivity18); this.ifElseBranchActivity10.Name = "ifElseBranchActivity10"; // // ifElseBranchActivity9 // this.ifElseBranchActivity9.Activities.Add(this.initializeIfElseActivity_IsAddOnFree); codecondition6.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.DidValidate); this.ifElseBranchActivity9.Condition = codecondition6; this.ifElseBranchActivity9.Name = "ifElseBranchActivity9"; // // setStateActivity12 // this.setStateActivity12.Name = "setStateActivity12"; this.setStateActivity12.TargetStateName = "finalStateActivity"; // // cleanupCodeActivity_Cleanup // this.cleanupCodeActivity_Cleanup.Name = "cleanupCodeActivity_Cleanup"; this.cleanupCodeActivity_Cleanup.ExecuteCode += new System.EventHandler(this.cleanupCodeActivity_Cleanup_ExecuteCode); // // setStateActivity11 // this.setStateActivity11.Name = "setStateActivity11"; this.setStateActivity11.TargetStateName = "finalStateActivity"; // // step5CodeActivity_RefreshTree // this.step5CodeActivity_RefreshTree.Name = "step5CodeActivity_RefreshTree"; this.step5CodeActivity_RefreshTree.ExecuteCode += new System.EventHandler(this.step5CodeActivity_RefreshTree_ExecuteCode); // // closeCurrentViewActivity1 // this.closeCurrentViewActivity1.Name = "closeCurrentViewActivity1"; // // finishHandleExternalEventActivity2 // this.finishHandleExternalEventActivity2.EventName = "Finish"; this.finishHandleExternalEventActivity2.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.finishHandleExternalEventActivity2.Name = "finishHandleExternalEventActivity2"; // // step5WizardFormActivity // this.step5WizardFormActivity.ContainerLabel = null; this.step5WizardFormActivity.FormDefinitionFileName = "\\Administrative\\PackageElementProviderInstallRemotePackageStep5.xml"; this.step5WizardFormActivity.Name = "step5WizardFormActivity"; // // setStateActivity16 // this.setStateActivity16.Name = "setStateActivity16"; this.setStateActivity16.TargetStateName = "cleanupStateActivity"; // // cancelHandleExternalEventActivity5 // this.cancelHandleExternalEventActivity5.EventName = "Cancel"; this.cancelHandleExternalEventActivity5.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.cancelHandleExternalEventActivity5.Name = "cancelHandleExternalEventActivity5"; // // step4IfElseActivity_DidValidate // this.step4IfElseActivity_DidValidate.Activities.Add(this.ifElseBranchActivity5); this.step4IfElseActivity_DidValidate.Activities.Add(this.ifElseBranchActivity6); this.step4IfElseActivity_DidValidate.Name = "step4IfElseActivity_DidValidate"; // // step4CodeActivity_Install // this.step4CodeActivity_Install.Name = "step4CodeActivity_Install"; this.step4CodeActivity_Install.ExecuteCode += new System.EventHandler(this.step4CodeActivity_Install_ExecuteCode); // // nextHandleExternalEventActivity4 // this.nextHandleExternalEventActivity4.EventName = "Next"; this.nextHandleExternalEventActivity4.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.nextHandleExternalEventActivity4.Name = "nextHandleExternalEventActivity4"; // // step4WizardFormActivity // this.step4WizardFormActivity.ContainerLabel = null; this.step4WizardFormActivity.FormDefinitionFileName = "\\Administrative\\PackageElementProviderInstallRemotePackageStep4.xml"; this.step4WizardFormActivity.Name = "step4WizardFormActivity"; // // setStateActivity8 // this.setStateActivity8.Name = "setStateActivity8"; this.setStateActivity8.TargetStateName = "finalStateActivity"; // // finishHandleExternalEventActivity1 // this.finishHandleExternalEventActivity1.EventName = "Finish"; this.finishHandleExternalEventActivity1.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.finishHandleExternalEventActivity1.Name = "finishHandleExternalEventActivity1"; // // showErrorWizardFormActivity // this.showErrorWizardFormActivity.ContainerLabel = null; this.showErrorWizardFormActivity.FormDefinitionFileName = "\\Administrative\\PackageElementProviderInstallRemotePackageShowError.xml"; this.showErrorWizardFormActivity.Name = "showErrorWizardFormActivity"; // // showErrorCodeActivity_Initialize // this.showErrorCodeActivity_Initialize.Name = "showErrorCodeActivity_Initialize"; this.showErrorCodeActivity_Initialize.ExecuteCode += new System.EventHandler(this.showErrorCodeActivity_Initialize_ExecuteCode); // // setStateActivity15 // this.setStateActivity15.Name = "setStateActivity15"; this.setStateActivity15.TargetStateName = "cleanupStateActivity"; // // cancelHandleExternalEventActivity4 // this.cancelHandleExternalEventActivity4.EventName = "Cancel"; this.cancelHandleExternalEventActivity4.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.cancelHandleExternalEventActivity4.Name = "cancelHandleExternalEventActivity4"; // // step3IfElseActivity_DidValidate // this.step3IfElseActivity_DidValidate.Activities.Add(this.ifElseBranchActivity3); this.step3IfElseActivity_DidValidate.Activities.Add(this.ifElseBranchActivity4); this.step3IfElseActivity_DidValidate.Name = "step3IfElseActivity_DidValidate"; // // step3CodeActivity_DownloadAndValidate // this.step3CodeActivity_DownloadAndValidate.Name = "step3CodeActivity_DownloadAndValidate"; this.step3CodeActivity_DownloadAndValidate.ExecuteCode += new System.EventHandler(this.step3CodeActivity_DownloadAndValidate_ExecuteCode); // // nextHandleExternalEventActivity3 // this.nextHandleExternalEventActivity3.EventName = "Next"; this.nextHandleExternalEventActivity3.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.nextHandleExternalEventActivity3.Name = "nextHandleExternalEventActivity3"; // // step3WizardFormActivity // this.step3WizardFormActivity.ContainerLabel = null; this.step3WizardFormActivity.FormDefinitionFileName = "\\Administrative\\PackageElementProviderInstallRemotePackageStep3.xml"; this.step3WizardFormActivity.Name = "step3WizardFormActivity"; // // setStateActivity14 // this.setStateActivity14.Name = "setStateActivity14"; this.setStateActivity14.TargetStateName = "cleanupStateActivity"; // // cancelHandleExternalEventActivity3 // this.cancelHandleExternalEventActivity3.EventName = "Cancel"; this.cancelHandleExternalEventActivity3.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.cancelHandleExternalEventActivity3.Name = "cancelHandleExternalEventActivity3"; // // ifElseActivity2 // this.ifElseActivity2.Activities.Add(this.ifElseBranchActivity11); this.ifElseActivity2.Activities.Add(this.ifElseBranchActivity12); this.ifElseActivity2.Name = "ifElseActivity2"; // // nextHandleExternalEventActivity2 // this.nextHandleExternalEventActivity2.EventName = "Next"; this.nextHandleExternalEventActivity2.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.nextHandleExternalEventActivity2.Name = "nextHandleExternalEventActivity2"; // // ifElseActivity1 // this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity7); this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity8); this.ifElseActivity1.Name = "ifElseActivity1"; // // step2StateStepcodeActivity_Initialize // this.step2StateStepcodeActivity_Initialize.Name = "step2StateStepcodeActivity_Initialize"; this.step2StateStepcodeActivity_Initialize.ExecuteCode += new System.EventHandler(this.step2StateStepcodeActivity_Initialize_ExecuteCode); // // setStateActivity13 // this.setStateActivity13.Name = "setStateActivity13"; this.setStateActivity13.TargetStateName = "cleanupStateActivity"; // // cancelHandleExternalEventActivity2 // this.cancelHandleExternalEventActivity2.EventName = "Cancel"; this.cancelHandleExternalEventActivity2.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.cancelHandleExternalEventActivity2.Name = "cancelHandleExternalEventActivity2"; // // setStateActivity4 // this.setStateActivity4.Name = "setStateActivity4"; this.setStateActivity4.TargetStateName = "step2StateActivity"; // // nextHandleExternalEventActivity1 // this.nextHandleExternalEventActivity1.EventName = "Next"; this.nextHandleExternalEventActivity1.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.nextHandleExternalEventActivity1.Name = "nextHandleExternalEventActivity1"; // // step1WizardFormActivity // this.step1WizardFormActivity.ContainerLabel = null; this.step1WizardFormActivity.FormDefinitionFileName = "\\Administrative\\PackageElementProviderInstallRemotePackageStep1.xml"; this.step1WizardFormActivity.Name = "step1WizardFormActivity"; // // initializeIfElseActivity_DidValidate // this.initializeIfElseActivity_DidValidate.Activities.Add(this.ifElseBranchActivity9); this.initializeIfElseActivity_DidValidate.Activities.Add(this.ifElseBranchActivity10); this.initializeIfElseActivity_DidValidate.Name = "initializeIfElseActivity_DidValidate"; // // initializeStateCodeActivity_Initialize // this.initializeStateCodeActivity_Initialize.Name = "initializeStateCodeActivity_Initialize"; this.initializeStateCodeActivity_Initialize.ExecuteCode += new System.EventHandler(this.initializeStateCodeActivity_Initialize_ExecuteCode); // // cleanupStateInitializationActivity // this.cleanupStateInitializationActivity.Activities.Add(this.cleanupCodeActivity_Cleanup); this.cleanupStateInitializationActivity.Activities.Add(this.setStateActivity12); this.cleanupStateInitializationActivity.Name = "cleanupStateInitializationActivity"; // // step5EventDrivenActivity_Finish // this.step5EventDrivenActivity_Finish.Activities.Add(this.finishHandleExternalEventActivity2); this.step5EventDrivenActivity_Finish.Activities.Add(this.closeCurrentViewActivity1); this.step5EventDrivenActivity_Finish.Activities.Add(this.step5CodeActivity_RefreshTree); this.step5EventDrivenActivity_Finish.Activities.Add(this.setStateActivity11); this.step5EventDrivenActivity_Finish.Name = "step5EventDrivenActivity_Finish"; // // step5StateInitializationActivity // this.step5StateInitializationActivity.Activities.Add(this.step5WizardFormActivity); this.step5StateInitializationActivity.Name = "step5StateInitializationActivity"; // // step4EventDrivenActivity_Cancel // this.step4EventDrivenActivity_Cancel.Activities.Add(this.cancelHandleExternalEventActivity5); this.step4EventDrivenActivity_Cancel.Activities.Add(this.setStateActivity16); this.step4EventDrivenActivity_Cancel.Name = "step4EventDrivenActivity_Cancel"; // // step4EventDrivenActivity_Next // this.step4EventDrivenActivity_Next.Activities.Add(this.nextHandleExternalEventActivity4); this.step4EventDrivenActivity_Next.Activities.Add(this.step4CodeActivity_Install); this.step4EventDrivenActivity_Next.Activities.Add(this.step4IfElseActivity_DidValidate); this.step4EventDrivenActivity_Next.Name = "step4EventDrivenActivity_Next"; // // step4StateInitializationActivity // this.step4StateInitializationActivity.Activities.Add(this.step4WizardFormActivity); this.step4StateInitializationActivity.Name = "step4StateInitializationActivity"; // // showErrorEventDrivenActivity_Finish // this.showErrorEventDrivenActivity_Finish.Activities.Add(this.finishHandleExternalEventActivity1); this.showErrorEventDrivenActivity_Finish.Activities.Add(this.setStateActivity8); this.showErrorEventDrivenActivity_Finish.Name = "showErrorEventDrivenActivity_Finish"; // // showErrorStateInitializationActivity // this.showErrorStateInitializationActivity.Activities.Add(this.showErrorCodeActivity_Initialize); this.showErrorStateInitializationActivity.Activities.Add(this.showErrorWizardFormActivity); this.showErrorStateInitializationActivity.Name = "showErrorStateInitializationActivity"; // // step3EventDrivenActivity_Cancel // this.step3EventDrivenActivity_Cancel.Activities.Add(this.cancelHandleExternalEventActivity4); this.step3EventDrivenActivity_Cancel.Activities.Add(this.setStateActivity15); this.step3EventDrivenActivity_Cancel.Name = "step3EventDrivenActivity_Cancel"; // // step3EventDrivenActivity_Next // this.step3EventDrivenActivity_Next.Activities.Add(this.nextHandleExternalEventActivity3); this.step3EventDrivenActivity_Next.Activities.Add(this.step3CodeActivity_DownloadAndValidate); this.step3EventDrivenActivity_Next.Activities.Add(this.step3IfElseActivity_DidValidate); this.step3EventDrivenActivity_Next.Name = "step3EventDrivenActivity_Next"; // // step3StateInitializationActivity // this.step3StateInitializationActivity.Activities.Add(this.step3WizardFormActivity); this.step3StateInitializationActivity.Name = "step3StateInitializationActivity"; // // step2EventDrivenActivity_Cancel // this.step2EventDrivenActivity_Cancel.Activities.Add(this.cancelHandleExternalEventActivity3); this.step2EventDrivenActivity_Cancel.Activities.Add(this.setStateActivity14); this.step2EventDrivenActivity_Cancel.Name = "step2EventDrivenActivity_Cancel"; // // step2EventDrivenActivity_Next // this.step2EventDrivenActivity_Next.Activities.Add(this.nextHandleExternalEventActivity2); this.step2EventDrivenActivity_Next.Activities.Add(this.ifElseActivity2); this.step2EventDrivenActivity_Next.Name = "step2EventDrivenActivity_Next"; // // step2StateInitializationActivity // this.step2StateInitializationActivity.Activities.Add(this.step2StateStepcodeActivity_Initialize); this.step2StateInitializationActivity.Activities.Add(this.ifElseActivity1); this.step2StateInitializationActivity.Name = "step2StateInitializationActivity"; // // step1EventDrivenActivity_Cancel // this.step1EventDrivenActivity_Cancel.Activities.Add(this.cancelHandleExternalEventActivity2); this.step1EventDrivenActivity_Cancel.Activities.Add(this.setStateActivity13); this.step1EventDrivenActivity_Cancel.Name = "step1EventDrivenActivity_Cancel"; // // step1EventDrivenActivity_Next // this.step1EventDrivenActivity_Next.Activities.Add(this.nextHandleExternalEventActivity1); this.step1EventDrivenActivity_Next.Activities.Add(this.setStateActivity4); this.step1EventDrivenActivity_Next.Name = "step1EventDrivenActivity_Next"; // // step1StateInitializationActivity // this.step1StateInitializationActivity.Activities.Add(this.step1WizardFormActivity); this.step1StateInitializationActivity.Name = "step1StateInitializationActivity"; // // initializeStateInitializationActivity // this.initializeStateInitializationActivity.Activities.Add(this.initializeStateCodeActivity_Initialize); this.initializeStateInitializationActivity.Activities.Add(this.initializeIfElseActivity_DidValidate); this.initializeStateInitializationActivity.Name = "initializeStateInitializationActivity"; // // setStateActivity1 // this.setStateActivity1.Name = "setStateActivity1"; this.setStateActivity1.TargetStateName = "cleanupStateActivity"; // // cancelHandleExternalEventActivity1 // this.cancelHandleExternalEventActivity1.EventName = "Cancel"; this.cancelHandleExternalEventActivity1.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.cancelHandleExternalEventActivity1.Name = "cancelHandleExternalEventActivity1"; // // cleanupStateActivity // this.cleanupStateActivity.Activities.Add(this.cleanupStateInitializationActivity); this.cleanupStateActivity.Name = "cleanupStateActivity"; // // step5StateActivity // this.step5StateActivity.Activities.Add(this.step5StateInitializationActivity); this.step5StateActivity.Activities.Add(this.step5EventDrivenActivity_Finish); this.step5StateActivity.Name = "step5StateActivity"; // // step4StateActivity // this.step4StateActivity.Activities.Add(this.step4StateInitializationActivity); this.step4StateActivity.Activities.Add(this.step4EventDrivenActivity_Next); this.step4StateActivity.Activities.Add(this.step4EventDrivenActivity_Cancel); this.step4StateActivity.Name = "step4StateActivity"; // // showErrorStateActivity // this.showErrorStateActivity.Activities.Add(this.showErrorStateInitializationActivity); this.showErrorStateActivity.Activities.Add(this.showErrorEventDrivenActivity_Finish); this.showErrorStateActivity.Name = "showErrorStateActivity"; // // step3StateActivity // this.step3StateActivity.Activities.Add(this.step3StateInitializationActivity); this.step3StateActivity.Activities.Add(this.step3EventDrivenActivity_Next); this.step3StateActivity.Activities.Add(this.step3EventDrivenActivity_Cancel); this.step3StateActivity.Name = "step3StateActivity"; // // step2StateActivity // this.step2StateActivity.Activities.Add(this.step2StateInitializationActivity); this.step2StateActivity.Activities.Add(this.step2EventDrivenActivity_Next); this.step2StateActivity.Activities.Add(this.step2EventDrivenActivity_Cancel); this.step2StateActivity.Name = "step2StateActivity"; // // step1StateActivity // this.step1StateActivity.Activities.Add(this.step1StateInitializationActivity); this.step1StateActivity.Activities.Add(this.step1EventDrivenActivity_Next); this.step1StateActivity.Activities.Add(this.step1EventDrivenActivity_Cancel); this.step1StateActivity.Name = "step1StateActivity"; // // finalStateActivity // this.finalStateActivity.Name = "finalStateActivity"; // // initializeStateActivity // this.initializeStateActivity.Activities.Add(this.initializeStateInitializationActivity); this.initializeStateActivity.Name = "initializeStateActivity"; // // eventDrivenActivity_GlobalCancel // this.eventDrivenActivity_GlobalCancel.Activities.Add(this.cancelHandleExternalEventActivity1); this.eventDrivenActivity_GlobalCancel.Activities.Add(this.setStateActivity1); this.eventDrivenActivity_GlobalCancel.Name = "eventDrivenActivity_GlobalCancel"; // // InstallRemotePackageWorkflow // this.Activities.Add(this.eventDrivenActivity_GlobalCancel); this.Activities.Add(this.initializeStateActivity); this.Activities.Add(this.finalStateActivity); this.Activities.Add(this.step1StateActivity); this.Activities.Add(this.step2StateActivity); this.Activities.Add(this.step3StateActivity); this.Activities.Add(this.showErrorStateActivity); this.Activities.Add(this.step4StateActivity); this.Activities.Add(this.step5StateActivity); this.Activities.Add(this.cleanupStateActivity); this.CompletedStateName = "finalStateActivity"; this.DynamicUpdateCondition = null; this.InitialStateName = "initializeStateActivity"; this.Name = "InstallRemotePackageWorkflow"; this.CanModifyActivities = false; }
static internal IEventActivity GetEventActivity(EventDrivenActivity eventDriven) { CompositeActivity sequenceActivity = eventDriven as CompositeActivity; Debug.Assert(eventDriven.EnabledActivities.Count > 0); IEventActivity eventActivity = sequenceActivity.EnabledActivities[0] as IEventActivity; Debug.Assert(eventActivity != null); return eventActivity; }
internal static IEventActivity GetEventActivity(EventDrivenActivity eventDriven) { CompositeActivity activity = eventDriven; return (activity.EnabledActivities[0] as IEventActivity); }
private static bool ValidateMultipleIEventActivityInCompositeActivity(EventDrivenActivity eventDriven, IEventActivity firstEventActivity, CompositeActivity parent, ValidationErrorCollection validationErrors) { foreach (Activity activity in parent.Activities) { if (activity.Enabled && (activity != firstEventActivity)) { if (activity is IEventActivity) { validationErrors.Add(new ValidationError(SR.GetString("Error_EventDrivenMultipleEventActivity", new object[] { eventDriven.Name, typeof(IEventActivity).FullName, typeof(EventDrivenActivity).Name }), 0x524)); return false; } CompositeActivity activity2 = activity as CompositeActivity; if ((activity2 != null) && !ValidateMultipleIEventActivityInCompositeActivity(eventDriven, firstEventActivity, activity2, validationErrors)) { return false; } } } return true; }
private bool IsEventDrivenSubscribed(EventDrivenActivity eventDriven) { IEventActivity eventActivity = StateMachineHelpers.GetEventActivity(eventDriven); EventActivitySubscription subscription = GetSubscription(eventActivity); return (subscription != null); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.CanModifyActivities = true; System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind(); this.MessageReceived = new System.Workflow.Activities.CodeActivity(); this.ReceiveMessage = new Winterdom.Workflow.Activities.Msmq.MsmqReceiveActivity(); this.DelayDone = new System.Workflow.Activities.CodeActivity(); this.ReceiveTimeout = new System.Workflow.Activities.DelayActivity(); this.SendMessage = new Winterdom.Workflow.Activities.Msmq.MsmqSendActivity(); this.eventDrivenActivity2 = new System.Workflow.Activities.EventDrivenActivity(); this.eventDrivenActivity1 = new System.Workflow.Activities.EventDrivenActivity(); this.MessageSent = new System.Workflow.Activities.CodeActivity(); this.SendScope = new System.Workflow.ComponentModel.TransactionScopeActivity(); this.DelaySend = new System.Workflow.Activities.DelayActivity(); this.ConfigureObject = new System.Workflow.Activities.CodeActivity(); this.listenActivity1 = new System.Workflow.Activities.ListenActivity(); this.sequenceActivity2 = new System.Workflow.Activities.SequenceActivity(); this.sequenceActivity1 = new System.Workflow.Activities.SequenceActivity(); this.parallelActivity1 = new System.Workflow.Activities.ParallelActivity(); // // MessageReceived // this.MessageReceived.Name = "MessageReceived"; this.MessageReceived.ExecuteCode += new System.EventHandler(this.MessageReceived_ExecuteCode); activitybind2.Name = "SampleWorkflow1"; activitybind2.Path = "QUEUE"; activitybind3.Name = "SampleWorkflow1"; activitybind3.Path = "_customerReceived"; // // ReceiveMessage // activitybind1.Name = "SampleWorkflow1"; activitybind1.Path = "_labelReceived"; this.ReceiveMessage.MessageType = typeof(TestApp.Customer); this.ReceiveMessage.Name = "ReceiveMessage"; this.ReceiveMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqReceiveActivity.QueueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2))); this.ReceiveMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqReceiveActivity.MessageReceivedProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3))); this.ReceiveMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqReceiveActivity.LabelProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1))); // // DelayDone // this.DelayDone.Name = "DelayDone"; this.DelayDone.ExecuteCode += new System.EventHandler(this.DelayDone_ExecuteCode); // // ReceiveTimeout // this.ReceiveTimeout.Name = "ReceiveTimeout"; this.ReceiveTimeout.TimeoutDuration = System.TimeSpan.Parse("00:00:10"); activitybind6.Name = "SampleWorkflow1"; activitybind6.Path = "QUEUE"; // // SendMessage // this.SendMessage.IsTransactionalQueue = true; activitybind4.Name = "SampleWorkflow1"; activitybind4.Path = "_labelToSend"; activitybind5.Name = "SampleWorkflow1"; activitybind5.Path = "_customerToSend"; this.SendMessage.Name = "SendMessage"; this.SendMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqSendActivity.MessageToSendProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5))); this.SendMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqSendActivity.QueueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6))); this.SendMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqSendActivity.LabelProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4))); // // eventDrivenActivity2 // this.eventDrivenActivity2.Activities.Add(this.ReceiveMessage); this.eventDrivenActivity2.Activities.Add(this.MessageReceived); this.eventDrivenActivity2.Name = "eventDrivenActivity2"; // // eventDrivenActivity1 // this.eventDrivenActivity1.Activities.Add(this.ReceiveTimeout); this.eventDrivenActivity1.Activities.Add(this.DelayDone); this.eventDrivenActivity1.Name = "eventDrivenActivity1"; // // MessageSent // this.MessageSent.Name = "MessageSent"; this.MessageSent.ExecuteCode += new System.EventHandler(this.MessageSent_ExecuteCode); // // SendScope // this.SendScope.Activities.Add(this.SendMessage); this.SendScope.Name = "SendScope"; this.SendScope.TransactionOptions.IsolationLevel = System.Transactions.IsolationLevel.Serializable; // // DelaySend // this.DelaySend.Name = "DelaySend"; this.DelaySend.TimeoutDuration = System.TimeSpan.Parse("00:00:00"); // // ConfigureObject // this.ConfigureObject.Name = "ConfigureObject"; this.ConfigureObject.ExecuteCode += new System.EventHandler(this.ConfigureObject_ExecuteCode); // // listenActivity1 // this.listenActivity1.Activities.Add(this.eventDrivenActivity1); this.listenActivity1.Activities.Add(this.eventDrivenActivity2); this.listenActivity1.Name = "listenActivity1"; // // sequenceActivity2 // this.sequenceActivity2.Activities.Add(this.ConfigureObject); this.sequenceActivity2.Activities.Add(this.DelaySend); this.sequenceActivity2.Activities.Add(this.SendScope); this.sequenceActivity2.Activities.Add(this.MessageSent); this.sequenceActivity2.Name = "sequenceActivity2"; // // sequenceActivity1 // this.sequenceActivity1.Activities.Add(this.listenActivity1); this.sequenceActivity1.Name = "sequenceActivity1"; // // parallelActivity1 // this.parallelActivity1.Activities.Add(this.sequenceActivity1); this.parallelActivity1.Activities.Add(this.sequenceActivity2); this.parallelActivity1.Name = "parallelActivity1"; // // SampleWorkflow1 // this.Activities.Add(this.parallelActivity1); this.Name = "SampleWorkflow1"; 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; }
internal void UnsubscribeEventDriven(ActivityExecutionContext context, EventDrivenActivity eventDriven) { IEventActivity eventActivity = StateMachineHelpers.GetEventActivity(eventDriven); this.UnsubscribeEventActivity(context, eventActivity); }
private void InitializeComponent() { this.CanModifyActivities = true; System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.Runtime.CorrelationToken correlationtoken1 = new System.Workflow.Runtime.CorrelationToken(); System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind7 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind8 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind9 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind10 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind11 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition(); System.Workflow.Activities.CodeCondition codecondition2 = new System.Workflow.Activities.CodeCondition(); System.Workflow.Activities.CodeCondition codecondition3 = new System.Workflow.Activities.CodeCondition(); System.Workflow.ComponentModel.ActivityBind activitybind12 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind13 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind14 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind15 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind16 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind17 = new System.Workflow.ComponentModel.ActivityBind(); this.onTaskDeleted1 = new Microsoft.SharePoint.WorkflowActions.OnTaskDeleted(); this.onTaskChanged1 = new Microsoft.SharePoint.WorkflowActions.OnTaskChanged(); this.throwActivity1 = new System.Workflow.ComponentModel.ThrowActivity(); this.codeActivity2 = new System.Workflow.Activities.CodeActivity(); this.logToHistoryListActivity5 = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity(); this.logToHistoryListActivity4 = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity(); this.completeTask1 = new Microsoft.SharePoint.WorkflowActions.CompleteTask(); this.eventDrivenActivity2 = new System.Workflow.Activities.EventDrivenActivity(); this.eventDrivenActivity1 = new System.Workflow.Activities.EventDrivenActivity(); this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity1 = new System.Workflow.Activities.IfElseBranchActivity(); this.listenActivity1 = new System.Workflow.Activities.ListenActivity(); this.ifElseActivity1 = new System.Workflow.Activities.IfElseActivity(); this.whileActivity1 = new System.Workflow.Activities.WhileActivity(); this.logToHistoryListActivity1 = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity(); this.codeActivity1 = new System.Workflow.Activities.CodeActivity(); this.createTaskWithContentType1 = new Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType(); this.sequenceActivity1 = new System.Workflow.Activities.SequenceActivity(); activitybind2.Name = "CreateTaskForMultiCT"; activitybind2.Path = "onTaskDeleted1_AfterProperties1"; // // onTaskDeleted1 // correlationtoken1.Name = "createTaskCT1Token"; correlationtoken1.OwnerActivityName = "sequenceActivity1"; this.onTaskDeleted1.CorrelationToken = correlationtoken1; this.onTaskDeleted1.Executor = null; this.onTaskDeleted1.Name = "onTaskDeleted1"; activitybind1.Name = "CreateTaskForMultiCT"; activitybind1.Path = "createTaskWithContentType1_TaskId1"; this.onTaskDeleted1.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.onTaskDeleted1_Invoked); this.onTaskDeleted1.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskDeleted.AfterPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2))); this.onTaskDeleted1.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskDeleted.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1))); // // onTaskChanged1 // activitybind3.Name = "CreateTaskForMultiCT"; activitybind3.Path = "onTaskChanged1_AfterProperties1"; activitybind4.Name = "CreateTaskForMultiCT"; activitybind4.Path = "onTaskChanged1_BeforeProperties1"; this.onTaskChanged1.CorrelationToken = correlationtoken1; this.onTaskChanged1.Executor = null; this.onTaskChanged1.Name = "onTaskChanged1"; activitybind5.Name = "CreateTaskForMultiCT"; activitybind5.Path = "createTaskWithContentType1_TaskId1"; this.onTaskChanged1.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.onTaskChanged1_Invoked); this.onTaskChanged1.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.AfterPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3))); this.onTaskChanged1.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.BeforePropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4))); this.onTaskChanged1.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5))); activitybind6.Name = "CreateTaskForMultiCT"; activitybind6.Path = "throwActivity1_Fault1"; // // throwActivity1 // this.throwActivity1.FaultType = typeof(System.Exception); this.throwActivity1.Name = "throwActivity1"; this.throwActivity1.SetBinding(System.Workflow.ComponentModel.ThrowActivity.FaultProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6))); // // codeActivity2 // this.codeActivity2.Name = "codeActivity2"; this.codeActivity2.ExecuteCode += new System.EventHandler(this.codeActivity2_ExecuteCode); // // logToHistoryListActivity5 // this.logToHistoryListActivity5.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808"); this.logToHistoryListActivity5.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment; activitybind7.Name = "CreateTaskForMultiCT"; activitybind7.Path = "logToHistoryListActivity5_HistoryDescription1"; activitybind8.Name = "CreateTaskForMultiCT"; activitybind8.Path = "logToHistoryListActivity5_HistoryOutcome1"; this.logToHistoryListActivity5.Name = "logToHistoryListActivity5"; this.logToHistoryListActivity5.OtherData = ""; this.logToHistoryListActivity5.UserId = -1; this.logToHistoryListActivity5.MethodInvoking += new System.EventHandler(this.logToHistoryListActivity5_MethodInvoking); this.logToHistoryListActivity5.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryDescriptionProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7))); this.logToHistoryListActivity5.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8))); // // logToHistoryListActivity4 // this.logToHistoryListActivity4.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808"); this.logToHistoryListActivity4.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment; activitybind9.Name = "CreateTaskForMultiCT"; activitybind9.Path = "logToHistoryListActivity4_HistoryDescription1"; activitybind10.Name = "CreateTaskForMultiCT"; activitybind10.Path = "logToHistoryListActivity4_HistoryOutcome1"; this.logToHistoryListActivity4.Name = "logToHistoryListActivity4"; this.logToHistoryListActivity4.OtherData = ""; this.logToHistoryListActivity4.UserId = -1; this.logToHistoryListActivity4.MethodInvoking += new System.EventHandler(this.logToHistoryListActivity4_MethodInvoking); this.logToHistoryListActivity4.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryDescriptionProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9))); this.logToHistoryListActivity4.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10))); // // completeTask1 // this.completeTask1.CorrelationToken = correlationtoken1; this.completeTask1.Name = "completeTask1"; activitybind11.Name = "CreateTaskForMultiCT"; activitybind11.Path = "createTaskWithContentType1_TaskId1"; this.completeTask1.TaskOutcome = null; this.completeTask1.MethodInvoking += new System.EventHandler(this.completeTask1_MethodInvoking); this.completeTask1.SetBinding(Microsoft.SharePoint.WorkflowActions.CompleteTask.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind11))); // // eventDrivenActivity2 // this.eventDrivenActivity2.Activities.Add(this.onTaskDeleted1); this.eventDrivenActivity2.Name = "eventDrivenActivity2"; // // eventDrivenActivity1 // this.eventDrivenActivity1.Activities.Add(this.onTaskChanged1); this.eventDrivenActivity1.Name = "eventDrivenActivity1"; // // ifElseBranchActivity2 // this.ifElseBranchActivity2.Activities.Add(this.logToHistoryListActivity5); this.ifElseBranchActivity2.Activities.Add(this.codeActivity2); this.ifElseBranchActivity2.Activities.Add(this.throwActivity1); codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IfElseActivity2_Condition); this.ifElseBranchActivity2.Condition = codecondition1; this.ifElseBranchActivity2.Name = "ifElseBranchActivity2"; // // ifElseBranchActivity1 // this.ifElseBranchActivity1.Activities.Add(this.completeTask1); this.ifElseBranchActivity1.Activities.Add(this.logToHistoryListActivity4); codecondition2.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IfElseActivity1_Condition); this.ifElseBranchActivity1.Condition = codecondition2; this.ifElseBranchActivity1.Name = "ifElseBranchActivity1"; // // listenActivity1 // this.listenActivity1.Activities.Add(this.eventDrivenActivity1); this.listenActivity1.Activities.Add(this.eventDrivenActivity2); this.listenActivity1.Name = "listenActivity1"; // // ifElseActivity1 // this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity1); this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity2); this.ifElseActivity1.Name = "ifElseActivity1"; // // whileActivity1 // this.whileActivity1.Activities.Add(this.listenActivity1); codecondition3.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.whileActivity1_Condition); this.whileActivity1.Condition = codecondition3; this.whileActivity1.Name = "whileActivity1"; // // logToHistoryListActivity1 // this.logToHistoryListActivity1.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808"); this.logToHistoryListActivity1.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment; activitybind12.Name = "CreateTaskForMultiCT"; activitybind12.Path = "logToHistoryListActivity1_HistoryDescription1"; activitybind13.Name = "CreateTaskForMultiCT"; activitybind13.Path = "logToHistoryListActivity1_HistoryOutcome1"; this.logToHistoryListActivity1.Name = "logToHistoryListActivity1"; this.logToHistoryListActivity1.OtherData = ""; this.logToHistoryListActivity1.UserId = -1; this.logToHistoryListActivity1.MethodInvoking += new System.EventHandler(this.logToHistoryListActivity1_MethodInvoking); this.logToHistoryListActivity1.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryDescriptionProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind12))); this.logToHistoryListActivity1.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind13))); // // codeActivity1 // this.codeActivity1.Name = "codeActivity1"; this.codeActivity1.ExecuteCode += new System.EventHandler(this.codeActivity1_ExecuteCode); // // createTaskWithContentType1 // activitybind14.Name = "CreateTaskForMultiCT"; activitybind14.Path = "createTaskWithContentType1_ContentTypeId1"; this.createTaskWithContentType1.CorrelationToken = correlationtoken1; activitybind15.Name = "CreateTaskForMultiCT"; activitybind15.Path = "createTaskWithContentType1_ListItemId1"; this.createTaskWithContentType1.Name = "createTaskWithContentType1"; this.createTaskWithContentType1.SpecialPermissions = null; activitybind16.Name = "CreateTaskForMultiCT"; activitybind16.Path = "createTaskWithContentType1_TaskId1"; activitybind17.Name = "CreateTaskForMultiCT"; activitybind17.Path = "createTaskWithContentType1_TaskProperties1"; this.createTaskWithContentType1.MethodInvoking += new System.EventHandler(this.createTaskWithContentType1_MethodInvoking); this.createTaskWithContentType1.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.ContentTypeIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind14))); this.createTaskWithContentType1.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.ListItemIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind15))); this.createTaskWithContentType1.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind16))); this.createTaskWithContentType1.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.TaskPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind17))); // // sequenceActivity1 // this.sequenceActivity1.Activities.Add(this.createTaskWithContentType1); this.sequenceActivity1.Activities.Add(this.codeActivity1); this.sequenceActivity1.Activities.Add(this.logToHistoryListActivity1); this.sequenceActivity1.Activities.Add(this.whileActivity1); this.sequenceActivity1.Activities.Add(this.ifElseActivity1); this.sequenceActivity1.Name = "sequenceActivity1"; // // CreateTaskForMultiCT // this.Activities.Add(this.sequenceActivity1); this.Name = "CreateTaskForMultiCT"; this.CanModifyActivities = false; }
internal void OnAddEventDriven(object sender, EventArgs e) { EventDrivenActivity child = new EventDrivenActivity(); this.AddChild(child); }
internal void OnAddEventDriven(object sender, EventArgs e) { EventDrivenActivity eventDriven = new EventDrivenActivity(); AddChild(eventDriven); }
private static bool ValidateMultipleIEventActivityInCompositeActivity(EventDrivenActivity eventDriven, IEventActivity firstEventActivity, CompositeActivity parent, ValidationErrorCollection validationErrors) { foreach (Activity activity in parent.Activities) { // Skip disabled activities or the first IEventActivity // Note that we don't use EnabledActivities because we want to // enforce this rule inside Cancellation and Exception Handlers. if (!activity.Enabled || activity == firstEventActivity) continue; if (activity is IEventActivity) { validationErrors.Add(new ValidationError( SR.GetString(SR.Error_EventDrivenMultipleEventActivity, eventDriven.Name, typeof(IEventActivity).FullName, typeof(EventDrivenActivity).Name), ErrorNumbers.Error_EventDrivenMultipleEventActivity)); return false; } else { CompositeActivity compositeActivity = activity as CompositeActivity; if (compositeActivity != null) { bool result = ValidateMultipleIEventActivityInCompositeActivity(eventDriven, firstEventActivity, compositeActivity, validationErrors); if (!result) return false; } } } return true; }
private void InitializeComponent() { this.CanModifyActivities = true; this.setStateActivity1 = new System.Workflow.Activities.SetStateActivity(); this.delayActivity1 = new System.Workflow.Activities.DelayActivity(); this.eventDrivenActivity1 = new System.Workflow.Activities.EventDrivenActivity(); this.stateActivity1 = new System.Workflow.Activities.StateActivity(); this.stateActivity2 = new System.Workflow.Activities.StateActivity(); // // setStateActivity1 // this.setStateActivity1.Name = "setStateActivity1"; this.setStateActivity1.TargetStateName = "stateActivity1"; // // delayActivity1 // this.delayActivity1.Name = "delayActivity1"; this.delayActivity1.TimeoutDuration = System.TimeSpan.Parse("00:01:00"); // // eventDrivenActivity1 // this.eventDrivenActivity1.Activities.Add(this.delayActivity1); this.eventDrivenActivity1.Activities.Add(this.setStateActivity1); this.eventDrivenActivity1.Name = "eventDrivenActivity1"; // // stateActivity1 // this.stateActivity1.Name = "stateActivity1"; // // _initial // this.stateActivity2.Activities.Add(this.eventDrivenActivity1); this.stateActivity2.Name = "stateActivity2"; // // PressFlow // this.Activities.Add(this.stateActivity2); this.Activities.Add(this.stateActivity1); this.CompletedStateName = "stateActivity1"; this.DynamicUpdateCondition = null; this.InitialStateName = "stateActivity2"; this.Name = "PressFlow"; this.CanModifyActivities = false; }
internal void SubscribeEventDriven(ActivityExecutionContext context, EventDrivenActivity eventDriven) { IEventActivity eventActivity = StateMachineHelpers.GetEventActivity(eventDriven); Activity activity1 = (Activity) eventActivity; GetQueueName(eventActivity); this.SubscribeEventActivity(context, eventActivity); }
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; }
internal static void ChangeEventDrivenQueueState(ActivityExecutionContext context, EventDrivenActivity eventDriven, bool enabled) { IEventActivity eventActivity = StateMachineHelpers.GetEventActivity(eventDriven); IComparable queueName = GetQueueName(eventActivity); if (queueName == null) return; // skip unitialized follower WorkflowQueue workflowQueue = GetWorkflowQueue(context, queueName); if (workflowQueue != null) workflowQueue.Enabled = enabled; }
private void InitializeComponent() { this.CanModifyActivities = true; System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition(); System.Workflow.Activities.CodeCondition codecondition2 = new System.Workflow.Activities.CodeCondition(); this.setStateActivity9 = new System.Workflow.Activities.SetStateActivity(); this.setStateActivity6 = new System.Workflow.Activities.SetStateActivity(); this.setStateActivity4 = new System.Workflow.Activities.SetStateActivity(); this.setStateActivity3 = new System.Workflow.Activities.SetStateActivity(); this.ifElseBranchActivity5 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity4 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity(); this.step1If_DidValidate = new System.Workflow.Activities.IfElseBranchActivity(); this.setStateActivity5 = new System.Workflow.Activities.SetStateActivity(); this.closeCurrentViewActivity2 = new Composite.C1Console.Workflow.Activities.CloseCurrentViewActivity(); this.cleanupCodeActivity_Cleanup = new System.Workflow.Activities.CodeActivity(); this.setStateActivity7 = new System.Workflow.Activities.SetStateActivity(); this.step3CodeActivity_RefreshTree = new System.Workflow.Activities.CodeActivity(); this.closeCurrentViewActivity1 = new Composite.C1Console.Workflow.Activities.CloseCurrentViewActivity(); this.finishHandleExternalEventActivity1 = new Composite.C1Console.Workflow.Activities.FinishHandleExternalEventActivity(); this.step3WizardFormActivity = new Composite.C1Console.Workflow.Activities.WizardFormActivity(); this.setStateActivity8 = new System.Workflow.Activities.SetStateActivity(); this.finishHandleExternalEventActivity2 = new Composite.C1Console.Workflow.Activities.FinishHandleExternalEventActivity(); this.showErrorWizardFormActivity = new Composite.C1Console.Workflow.Activities.WizardFormActivity(); this.showErrorCodeActivity_Initialize = new System.Workflow.Activities.CodeActivity(); this.setStateActivity11 = new System.Workflow.Activities.SetStateActivity(); this.cancelHandleExternalEventActivity3 = new Composite.C1Console.Workflow.Activities.CancelHandleExternalEventActivity(); this.step2IfElseActivity_DidValidate = new System.Workflow.Activities.IfElseActivity(); this.step2CodeActivity_Install = new System.Workflow.Activities.CodeActivity(); this.nextHandleExternalEventActivity2 = new Composite.C1Console.Workflow.Activities.NextHandleExternalEventActivity(); this.step2WizardFormActivity = new Composite.C1Console.Workflow.Activities.WizardFormActivity(); this.setStateActivity10 = new System.Workflow.Activities.SetStateActivity(); this.cancelHandleExternalEventActivity2 = new Composite.C1Console.Workflow.Activities.CancelHandleExternalEventActivity(); this.ifElseActivity1 = new System.Workflow.Activities.IfElseActivity(); this.step1CodeActivity_ValidateInstallation = new System.Workflow.Activities.CodeActivity(); this.nextHandleExternalEventActivity1 = new Composite.C1Console.Workflow.Activities.NextHandleExternalEventActivity(); this.step1WizardFormActivity = new Composite.C1Console.Workflow.Activities.WizardFormActivity(); this.setStateActivity2 = new System.Workflow.Activities.SetStateActivity(); this.initializeCodeActivity_Initialize = new System.Workflow.Activities.CodeActivity(); this.cleanupStateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.step3EventDrivenActivity_Finish = new System.Workflow.Activities.EventDrivenActivity(); this.step3StateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.showErrorEventDrivenActivity_Finish = new System.Workflow.Activities.EventDrivenActivity(); this.showErrorStateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.step2EventDrivenActivity_Cancel = new System.Workflow.Activities.EventDrivenActivity(); this.step2EventDrivenActivity_Next = new System.Workflow.Activities.EventDrivenActivity(); this.step2StateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.step1EventDrivenActivity_Cancel = new System.Workflow.Activities.EventDrivenActivity(); this.step1EventDrivenActivity_Next = new System.Workflow.Activities.EventDrivenActivity(); this.step1StateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.initializeStateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.setStateActivity1 = new System.Workflow.Activities.SetStateActivity(); this.cancelHandleExternalEventActivity1 = new Composite.C1Console.Workflow.Activities.CancelHandleExternalEventActivity(); this.cleanupStateActivity = new System.Workflow.Activities.StateActivity(); this.step3StateActivity = new System.Workflow.Activities.StateActivity(); this.showErrorStateActivity = new System.Workflow.Activities.StateActivity(); this.step2StateActivity = new System.Workflow.Activities.StateActivity(); this.step1StateActivity = new System.Workflow.Activities.StateActivity(); this.finalStateActivity = new System.Workflow.Activities.StateActivity(); this.initializeStateActivity = new System.Workflow.Activities.StateActivity(); this.eventDrivenActivity_GlobalCancel = new System.Workflow.Activities.EventDrivenActivity(); // // setStateActivity9 // this.setStateActivity9.Name = "setStateActivity9"; this.setStateActivity9.TargetStateName = "showErrorStateActivity"; // // setStateActivity6 // this.setStateActivity6.Name = "setStateActivity6"; this.setStateActivity6.TargetStateName = "step3StateActivity"; // // setStateActivity4 // this.setStateActivity4.Name = "setStateActivity4"; this.setStateActivity4.TargetStateName = "showErrorStateActivity"; // // setStateActivity3 // this.setStateActivity3.Name = "setStateActivity3"; this.setStateActivity3.TargetStateName = "step2StateActivity"; // // ifElseBranchActivity5 // this.ifElseBranchActivity5.Activities.Add(this.setStateActivity9); this.ifElseBranchActivity5.Name = "ifElseBranchActivity5"; // // ifElseBranchActivity4 // this.ifElseBranchActivity4.Activities.Add(this.setStateActivity6); codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.DidValidate); this.ifElseBranchActivity4.Condition = codecondition1; this.ifElseBranchActivity4.Name = "ifElseBranchActivity4"; // // ifElseBranchActivity2 // this.ifElseBranchActivity2.Activities.Add(this.setStateActivity4); this.ifElseBranchActivity2.Name = "ifElseBranchActivity2"; // // step1If_DidValidate // this.step1If_DidValidate.Activities.Add(this.setStateActivity3); codecondition2.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.DidValidate); this.step1If_DidValidate.Condition = codecondition2; this.step1If_DidValidate.Name = "step1If_DidValidate"; // // setStateActivity5 // this.setStateActivity5.Name = "setStateActivity5"; this.setStateActivity5.TargetStateName = "finalStateActivity"; // // closeCurrentViewActivity2 // this.closeCurrentViewActivity2.Name = "closeCurrentViewActivity2"; // // cleanupCodeActivity_Cleanup // this.cleanupCodeActivity_Cleanup.Name = "cleanupCodeActivity_Cleanup"; this.cleanupCodeActivity_Cleanup.ExecuteCode += new System.EventHandler(this.cleanupCodeActivity_Cleanup_ExecuteCode); // // setStateActivity7 // this.setStateActivity7.Name = "setStateActivity7"; this.setStateActivity7.TargetStateName = "finalStateActivity"; // // step3CodeActivity_RefreshTree // this.step3CodeActivity_RefreshTree.Name = "step3CodeActivity_RefreshTree"; this.step3CodeActivity_RefreshTree.ExecuteCode += new System.EventHandler(this.step3CodeActivity_RefreshTree_ExecuteCode); // // closeCurrentViewActivity1 // this.closeCurrentViewActivity1.Name = "closeCurrentViewActivity1"; // // finishHandleExternalEventActivity1 // this.finishHandleExternalEventActivity1.EventName = "Finish"; this.finishHandleExternalEventActivity1.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.finishHandleExternalEventActivity1.Name = "finishHandleExternalEventActivity1"; // // step3WizardFormActivity // this.step3WizardFormActivity.ContainerLabel = null; this.step3WizardFormActivity.FormDefinitionFileName = "\\Administrative\\PackageElementProviderInstallLocalPackageStep3.xml"; this.step3WizardFormActivity.Name = "step3WizardFormActivity"; // // setStateActivity8 // this.setStateActivity8.Name = "setStateActivity8"; this.setStateActivity8.TargetStateName = "finalStateActivity"; // // finishHandleExternalEventActivity2 // this.finishHandleExternalEventActivity2.EventName = "Finish"; this.finishHandleExternalEventActivity2.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.finishHandleExternalEventActivity2.Name = "finishHandleExternalEventActivity2"; // // showErrorWizardFormActivity // this.showErrorWizardFormActivity.ContainerLabel = null; this.showErrorWizardFormActivity.FormDefinitionFileName = "\\Administrative\\PackageElementProviderInstallLocalPackageShowError.xml"; this.showErrorWizardFormActivity.Name = "showErrorWizardFormActivity"; // // showErrorCodeActivity_Initialize // this.showErrorCodeActivity_Initialize.Name = "showErrorCodeActivity_Initialize"; this.showErrorCodeActivity_Initialize.ExecuteCode += new System.EventHandler(this.showErrorCodeActivity_Initialize_ExecuteCode); // // setStateActivity11 // this.setStateActivity11.Name = "setStateActivity11"; this.setStateActivity11.TargetStateName = "cleanupStateActivity"; // // cancelHandleExternalEventActivity3 // this.cancelHandleExternalEventActivity3.EventName = "Cancel"; this.cancelHandleExternalEventActivity3.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.cancelHandleExternalEventActivity3.Name = "cancelHandleExternalEventActivity3"; // // step2IfElseActivity_DidValidate // this.step2IfElseActivity_DidValidate.Activities.Add(this.ifElseBranchActivity4); this.step2IfElseActivity_DidValidate.Activities.Add(this.ifElseBranchActivity5); this.step2IfElseActivity_DidValidate.Name = "step2IfElseActivity_DidValidate"; // // step2CodeActivity_Install // this.step2CodeActivity_Install.Name = "step2CodeActivity_Install"; this.step2CodeActivity_Install.ExecuteCode += new System.EventHandler(this.step2CodeActivity_Install_ExecuteCode); // // nextHandleExternalEventActivity2 // this.nextHandleExternalEventActivity2.EventName = "Next"; this.nextHandleExternalEventActivity2.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.nextHandleExternalEventActivity2.Name = "nextHandleExternalEventActivity2"; // // step2WizardFormActivity // this.step2WizardFormActivity.ContainerLabel = null; this.step2WizardFormActivity.FormDefinitionFileName = "\\Administrative\\PackageElementProviderInstallLocalPackageStep2.xml"; this.step2WizardFormActivity.Name = "step2WizardFormActivity"; // // setStateActivity10 // this.setStateActivity10.Name = "setStateActivity10"; this.setStateActivity10.TargetStateName = "cleanupStateActivity"; // // cancelHandleExternalEventActivity2 // this.cancelHandleExternalEventActivity2.EventName = "Cancel"; this.cancelHandleExternalEventActivity2.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.cancelHandleExternalEventActivity2.Name = "cancelHandleExternalEventActivity2"; // // ifElseActivity1 // this.ifElseActivity1.Activities.Add(this.step1If_DidValidate); this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity2); this.ifElseActivity1.Name = "ifElseActivity1"; // // step1CodeActivity_ValidateInstallation // this.step1CodeActivity_ValidateInstallation.Name = "step1CodeActivity_ValidateInstallation"; this.step1CodeActivity_ValidateInstallation.ExecuteCode += new System.EventHandler(this.step1CodeActivity_ValidateInstallation_ExecuteCode); // // nextHandleExternalEventActivity1 // this.nextHandleExternalEventActivity1.EventName = "Next"; this.nextHandleExternalEventActivity1.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.nextHandleExternalEventActivity1.Name = "nextHandleExternalEventActivity1"; // // step1WizardFormActivity // this.step1WizardFormActivity.ContainerLabel = null; this.step1WizardFormActivity.FormDefinitionFileName = "\\Administrative\\PackageElementProviderInstallLocalPackageStep1.xml"; this.step1WizardFormActivity.Name = "step1WizardFormActivity"; // // setStateActivity2 // this.setStateActivity2.Name = "setStateActivity2"; this.setStateActivity2.TargetStateName = "step1StateActivity"; // // initializeCodeActivity_Initialize // this.initializeCodeActivity_Initialize.Name = "initializeCodeActivity_Initialize"; this.initializeCodeActivity_Initialize.ExecuteCode += new System.EventHandler(this.initializeCodeActivity_Initialize_ExecuteCode); // // cleanupStateInitializationActivity // this.cleanupStateInitializationActivity.Activities.Add(this.cleanupCodeActivity_Cleanup); this.cleanupStateInitializationActivity.Activities.Add(this.closeCurrentViewActivity2); this.cleanupStateInitializationActivity.Activities.Add(this.setStateActivity5); this.cleanupStateInitializationActivity.Name = "cleanupStateInitializationActivity"; // // step3EventDrivenActivity_Finish // this.step3EventDrivenActivity_Finish.Activities.Add(this.finishHandleExternalEventActivity1); this.step3EventDrivenActivity_Finish.Activities.Add(this.closeCurrentViewActivity1); this.step3EventDrivenActivity_Finish.Activities.Add(this.step3CodeActivity_RefreshTree); this.step3EventDrivenActivity_Finish.Activities.Add(this.setStateActivity7); this.step3EventDrivenActivity_Finish.Name = "step3EventDrivenActivity_Finish"; // // step3StateInitializationActivity // this.step3StateInitializationActivity.Activities.Add(this.step3WizardFormActivity); this.step3StateInitializationActivity.Name = "step3StateInitializationActivity"; // // showErrorEventDrivenActivity_Finish // this.showErrorEventDrivenActivity_Finish.Activities.Add(this.finishHandleExternalEventActivity2); this.showErrorEventDrivenActivity_Finish.Activities.Add(this.setStateActivity8); this.showErrorEventDrivenActivity_Finish.Name = "showErrorEventDrivenActivity_Finish"; // // showErrorStateInitializationActivity // this.showErrorStateInitializationActivity.Activities.Add(this.showErrorCodeActivity_Initialize); this.showErrorStateInitializationActivity.Activities.Add(this.showErrorWizardFormActivity); this.showErrorStateInitializationActivity.Name = "showErrorStateInitializationActivity"; // // step2EventDrivenActivity_Cancel // this.step2EventDrivenActivity_Cancel.Activities.Add(this.cancelHandleExternalEventActivity3); this.step2EventDrivenActivity_Cancel.Activities.Add(this.setStateActivity11); this.step2EventDrivenActivity_Cancel.Name = "step2EventDrivenActivity_Cancel"; // // step2EventDrivenActivity_Next // this.step2EventDrivenActivity_Next.Activities.Add(this.nextHandleExternalEventActivity2); this.step2EventDrivenActivity_Next.Activities.Add(this.step2CodeActivity_Install); this.step2EventDrivenActivity_Next.Activities.Add(this.step2IfElseActivity_DidValidate); this.step2EventDrivenActivity_Next.Name = "step2EventDrivenActivity_Next"; // // step2StateInitializationActivity // this.step2StateInitializationActivity.Activities.Add(this.step2WizardFormActivity); this.step2StateInitializationActivity.Name = "step2StateInitializationActivity"; // // step1EventDrivenActivity_Cancel // this.step1EventDrivenActivity_Cancel.Activities.Add(this.cancelHandleExternalEventActivity2); this.step1EventDrivenActivity_Cancel.Activities.Add(this.setStateActivity10); this.step1EventDrivenActivity_Cancel.Name = "step1EventDrivenActivity_Cancel"; // // step1EventDrivenActivity_Next // this.step1EventDrivenActivity_Next.Activities.Add(this.nextHandleExternalEventActivity1); this.step1EventDrivenActivity_Next.Activities.Add(this.step1CodeActivity_ValidateInstallation); this.step1EventDrivenActivity_Next.Activities.Add(this.ifElseActivity1); this.step1EventDrivenActivity_Next.Name = "step1EventDrivenActivity_Next"; // // step1StateInitializationActivity // this.step1StateInitializationActivity.Activities.Add(this.step1WizardFormActivity); this.step1StateInitializationActivity.Name = "step1StateInitializationActivity"; // // initializeStateInitializationActivity // this.initializeStateInitializationActivity.Activities.Add(this.initializeCodeActivity_Initialize); this.initializeStateInitializationActivity.Activities.Add(this.setStateActivity2); this.initializeStateInitializationActivity.Name = "initializeStateInitializationActivity"; // // setStateActivity1 // this.setStateActivity1.Name = "setStateActivity1"; this.setStateActivity1.TargetStateName = "cleanupStateActivity"; // // cancelHandleExternalEventActivity1 // this.cancelHandleExternalEventActivity1.EventName = "Cancel"; this.cancelHandleExternalEventActivity1.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.cancelHandleExternalEventActivity1.Name = "cancelHandleExternalEventActivity1"; // // cleanupStateActivity // this.cleanupStateActivity.Activities.Add(this.cleanupStateInitializationActivity); this.cleanupStateActivity.Name = "cleanupStateActivity"; // // step3StateActivity // this.step3StateActivity.Activities.Add(this.step3StateInitializationActivity); this.step3StateActivity.Activities.Add(this.step3EventDrivenActivity_Finish); this.step3StateActivity.Name = "step3StateActivity"; // // showErrorStateActivity // this.showErrorStateActivity.Activities.Add(this.showErrorStateInitializationActivity); this.showErrorStateActivity.Activities.Add(this.showErrorEventDrivenActivity_Finish); this.showErrorStateActivity.Name = "showErrorStateActivity"; // // step2StateActivity // this.step2StateActivity.Activities.Add(this.step2StateInitializationActivity); this.step2StateActivity.Activities.Add(this.step2EventDrivenActivity_Next); this.step2StateActivity.Activities.Add(this.step2EventDrivenActivity_Cancel); this.step2StateActivity.Name = "step2StateActivity"; // // step1StateActivity // this.step1StateActivity.Activities.Add(this.step1StateInitializationActivity); this.step1StateActivity.Activities.Add(this.step1EventDrivenActivity_Next); this.step1StateActivity.Activities.Add(this.step1EventDrivenActivity_Cancel); this.step1StateActivity.Name = "step1StateActivity"; // // finalStateActivity // this.finalStateActivity.Name = "finalStateActivity"; // // initializeStateActivity // this.initializeStateActivity.Activities.Add(this.initializeStateInitializationActivity); this.initializeStateActivity.Name = "initializeStateActivity"; // // eventDrivenActivity_GlobalCancel // this.eventDrivenActivity_GlobalCancel.Activities.Add(this.cancelHandleExternalEventActivity1); this.eventDrivenActivity_GlobalCancel.Activities.Add(this.setStateActivity1); this.eventDrivenActivity_GlobalCancel.Name = "eventDrivenActivity_GlobalCancel"; // // InstallLocalPackageWorkflow // this.Activities.Add(this.eventDrivenActivity_GlobalCancel); this.Activities.Add(this.initializeStateActivity); this.Activities.Add(this.finalStateActivity); this.Activities.Add(this.step1StateActivity); this.Activities.Add(this.step2StateActivity); this.Activities.Add(this.showErrorStateActivity); this.Activities.Add(this.step3StateActivity); this.Activities.Add(this.cleanupStateActivity); this.CompletedStateName = "finalStateActivity"; this.DynamicUpdateCondition = null; this.InitialStateName = "initializeStateActivity"; this.Name = "InstallLocalPackageWorkflow"; this.CanModifyActivities = false; }
private void AddOrderOnHoldState() { // Get a reference to the WorkflowInstance for the selected workflow WorkflowInstance instance = this.runtime.GetWorkflow(this.GetSelectedWorkflowInstanceID()); // Get a reference to the root activity for the workflow Activity root = instance.GetWorkflowDefinition(); // Create a new instance of the WorkflowChanges class for managing // the in-memory changes to the workflow WorkflowChanges changes = new WorkflowChanges(root); // Create a new State activity to the workflow StateActivity orderOnHoldState = new StateActivity(); orderOnHoldState.Name = "OrderOnHoldState"; // Add a new EventDriven activity to the State EventDrivenActivity eventDrivenDelay = new EventDrivenActivity(); eventDrivenDelay.Name = "DelayOrderEvent"; orderOnHoldState.Activities.Add(eventDrivenDelay); // Add a new Delay, initialized to 5 seconds DelayActivity delayOrder = new DelayActivity(); delayOrder.Name = "delayOrder"; delayOrder.TimeoutDuration = new TimeSpan(0, 0, 5); eventDrivenDelay.Activities.Add(delayOrder); // Add a new SetState to the OrderOpenState SetStateActivity setStateOrderOpen = new SetStateActivity(); setStateOrderOpen.TargetStateName = "OrderOpenState"; eventDrivenDelay.Activities.Add(setStateOrderOpen); // Add the OnHoldState to the workflow changes.TransientWorkflow.Activities.Add(orderOnHoldState); // Apply the changes to the workflow instance try { instance.ApplyWorkflowChanges(changes); } catch (WorkflowValidationFailedException) { // New state has already been added MessageBox.Show("On Hold state has already been added to this workflow."); } }
private void InitializeComponent () { CanModifyActivities = true; CodeCondition codecondition1 = new CodeCondition (); ProofReadSetStateQualityNotOK = new SetStateActivity (); ProofReadSetStateQualityOK = new SetStateActivity (); ProofReadElseBranchActivity2 = new IfElseBranchActivity (); ProofReadElseBranch = new IfElseBranchActivity (); PrintFinalizationCode = new CodeActivity (); PrintSetState = new SetStateActivity (); PrintCode = new CodeActivity (); PrintDelay = new DelayActivity (); ProofReadIfElse = new IfElseActivity (); ProofReadDelay = new DelayActivity (); CreateInitCode = new CodeActivity (); DocumentSetState = new SetStateActivity (); CodeDocument = new CodeActivity (); CreateDelay = new DelayActivity (); PrintFinalization = new StateFinalizationActivity (); PrintEventDriven = new EventDrivenActivity (); ProofReadEventDriven = new EventDrivenActivity (); CreateInitialization = new StateInitializationActivity (); CreateDriven = new EventDrivenActivity (); End = new StateActivity (); Print = new StateActivity (); ProofRead = new StateActivity (); Create = new StateActivity (); // ProofReadSetStateQualityNotOK ProofReadSetStateQualityNotOK.Name = "ProofReadSetStateQualityNotOK"; ProofReadSetStateQualityNotOK.TargetStateName = "Print"; // ProofReadSetStateQualityOK ProofReadSetStateQualityOK.Name = "ProofReadSetStateQualityOK"; ProofReadSetStateQualityOK.TargetStateName = "End"; // ProofReadElseBranchActivity2 ProofReadElseBranchActivity2.Activities.Add (ProofReadSetStateQualityNotOK); ProofReadElseBranchActivity2.Name = "ProofReadElseBranchActivity2"; // ProofReadElseBranch ProofReadElseBranch.Activities.Add (ProofReadSetStateQualityOK); codecondition1.Condition += new EventHandler <ConditionalEventArgs> (ProofReadIfElseConditionFunction); ProofReadElseBranch.Condition = codecondition1; ProofReadElseBranch.Name = "ProofReadElseBranch"; // PrintFinalizationCode PrintFinalizationCode.Name = "PrintFinalizationCode"; PrintFinalizationCode.ExecuteCode += new EventHandler (PrintFinalizationCodeFunction); // PrintSetState PrintSetState.Name = "PrintSetState"; PrintSetState.TargetStateName = "End"; // PrintCode PrintCode.Name = "PrintCode"; PrintCode.ExecuteCode += new EventHandler (PrintCodeFunction); // PrintDelay PrintDelay.Name = "PrintDelay"; PrintDelay.TimeoutDuration = TimeSpan.Parse ("00:00:02"); // ProofReadIfElse ProofReadIfElse.Activities.Add (ProofReadElseBranch); ProofReadIfElse.Activities.Add (ProofReadElseBranchActivity2); ProofReadIfElse.Description = "Quality is OK?"; ProofReadIfElse.Name = "ProofReadIfElse"; // ProofReadDelay ProofReadDelay.Name = "ProofReadDelay"; ProofReadDelay.TimeoutDuration = TimeSpan.Parse ("00:00:01"); // CreateInitCode CreateInitCode.Name = "CreateInitCode"; CreateInitCode.ExecuteCode += new EventHandler (CreateInitCodeFunction); // DocumentSetState DocumentSetState.Name = "DocumentSetState"; DocumentSetState.TargetStateName = "ProofRead"; // CodeDocument CodeDocument.Name = "CodeDocument"; CodeDocument.ExecuteCode += new EventHandler (CodeDocumentFunction); // CreateDelay CreateDelay.Name = "CreateDelay"; CreateDelay.TimeoutDuration = TimeSpan.Parse ("00:00:01"); // PrintFinalization PrintFinalization.Activities.Add (PrintFinalizationCode); PrintFinalization.Name = "PrintFinalization"; // PrintEventDriven PrintEventDriven.Activities.Add (PrintDelay); PrintEventDriven.Activities.Add (PrintCode); PrintEventDriven.Activities.Add (PrintSetState); PrintEventDriven.Name = "PrintEventDriven"; // ProofReadEventDriven ProofReadEventDriven.Activities.Add (ProofReadDelay); ProofReadEventDriven.Activities.Add (ProofReadIfElse); ProofReadEventDriven.Name = "ProofReadEventDriven"; // CreateInitialization CreateInitialization.Activities.Add (CreateInitCode); CreateInitialization.Name = "CreateInitialization"; // CreateDriven CreateDriven.Activities.Add (CreateDelay); CreateDriven.Activities.Add (CodeDocument); CreateDriven.Activities.Add (DocumentSetState); CreateDriven.Name = "CreateDriven"; // End End.Name = "End"; // Print Print.Activities.Add (PrintEventDriven); Print.Activities.Add (PrintFinalization); Print.Name = "Print"; // ProofRead ProofRead.Activities.Add (ProofReadEventDriven); ProofRead.Name = "ProofRead"; // Create Create.Activities.Add (CreateDriven); Create.Activities.Add (CreateInitialization); Create.Name = "Create"; // DocumentCreation Activities.Add (Create); Activities.Add (ProofRead); Activities.Add (Print); Activities.Add (End); CompletedStateName = "End"; InitialStateName = "Create"; Name = "DocumentCreation"; CanModifyActivities = false; }
private void InitializeComponent() { this.CanModifyActivities = true; System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition(); this.faultHandlersActivity1 = new System.Workflow.ComponentModel.FaultHandlersActivity(); this.setStateActivity6 = new System.Workflow.Activities.SetStateActivity(); this.setStateActivity5 = new System.Workflow.Activities.SetStateActivity(); this.savePackageCodeActivity = new System.Workflow.Activities.CodeActivity(); this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity1 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseActivity1 = new System.Workflow.Activities.IfElseActivity(); this.nextHandleExternalEventActivity2 = new Composite.C1Console.Workflow.Activities.NextHandleExternalEventActivity(); this.setStateActivity4 = new System.Workflow.Activities.SetStateActivity(); this.cancelHandleExternalEventActivity1 = new Composite.C1Console.Workflow.Activities.CancelHandleExternalEventActivity(); this.wizardFormActivity1 = new Composite.C1Console.Workflow.Activities.WizardFormActivity(); this.packageInfoCodeActivity = new System.Workflow.Activities.CodeActivity(); this.setStateActivity2 = new System.Workflow.Activities.SetStateActivity(); this.NextDrivenActivity1 = new System.Workflow.Activities.EventDrivenActivity(); this.CancelDrivenActivity2 = new System.Workflow.Activities.EventDrivenActivity(); this.packageInfoInitialization = new System.Workflow.Activities.StateInitializationActivity(); this.setStateActivity1 = new System.Workflow.Activities.SetStateActivity(); this.cancelHandleExternalEventActivity2 = new Composite.C1Console.Workflow.Activities.CancelHandleExternalEventActivity(); this.stateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.packageInfoState = new System.Workflow.Activities.StateActivity(); this.globalCancelEventDrivenActivity = new System.Workflow.Activities.EventDrivenActivity(); this.finalState = new System.Workflow.Activities.StateActivity(); this.initializationState = new System.Workflow.Activities.StateActivity(); // // faultHandlersActivity1 // this.faultHandlersActivity1.Name = "faultHandlersActivity1"; // // setStateActivity6 // this.setStateActivity6.Name = "setStateActivity6"; this.setStateActivity6.TargetStateName = "packageInfoState"; // // setStateActivity5 // this.setStateActivity5.Name = "setStateActivity5"; this.setStateActivity5.TargetStateName = "finalState"; // // savePackageCodeActivity // this.savePackageCodeActivity.Name = "savePackageCodeActivity"; this.savePackageCodeActivity.ExecuteCode += new System.EventHandler(this.saveInfoCodeActivity_ExecuteCode); // // ifElseBranchActivity2 // this.ifElseBranchActivity2.Activities.Add(this.setStateActivity6); this.ifElseBranchActivity2.Activities.Add(this.faultHandlersActivity1); this.ifElseBranchActivity2.Name = "ifElseBranchActivity2"; // // ifElseBranchActivity1 // this.ifElseBranchActivity1.Activities.Add(this.savePackageCodeActivity); this.ifElseBranchActivity1.Activities.Add(this.setStateActivity5); codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.ValidateSave); this.ifElseBranchActivity1.Condition = codecondition1; this.ifElseBranchActivity1.Name = "ifElseBranchActivity1"; // // ifElseActivity1 // this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity1); this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity2); this.ifElseActivity1.Name = "ifElseActivity1"; // // nextHandleExternalEventActivity2 // this.nextHandleExternalEventActivity2.EventName = "Next"; this.nextHandleExternalEventActivity2.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.nextHandleExternalEventActivity2.Name = "nextHandleExternalEventActivity2"; // // setStateActivity4 // this.setStateActivity4.Name = "setStateActivity4"; this.setStateActivity4.TargetStateName = "finalState"; // // cancelHandleExternalEventActivity1 // this.cancelHandleExternalEventActivity1.EventName = "Cancel"; this.cancelHandleExternalEventActivity1.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.cancelHandleExternalEventActivity1.Name = "cancelHandleExternalEventActivity1"; // // wizardFormActivity1 // this.wizardFormActivity1.ContainerLabel = null; this.wizardFormActivity1.FormDefinitionFileName = "\\InstalledPackages\\Composite.Tools.PackageCreator\\CreatePackage.xml"; this.wizardFormActivity1.Name = "wizardFormActivity1"; // // packageInfoCodeActivity // this.packageInfoCodeActivity.Name = "packageInfoCodeActivity"; this.packageInfoCodeActivity.ExecuteCode += new System.EventHandler(this.packageInfoCodeActivity_ExecuteCode); // // setStateActivity2 // this.setStateActivity2.Name = "setStateActivity2"; this.setStateActivity2.TargetStateName = "packageInfoState"; // // NextDrivenActivity1 // this.NextDrivenActivity1.Activities.Add(this.nextHandleExternalEventActivity2); this.NextDrivenActivity1.Activities.Add(this.ifElseActivity1); this.NextDrivenActivity1.Name = "NextDrivenActivity1"; // // CancelDrivenActivity2 // this.CancelDrivenActivity2.Activities.Add(this.cancelHandleExternalEventActivity1); this.CancelDrivenActivity2.Activities.Add(this.setStateActivity4); this.CancelDrivenActivity2.Name = "CancelDrivenActivity2"; // // packageInfoInitialization // this.packageInfoInitialization.Activities.Add(this.packageInfoCodeActivity); this.packageInfoInitialization.Activities.Add(this.wizardFormActivity1); this.packageInfoInitialization.Name = "packageInfoInitialization"; // // setStateActivity1 // this.setStateActivity1.Name = "setStateActivity1"; this.setStateActivity1.TargetStateName = "finalState"; // // cancelHandleExternalEventActivity2 // this.cancelHandleExternalEventActivity2.EventName = "Cancel"; this.cancelHandleExternalEventActivity2.InterfaceType = typeof(Composite.C1Console.Workflow.IFormsWorkflowEventService); this.cancelHandleExternalEventActivity2.Name = "cancelHandleExternalEventActivity2"; // // stateInitializationActivity // this.stateInitializationActivity.Activities.Add(this.setStateActivity2); this.stateInitializationActivity.Name = "stateInitializationActivity"; // // packageInfoState // this.packageInfoState.Activities.Add(this.packageInfoInitialization); this.packageInfoState.Activities.Add(this.CancelDrivenActivity2); this.packageInfoState.Activities.Add(this.NextDrivenActivity1); this.packageInfoState.Name = "packageInfoState"; // // globalCancelEventDrivenActivity // this.globalCancelEventDrivenActivity.Activities.Add(this.cancelHandleExternalEventActivity2); this.globalCancelEventDrivenActivity.Activities.Add(this.setStateActivity1); this.globalCancelEventDrivenActivity.Name = "globalCancelEventDrivenActivity"; // // finalState // this.finalState.Name = "finalState"; // // initializationState // this.initializationState.Activities.Add(this.stateInitializationActivity); this.initializationState.Name = "initializationState"; // // CreatePackageWorkflow // this.Activities.Add(this.initializationState); this.Activities.Add(this.finalState); this.Activities.Add(this.globalCancelEventDrivenActivity); this.Activities.Add(this.packageInfoState); this.CompletedStateName = "finalState"; this.DynamicUpdateCondition = null; this.InitialStateName = "initializationState"; this.Name = "CreatePackageWorkflow"; this.CanModifyActivities = false; }
private static bool ValidateMultipleIEventActivity(EventDrivenActivity eventDriven, ValidationErrorCollection validationErrors) { IEventActivity firstEventActivity = null; if (eventDriven.EnabledActivities.Count > 0) { firstEventActivity = eventDriven.EnabledActivities[0] as IEventActivity; } return ValidateMultipleIEventActivityInCompositeActivity(eventDriven, firstEventActivity, eventDriven, validationErrors); }
private void InitializeComponent() { this.CanModifyActivities = true; this.setStateActivity2 = new System.Workflow.Activities.SetStateActivity(); this.delayActivity = new System.Workflow.Activities.DelayActivity(); this.refreshCodeActivity = new System.Workflow.Activities.CodeActivity(); this.setStateActivity1 = new System.Workflow.Activities.SetStateActivity(); this.delayBeforeStart = new System.Workflow.Activities.DelayActivity(); this.stateInitializationCodeActivity = new System.Workflow.Activities.CodeActivity(); this.timerEventDrivenActivity = new System.Workflow.Activities.EventDrivenActivity(); this.refreshStateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.delayBeforeStartActivity = new System.Workflow.Activities.EventDrivenActivity(); this.stateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.finishStateActivity = new System.Workflow.Activities.StateActivity(); this.refreshStateActivity = new System.Workflow.Activities.StateActivity(); this.refreshInitialState = new System.Workflow.Activities.StateActivity(); // // setStateActivity2 // this.setStateActivity2.Name = "setStateActivity2"; this.setStateActivity2.TargetStateName = "refreshStateActivity"; // // delayActivity // this.delayActivity.Name = "delayActivity"; this.delayActivity.TimeoutDuration = System.TimeSpan.Parse("00:01:00"); // // refreshCodeActivity // this.refreshCodeActivity.Name = "refreshCodeActivity"; this.refreshCodeActivity.ExecuteCode += new System.EventHandler(this.refreshCodeActivity_ExecuteCode); // // setStateActivity1 // this.setStateActivity1.Name = "setStateActivity1"; this.setStateActivity1.TargetStateName = "refreshStateActivity"; // // delayBeforeStart // this.delayBeforeStart.Name = "delayBeforeStart"; this.delayBeforeStart.TimeoutDuration = System.TimeSpan.Parse("00:00:01"); // // stateInitializationCodeActivity // this.stateInitializationCodeActivity.Name = "stateInitializationCodeActivity"; this.stateInitializationCodeActivity.ExecuteCode += new System.EventHandler(this.stateInitializationCodeActivity_ExecuteCode); // // timerEventDrivenActivity // this.timerEventDrivenActivity.Activities.Add(this.delayActivity); this.timerEventDrivenActivity.Activities.Add(this.setStateActivity2); this.timerEventDrivenActivity.Name = "timerEventDrivenActivity"; // // refreshStateInitializationActivity // this.refreshStateInitializationActivity.Activities.Add(this.refreshCodeActivity); this.refreshStateInitializationActivity.Name = "refreshStateInitializationActivity"; // // delayBeforeStartActivity // this.delayBeforeStartActivity.Activities.Add(this.delayBeforeStart); this.delayBeforeStartActivity.Activities.Add(this.setStateActivity1); this.delayBeforeStartActivity.Name = "delayBeforeStartActivity"; // // stateInitializationActivity // this.stateInitializationActivity.Activities.Add(this.stateInitializationCodeActivity); this.stateInitializationActivity.Name = "stateInitializationActivity"; // // finishStateActivity // this.finishStateActivity.Name = "finishStateActivity"; // // refreshStateActivity // this.refreshStateActivity.Activities.Add(this.refreshStateInitializationActivity); this.refreshStateActivity.Activities.Add(this.timerEventDrivenActivity); this.refreshStateActivity.Name = "refreshStateActivity"; // // refreshInitialState // this.refreshInitialState.Activities.Add(this.stateInitializationActivity); this.refreshInitialState.Activities.Add(this.delayBeforeStartActivity); this.refreshInitialState.Name = "refreshInitialState"; // // RefreshWorkflow // this.Activities.Add(this.refreshInitialState); this.Activities.Add(this.refreshStateActivity); this.Activities.Add(this.finishStateActivity); this.CompletedStateName = "finishStateActivity"; this.DynamicUpdateCondition = null; this.InitialStateName = "refreshInitialState"; this.Name = "RefreshWorkflow"; this.CanModifyActivities = false; }
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; }