This code provides a very basic DSL for workflow definitions.
An example workflow can be found in Workflow.hs. Some actions are pre-defined in Jobsteps.hs.
You can evaluate the workflow and dump its declarative format (the data-structures defining the workflow) like this:
$ ghci
λ :load Workflow.hs
[1 of 3] Compiling WorkflowEngine ( WorkflowEngine.hs, interpreted )
...
[2 of 3] Compiling Jobsteps ( Jobsteps.hs, interpreted )
...
[3 of 3] Compiling Workflow ( Workflow.hs, interpreted )
Ok, modules loaded: Workflow, WorkflowEngine, Jobsteps.
λ printWorkflow deployAndStart
...
LaunchJob 0 "createDiskClone" [VResultValue WorkflowArguments "templateName"]
LogValues "Created clone" [VResultValue (ActionResult 0) "cloneName",VInt 123]
LaunchJob 1 "exposeISCSI" [VResultValue (ActionResult 0) "cloneID"]
LaunchJob 2 "createMachine" [VResultValue WorkflowArguments "templateName",VResultValue (ActionResult 1) "targetID"]
LogValues "Created machine" [VResultValue (ActionResult 2) "machineID",VString "Just a value"]
LaunchJob 3 "startMachine" [VResultValue (ActionResult 2) "machineID"]
LogValues "Machine started" [VResultValue (ActionResult 2) "machineName"]
LaunchJob 4 "sendEmail" [VString "nicolas incubaid com",VString "A new machine was created!"]