Sync the time of machines ingesting content (e.g. QuickIngest) and watching content creation (e.g. WorkflowTableWatcher).
The WorkflowTableWatcher can only reliably detect new entries when the clock does not differ more than 30 seconds.
Do not install and run WorkflowServer and DPE on the same machine.
When restarting (shutting down) the machine these components will be stopped in a non-deterministic order by the operating system.
If you really want to do this you have to ensure that WorkflowServer will always be stopped first before shutdown.
Avoid conflicts by choosing the right workflow instance titles.
When instantiating a workflow you can choose a title for the instance. Titles influence the concurrency behavior or workflows, a workflow is only instantiated when no other workflow of same type and title is already scheduled or running. If you have workflows that should not run at the same time you can name them accordingly.
Workflow that does thumbnail + proxy generation triggered by TableWatcher: name = "ProcessVideo %tableid% %entryid%"
Same workflow triggered manually from ContentManager (for emergency): use same name.
Reduce load by using "Created" event instead of "Changed" event in TableWatcher (and FolderWatcher).
It is easier to understand when a "Created" event is triggered than it is with a "Changed" event. An executing workflow can lead to triggering the "Change" event when writing to the entry, so you may run into cascades of triggered workflows with "Change" events.
Do not use "*** Any Other Workflow ***" in WorkflowWorker for a productive environment.
This will ensure that only workflows you explicitly allow will be executed (and also has a performance benefit).
Do not set quota for Workflows to 0, delete the workflow template instead.
This has a performance benefit.
Workflow Editor / Developing Workflows
Reduce load by bundling things into 1 workflow instead of many workflows.
Example: we want to create thumbnail, proxy video and index files for an ingested hires video.
Solution: have 1 TableWatcher task triggering 1 workflow that does everything instead of having 3 TableWatcher tasks triggering 3 workflows for each step.
This also avoids "semaphore" metadata that just controls a handshake of workflows, e.g. wf2 is triggered by a specified metadata field set from wf1.
How to use the Log activity inside a workflow.
- Set Category always to "Workflow"
- Set Component always to the name of your workflow (the workflow type)
- If you want to output the CurrentWorkflowId then do it inside the Message part
Do not swallow exceptions because this prevents you from seeing a failed workflow in the WorkflowMonitor.
Only swallow exceptions if the workflow should suceed when a partial step fails.