(+N) Consulting Inc.

Consulting | Software Solutions | Training

Workflow Custom Activity - Designer re-hosting

In developing some workflow stuff, ran across the need to create custom activities that "aggregate" other atomic activities into a larger activity. The idea is that Programmer codes some atomic activities, exposes appropriate Dependency Properties Non programmer Uses these atomics and creates processes using the atomic compiled activities Saves these composite activities as a new custom activity Can expose specific parameters for inner activities, but otherwise the activity is "locked" for the end user. End user Uses the composite activities to define a workflow and run it. Can bind runtime paramet... [More]

Workflow custom Loop Activity

I was doing some workflow work and wanted to create a custom loop activity. The project needs it, and it's a great way to learn what (not) to do. The activity is a container that would loop through a list of discrete items (think foreach(string currentValue in ValueList)) and exposes the current loop variable via a bindable DependencyProperty. The basics of the activity are to keep the container in "Executing" mode until all child activities are done. The tricky part is that the whole ActivityExecutionContext and ExecutionContextManager need to create for a new context each loop iteration. The hookup of the synchronization is done by using Activity.RegisterForStatusChange(.., OnEvent) on each child executed, t... [More]