Hi Fraser,
There is a way to 'plug-in code' into Workflow Manager when various events happen. Its a bit tricky but not too complicated. It involves Workflow Manager Notifications. For each Job Activity that Workflow Manager records (as Job History), there is a corresponding Job Notification that Workflow Manager also fires. For example, assigning a Job to someone causes Workflow Manager to add a Job History/Activity record, plus we fire a corresponding Job Notification IF there are subscribers to that notification.
What you need to do is to implement your own Workflow Manager compatible notification engine. Implement some of our interfaces (IJTXNotifier, IJTXMailNotifier), register your code/class as COM, and 'register' your class with Workflow Manager as the default notifier. Once that is done, Workflow Manager invokes the IJTXNotifier.Send method on your class with an IJTXNotification object each time a corresponding event happens. The IJTXNotification object has a Type property that tells you the event was (JobAssigned, JobClosed, et cetera). Here comes the ugly part: Besides the event Type, your code would also need to know the Job that this event is happening on. The only way to know that is to include the [JOB:ID] token into the notification subject/body and then parse the subject/body that Workflow Managers sends to your custom notifier.
If your custom plugged-in code needs to do something business-specific plus send out an email, you can make use of our out-of-the-box notifier. Just invoke our notifier at the end after whatever custom stuff you needed to do.
Does this help?
Thanks,
Raghu