Starting with Workflow
Workflow is automatization of processes in system.
Basic priciple
How does it work?
Workflow functionality uses server module that is watching change (create,update) on objects. If some change matches with workflow setting, workflow will run it's actions.
A different kind is time-managed workflow. Admin will set period, how often will be workflow lanunched. It will take all objects that match the filter in workflow setting and run actions assigned to it.
Workflow Setting structure
Each workflow contains name, description and important switch "Workflow is active", which makes workflow enabled/disabled.
There are three types of workflow settings:
- At Update - workflow is checked, when some object is changing
- At Create - worfklow is checked, when some object is creating
- Managed by time - workflow runs in some period, which will pick object that fits to filter
At update
Workflow setting is composed from:
- Filter after change
- Chagned fields
- Filter before change
- Actions
At create
Workflow setting is composed from
- Filter
- Actions
Managed by time
Workflow setting is composed from:
- Filter
- Execution interval
- Actions
How does it really workswork
Base of all is object like Timesheet, Project, Folder, Task etc. Each object is assigned to some module. Eg. Timesheet is in module scheduler, Folder is in module Project and so on. These objects defines, what filters can be used for filtering.
Workflow Example
Best practice on how to explain workflow behavior is to show example on it.
Workflow is based on: change -> call action.
As an examle we will set-up workflow: if project type "Sales opportunity" under folder "Client" changes status to "Won" (from state "In process") we need to switch "Client" status to "Active" (from status "Potential") and create new project "Project realization".
In order to execute this process we will split workflow into two workflow steps:
- "Won" Sales opurtunity -> change status of folder "Client" from "Initial" to "Active"
- and status when status of Client is changed to "Active" -> create new project "Project realization"
1. Won Sales opportunity -> change state of folder to "Active"
Create new Workflow setting
click on "Settings" -> "Workflow settings"
Sales opurtunity is project and change state of folder is action. So project is object that will call action for changing state.
Select (module) "project" -> (Item) "Project" and click New. This will show form for editing workflow.
Type name "Sales -> folder in progress" and check "Workflow is active". Let radiobutton "At Update" selected (do not select other radiobutton).
Set filter
In tab "Filter after change":
- Add state filter
- double click on "State" (table on left). This will add new filter condition (new item in table on right). Click into "Value" column and select state "Won"
- Add type filter
- double click on "Type" (table on left). This will add new filter condition (new item in table on right). Click into "Value" column and select type "Sales opurtunity"
In tab "Changed fields":
- Double click on "State" - it means that workflow will react on change of state (otherwise it will react every time, when project is saved, and after this save is project in state "Won")
We now set: If state is changed, project's type is Sales opurtunity and state, which is it switched in, is "Won", call action.
Set action
In tab "Actions:
That's it. We jus created workflow, which will change state of folder, when state of project was chagned. You can test it.
2. In progress -> create project Project realization
Workflow reacts also on chagnes caused by workflow (not only by user). This makes it really strong tool.
Create new Workflow setting
If you closed all windows, than click on Settings -> Workflow settings.
Object, which caused action is folder, because (action) project creation will be called after folder state was changed.
Select (module) project -> (Item) Folder and click New.
Type name "In progress -> create Project realization" and check "Workflow is active". Let radiobutton "At Update" selected (do not select other radiobutton).
Set filter
In tab "Filter after change":
- Add state filter
- double click on "State" (table on left). This will add new filter condition (new item in table on right). Click into "Value" column and select state "Active"
- Add type filter
- double click on "Type" (table on left). This will add new filter condition (new item in table on right). Click into "Value" column and select type "Client"
In tab "Changed fields":
- Double click on "State" - it means that workflow will react on change of state
We now set: If state is changed, folders's type is Client and state, which is it switched in, is "Active", call action.
Set action
In tab "Actions:
So we created workflow, thar reacts on folders change. If folder is swithed into state "Active", new project of type "Project realization" will be created.
And If we have set workflow "Won Sales opurtunity -> change state of folder into In progress", than: If we set project "Sales opurtunity" into state "Won", than folder will be set to "In progress" and new project "Project realization" will be created.