1. Workflow

    Article: AN0002036Updated: 21.09.2018

    Workflow functionality provides possibility of simple and wide implementation of processes and their automation. Particular processes can be created in a fast way by means of designer page. System ObjectGears provides several possibilities to start a workflow: start by means of a button on the toolbar, by means of a rule in the class, by means of a step in the job or by web service call.

    All the areas concerning workflow creation will be described in the following chapters.

    Basic concepts

    Name Description
    Workflow Workflow represents a description of the whole process. It has its graphical representation and can be started.
    Version Each workflow can have an unlimited number of versions. Only one version can be marked as a current one and be started at the given time. All the versions belonging to one workflow shall perform same activity and differ in particular modifications.
    Current version Workflow version that is used when workflow shall start.
    Workflow instance Particular start of particular workflow version. Only enabled workflow with a completely created version can be started.

    Workflow consists of simple elements called activities. These activities can included in the workflow and linked one to another.

    Example of activities: Send email, Start import, Condition

    Task Task is a specific activity type that creates a record in a class designed for workflow tasks. The task is assigned to particular user or group of users that shall complete it. After task completion workflow continues.
    Properties Each workflow can have several properties. These properties can be read and modified by scripts within the whole workflow instance life and so store key information for the workflow run.


    Workflow version is used for a simple release of a new workflow. Every workflow usually needs some modification time to time. Because of version system you can create a copy of whatever previous version (button Create copy of this version in the version list) and modify it according to the new requirements. After that you can set this version as a current one which means that after new workflow start this version will be used.

    Already started workflow instances will be finished in the version in which they were started (are not influenced by a new version).

    You can modify only those versions that were not started yet. This can be simply checked by means of the button Count WF in the workflow list. If all the numbers here are 0 and workflow version is not marked as current one, workflow version can be modified.

    The column Complete in the list of workflow versions defines if the version is completely configured in its design, i.e. each activity is configured and activities are correctly linked (have incoming and outgoing branches). Only complete version can be marked as a current one and can be started.

    Workflow creation

    Workflow can be simply created in the following way:

    1. Go to the page Administration / Workflow (available only to a model IT owner or Administrator)
    2. Click on New in the toobar
    3. Select Model, fill in mandatory data and save the new workflow
    4. In the list of workflows click on the new workflow. Workflow detail will be opened
    5. Go to the tab Version
    6. Click on the button New version
    7. At this time new workflow with one version exist
    8. Click on the linkSchema in the row with the newly created version
    9. A page with a scheme of the new workflow is created (only activities Start  and End are included)
    10. Creaze workflow scheme (see chapter hereinafter) and save it by means of the button Save
    11. If the workflow needs some properties, click in the row with the version on the linkProperties
    12. After complete creation of the new version (scheme and properties), click in the list of workflow versions on the star icon which makes the given version marked as current one.

    Po aktivaci jedné z verzí workflow je možné workflow spouštět.

    List of started workflow versions and their course are described hereinfter.

    List of activities

    During its design workflow is assembled from particular activities that are linked together. In the table there is list of these activities.

    Name Description
    Start The initial activity of the whole workflow.
    Send e-mail It send e-mail acording to its configuration.
    Task It creates a task to one or more users and waits till its completion.
    Condition Decision activity. Based on the condition course of the workflow can be split in two branches (YES/NO).
    Start a script Activity starts a script.
    Start workflow WActivity starts another workflow.
    Export Activity starts an export.
    Import Activity starts an import.
    Timer Suspension of the workflow for a defined period of time.
    Continue Activity passes signal for each incomimg branch to each outgoing branch. It helps in some situations to a better scheme organization.
    Nested synchronization Activity ensures synchronization of other activities and takeover of control to subsequent activities only when all previous steps are performed. This activity contains a link to a subscheme containing synchronized activities.
    Event Activity suspends workflow till an event is raised by means of script, web service or http request.
    Synchronization Activity ensures synchronization of other activities and takeover of control to subsequent activities only when all previous steps are performed.
    Cycle Activity for a cyclic start of part of workflow.
    End Termination of one workflow branch.
    End Termination of the whole workflow.
    End Termination of the nested scheme.
    End Termination of current cycle course.


    Workflow designer is used for a graphical representation fo workflow and its design. After creation of a new workflow there are two activities inserted into the scheme: Start and End. In order to add new activities drag the required activity by mouse from the panel List of activities into the scheme. Newly inserted activity is shown in red which means that it is not completely configured. If only buttom part of the activity gets red, then the activity is not correctly linked to other activities, ie. incoming or outgoing branches are missing.

    You can configure an activity by moving mouse over it and clicking on the arrow icon in the upper right corner. Select option Settings  from the displayed context menu. Set up the required values in the displayed dialog and save.

    there is also option Delete in the context menu. If chosen activity is deleted fromm the scheme including all the branches connected with it.


    Activities themself are not enough in order the scheme is complete. They need to be linked together. You can do that by a simple drag-and-drop of the connection icon on the activity to another activity. After releasing the mouse link between activities will appear. Most activities have only one connection icon (can have only one type of outgoing branch). Activity Condition has two connection icon. One is marked as Yes and the other as No and represents two branches for workflow continuation depending on condition evaluation.

    Activities can be linked to a whatever network. More branches can lead from one activity to other activities (workflow course is so divided into several parallel branches) or more branches can lead to one activity (activity will be started so many times how many branches lead to it supposing there is no cycle in the workflow).

    After clicking on the branch dialog for setting up branch properties will show up. Parameters of the branch do not have any influence on the workflow course. They only help to better describe the workflow. E.g. the main course of the workflow can be highlighted with a bold line and exception parts in red.

    Workflow start

    In order workflow can be started several assumptions must be met:

    1. Workflow has to be enabled and not deleted.
    2. Workflow version has to be complete and not delete.
    3. Workflow version has to be marked as current.

    Workflow can be started by several means:

    1. From a button in the toolbar (it can be set in class, query or page)
    2. From job
    3. From a rule in the class
    4. From a script
    5. From an import
    6. From another workflow (activity Start a script or activity Start workflow)
    7. From a web service
    8. From a procedure of a module

    In order to start a workflow from the user interface the user has to have a role (Start workflow) for starting the workflow.

    Work with tasks

    Most workflows require user involvement. Worklow creates within its course task for users in an appropriate order. There is activity Task for this purpose. Task is in its nature a record in a class, that contains a user that shall complete the task.

    Users can display tasks assigned to themselves by means of link Tasks in the upper right corner of the page. On the page with tasks there are tasks assigned to the user with information about the workflow, version, category and name of the task. Users can filter the tasks and process them according to various priorities. After clicking on the task name task detail is displayed. Users can set a value (0-100) in the column Completed and save the task. Actual percentage of the task processing is than displayed in the task list. If the task is actually done, users can complete it by clicking on button Complete task.


    Each task is assigned to one or more particular users. If such a user leaves the company or is on holiday these tasks cannot be completed. This is why a delegation can be set for each user. The task will remain assigned to original users, however, the deputy can display and complete the task. Each user can set his/her delegations (who will be his/her deputy) or Administrator can do that instead of him/her. Delegation can be changed or deleted. Deletion of the delegation is performed also automatically when the user who was deputized, is deleted.


    Each workflow start is being logged including all the started activities. In order to access the log click on the button History in the list of versions.

    You can see all the instances of the workflow started for the given workflow version on this page, including start and end time and workflow status. In order to display a detailed course of a particular workflow instance click on the icon in the column Log.

    A new page with a detailed log of started activities will be displayed on the first tab. Some activities log detailed information. Also changes of values of workflow properties are logged. On the second tab there are all the created tasks, their status and assigned person. You can disply the task by clicking on it. On the third tab there are properties that were changed in the workflow. If the properties were not changed they are displayed only at the version row (link Properties).