I have created some sample External Activities which successful execute when called from the workflow activities in my Visio diagram. My code in my External Activity looks a bit like this:
AssemblyTbbId = "tcm:2010-21343-2048" Type = "Net.SDLTridion.Workflow.CheckForDispatching"
This calls the
Execute() method of my
CheckForDispatching class. At the moment I really need to implement a new class for every activity in my workflow process definition. I would really like to parameterize my calls to my classes, so I could have more reusable code. Essentially I would like to be able to achieve something like the following for a decision activity:
Execute Method: Execute(String activityIfTrue, String activityIfFalse)….
Is there a way to add some parameters to my Execute() method from within the same activity. The only way I can think to do this is make an additional automated activity which executes before my external activity which looks a bit like this:
ProcessInstance.Variables.Add("activityIfTrue", “Activity Name 1”); ProcessInstance.Variables.Add("activityIfFalse", “Activity Name 2”);
These could then be read from the external activity class in the subsequent step. This feels like a very long winded approach, and I am hoping someone can suggest a better way.