private void OnIsUserAcceptedChanged(object sender, EventArgs e)
        {
            var guidanceNode = sender as IConditionalNode;

            if (guidanceNode != null)
            {
                BlackboardManager.Current.Set(BlackboardWorkflowBinder.UserAcceptedKey(feature, guidanceNode), guidanceNode.IsUserAccepted.ToString());
            }
        }
        private void OnNodeStateChanged(object sender, EventArgs e)
        {
            var guidanceNode = sender as IConditionalNode;

            if (guidanceNode != null)
            {
                BlackboardManager.Current.Set(BlackboardWorkflowBinder.StateOverrideKey(feature, guidanceNode), guidanceNode.HasStateOverride.ToString());
            }
        }
        /// <summary>
        /// Called to create the workflow.
        /// </summary>
        /// <returns></returns>
        protected internal override IGuidanceWorkflow OnCreateWorkflow()
        {
            var workflow = new TGeneratedWorkflow();

            this.GuidanceComposition.SatisfyImportsOnce(workflow);
            workflow.OwningExtension = this;
            workflow.Initialize();

            this.binder = new BlackboardWorkflowBinder(this, workflow);
            return(workflow);
        }
        private void OnHasStateOverrideChanged(object sender, EventArgs e)
        {
            // If the override property changed, it means the state has
            // been just overriden (HasStateOverride = true), in which
            // case we do nothing as the OnNodeStateChanged would have
            // caught it already. If it's false, then we have to clear
            // the overriden state from storage.
            var guidanceNode = sender as IConditionalNode;

            if (guidanceNode != null && !guidanceNode.HasStateOverride)
            {
                BlackboardManager.Current.Set(BlackboardWorkflowBinder.StateOverrideKey(feature, guidanceNode), guidanceNode.State.ToString());
            }
        }