Workflow switch activity

Topics: Administration, General
Dec 19, 2014 at 9:45 PM
Is there an existing (built-in or 3rd party module) way to do a switch statement in a workflow? I'd like to be able to configure the switch activity with a token to inspect and then send it down one of a series of branches based on the value of the token.

An example would be a custom form where you want to send one of several different email notifications depending no the value of a field on the submitted form.

I'll attempt to build one myself if necessary, but wanted to check and make sure someone hasn't already done it or there isn't a way to do it with the existing workflow activities.

Dec 19, 2014 at 10:15 PM
Edited Dec 19, 2014 at 10:16 PM
There's no such activity as far as I know, but perhaps it's not really necessary since it's easy to use the Decision activity, which let's you use C# code, which means you could implement a switch block there. The activity supports tokens, lets you defined multiple possible outcomes, and provides a method to set the actual outcome. It has everything you need.

PS. The Decision activity is provided by the C# Scripting feature.