I'm primarily a c# developer and looking for some guidance (theory and/or code samples) on designing a finite state machine for a series of long running processes. Each operation defined can run for several minutes. I'm simply using the Windows Task Scheduler to manage scheduling and instancing.
Below is a simplified outline of what I'm looking at. So far, I've built the Op Status FSM using Stateless. Now, I'm trying to figure out the best way to handle the sequencing of the operations with some conditions thrown in, such as item #3 shows. These conditions are based on data resulting from Op2.
Options I've consider so far:
OPERATIONS -> NEXT OPERATION IN SEQUENCE
OP STATUS
This really sounds like the specific use case intended for Windows Workflow Foundation. It provides all of the required plumbing to handle this type of scenario, including the ability to persist the workflows, restart them, etc.