Structure of a Workflow

There are some basic rules that workflows have to follow.

  1. "Workflows" are folders inside the workflow root folder.

  2. The main configuration file for each workflow is _wfconfig.ps1. This name cannot be changed.

  3. Some data is stored in the sub folder _wfdata. Ths name cannot be changed. It is not important to keep this folder. Everything in it can get lost. It contains "last run" timestamps and a serialized version of _wfconfig.ps1.

  4. The workflow folder contains a workflow script. It's name can be configured in the _wfconfig.ps1.

  5. In case of "state machine workflows" there can be one or more workflow state scripts. All of them start with "S_", but the name can be configured in _wfconfig.ps1.

  6. For SharePoint workflows you can have a "pre query" script in the workflow folder. It's usage and name is configured in _wfconfig.ps1.

  7. For all workflows except "PowerShell" workflows you can have a separate "error handling" script that is executed in case of unhandled errors. It's usage an name is configured in _wfconfig.ps1.

  8. When using the kenaflow embedded workflow templates you will have these files additionally. They can be removed.

  1. You can have other files in the workflow folder - as you want.

Discussion