Web Client Software Factory - controller class navigation tree

Topics: User Forum
Mar 21, 2007 at 5:41 PM
I'm trying to create a controller class for my pageflow

i made a method that generates a treeview based on the transitions and allows me to navigate trhough the workflow.
the problem is that with the interface IPageFlow i only get access to the transitions name...

since the transitions are based on the EventDrivenActivities in the pages, i was wondering if there's a way to get the "description" property on these activities to my controller class...

any ideias?
Apr 4, 2007 at 1:46 AM
Edited Apr 4, 2007 at 3:13 PM
You will need to write your own implementation of the IPageFlow interface. I would recommend you to copy the following classes in your own assembly/namespace:

  • WorkflowFoundationPageFlowFactory
  • WorkflowFoundationPageFlowProvider
  • WorkflowFoundationPageFlow
Then follow these steps:

  • Change the constructor of WorkflowFoundationPageFlowProvider to create your WorkflowFoundationPageFlowFactory.
  • Change the GetPageFlow method of the WorkflowFoundationPageFlowFactory to create your WorkflowFoundationPageFlow.
  • Add to your new WorkflowFoundationPageFlow this new property:
public ReadOnlyCollection<string> TransitionsDescriptions
       if (!_stateMachineQuery.IsWorkflowQueueDataAvailable())
           throw new PageFlowException(string.Format(CultureInfo.CurrentCulture, Resources.CannotGetTransitions, this.Id));
       List<string> descriptions = new List<string>();
       foreach (Activity activity in _stateMachineQuery.CurrentState.Activities)
           if (activity is EventDrivenActivity)
       return descriptions.AsReadOnly();
  • Change the configuration to use your new provider.
Let me know if this helps,
Ezequiel Jadib