locked
Finding Activities In A FlowChart In WF4 ? RRS feed

  • Question

  • HI,

        Can we find alll the activities in a flowchart,so that i can show then in a list,if possible is there any way to display the in and out arguments of the activity selected in the above mentioned list ?

    Any Help appreciated.

    Thank you

    Ramu


    • Edited by RamuNeST Friday, September 23, 2011 4:18 AM
    Friday, September 23, 2011 4:18 AM

Answers

  • Hi Ramu,

    workflow designer has a property called "Text".

    which gives you complete workflow in XAML format (actually XML format).

    You can use XmlDocument object to read this XAML and get the information you want. I think it contains all the information you need.

    Here is the link for more information on Text property.

    WorkflowDesigner.Text

    XmlDocument objDoc = new XmlDocument(WorkflowDesigner.Text);

     

    http://msdn.microsoft.com/en-us/library/system.activities.presentation.workflowdesigner.text.aspx 

     

    I think this will help you.

    Thanks


    MB
    • Proposed as answer by MadhurBhardwaj Friday, September 23, 2011 8:47 AM
    • Marked as answer by LeoTang Thursday, September 29, 2011 2:08 AM
    Friday, September 23, 2011 8:47 AM

All replies

  • Hi Ramu,

    workflow designer has a property called "Text".

    which gives you complete workflow in XAML format (actually XML format).

    You can use XmlDocument object to read this XAML and get the information you want. I think it contains all the information you need.

    Here is the link for more information on Text property.

    WorkflowDesigner.Text

    XmlDocument objDoc = new XmlDocument(WorkflowDesigner.Text);

     

    http://msdn.microsoft.com/en-us/library/system.activities.presentation.workflowdesigner.text.aspx 

     

    I think this will help you.

    Thanks


    MB
    • Proposed as answer by MadhurBhardwaj Friday, September 23, 2011 8:47 AM
    • Marked as answer by LeoTang Thursday, September 29, 2011 2:08 AM
    Friday, September 23, 2011 8:47 AM
  • Hi Madhur ,

    Thank you for your Reply,How can we identify the data corresponding to a particular activity in the workflowdesigner using workflow designer text.What i have done is i convert that text into a dataset .

     

    Awaiting response.

    Thank you

    Thursday, September 29, 2011 6:48 AM
  • If you're in WorkflowDesigner, then you could find the flowchart by navigating the model tree from the current selection, and call WorkflowInspectionServices.GetActivities() or ModelService.Find() to get a list of child activities/their model items. Arguments should also be findable by navigating the model tree or using ModelService.Find().
    Tim

    Wednesday, October 5, 2011 1:46 AM