locked
WorkflowDesigner and communicating with the activity designers RRS feed

  • Question

  • I have a rehoster that can connect to different environments (dev, test, prod, etc).  When a workflow is loaded the activity designers need to be informed of the environment they are to communicate - for example to load combo boxes with names.  Does anyone know how to communicate with the activity designers of each activity contained in the workflow?

    I was planning on "pushing" the environment down to the activities via an interface.  If it is easier / better for the activity designers to "pull" it from the workflow designer that is hosting them I am all ears... 

    Thank you,

    John

    Tuesday, July 12, 2011 1:54 PM

Answers

  • Hi John,
    One reason I think it would probably be better for the activity designers to "pull" rather than to try to "push" to them is that activity designer creation (instantiation) is dynamic, and potentially any time during the lifetime of your rehoster. A second issue is that there is no existing 'hook' which gives you insight into when the creation happens.

    One way you could 'publish' information for designers to pull would be to leverage WorkflowDesigner.Context.Services and add your own EnvironmentService to this collection.
    Tim



    • Marked as answer by John Hennesey Tuesday, July 12, 2011 8:10 PM
    Tuesday, July 12, 2011 8:06 PM

All replies

  • Hi John,
    One reason I think it would probably be better for the activity designers to "pull" rather than to try to "push" to them is that activity designer creation (instantiation) is dynamic, and potentially any time during the lifetime of your rehoster. A second issue is that there is no existing 'hook' which gives you insight into when the creation happens.

    One way you could 'publish' information for designers to pull would be to leverage WorkflowDesigner.Context.Services and add your own EnvironmentService to this collection.
    Tim



    • Marked as answer by John Hennesey Tuesday, July 12, 2011 8:10 PM
    Tuesday, July 12, 2011 8:06 PM
  • Cool - I will give that a shot.  Thanks!

    Edit: This is exactly what I was looking for.  For anyone else who stumbles upon this post I found a great piece of documentation that shows just how easy this is to do.

    http://msdn.microsoft.com/en-us/library/gg281626.aspx

    Tuesday, July 12, 2011 8:10 PM