Skip to main content

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-settings.png

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 work

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 Time Filters

Sometimes it may be confusing on how the workflow time-based filters work. Below you may find the explanation:

FIlter type Description Example
Day

Filter data in one particular day in past or in the future.

Comparison is <today> +/- number of days = "date" of the record.

You usually run this workflow once each day.

<today> + 30 days = 30 days in the future

<today> -30 days = 30 days in the past

 

<today> - 30 = Last contact date => Create action 30 days after Last contact date (of client).

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":

  1. 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" 
  2. 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":

  1. 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:

  1. Click on button "Show actions settings" (it will show form of all actions for project object)
    1. Click "New"
    2. In right panel type title of new action: "Folder to Active"
    3. Select "Change folder's state" in combobox "Type" (under title) - you can see that form was changed.
    4. Select "Active" in combobox "Set folder to state"
    5. Click save and close window
  2. You can see that our new action is in left panel
    1. Double click on it - it will be added into actions, that will be called from this worklfow settings.
  3. Click on "Save"

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":

  1. 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" 
  2. 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":

  1. 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:

  1. Click on button "Show actions settings" (it will show form of all actions for project object)
    1. Click "New"
    2. In right panel type title of new action: "Create Realization project"
    3. Select "Create project" in combobox "Type" (under title) - you can see that form was changed.
    4. Select "Template" in combobox "Project Realization"
    5. Click save and close window
  2. You can see that our new action is in left panel
    1. Double click on it - it will be added into actions, that will be called from this worklfow settings.
  3. Click on "Save"

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.