Creating a workflow

What is a workflow? #

Workflow is the key element of managing documents. The workflow procedure is the formalized path by which documents circulate in the company. The individual steps of the procedure correspond to activities, e.g., the adding of assignments or decisions, for example, approval of the superior. Furthermore, in N365, you can use actions for simply task as create document, copy or set value to the documents fields, generate file and send it via mail in workflow procedure.  Then you can attached it to the button on the form.

What is a workflow?

Workflow consists of Activities (actions) and transitions between activities (path). To create the process you simply draw a graph of actions and paths and configure each one.


 

General #

In this tab you can see a short form with a few fields.

General

In the Name field you can type the name of your process. It is good if the name is short and indicates the main goal of the process being created.

After typing the name, a Code field will be filled automatically. The text of the Code field should be different between other processes.

In the Description field you can enter additional information about the process. Here you can write more about the goals, participants etc.

In Data source group you can find the Forms dropdown where you can connect your process with created form. Now you can use the data associated with the fields of the selected form in configuration of your process.

Diagram #

In this tab you can draw a process graph. You can simply drag and drop each element from the tray on the left. We use BPMN-style notation so, if you know this notation, the diagram look familiar.

Diagram

The simplest diagram consist of task and path. Each task represents single action. Detailed description of the action’s configuration you can find in another article.

If you need something more complex, you can use some specialised element such as:

Start event – special task which is the first task to perform in the process. You can use only one start event. In N365 start event is used to configure proper form display for new document

End event – Special task, which ends the process. You can have as many end event as you need. In N365 it is used to configure display of the document after the process is ended. For example, you can configure view of the document in such way that nobody can edit it after finish the process.

Logic gateway – special task which evaluate logic value and direct process to specific path

Wait gateway – special task which evaluate logic value, waits for one of them is true and then direct process to path with tis value. You can check date, numerical value or attributes such as dropdown. System evaluates each of the logic formula in wait gateway every 15 minute.

Loop – special task which allows you to perform loop operation on elements on list, list of attributes or collection of data in json variable. In loop you can define tasks with actions; the whole subprocess will be performed on each element. You can also use filter in list to specify on which elements from the list to perform subprocess.

Pool – this element is used to better visualise the process. Each pool represent Participant in the Process and it is used as a graphical container for a set of processes performed by the participant.

To configure each element simply double click on it. A sidenav will open with the configuration.

You can learn more about each element in this article.

Diagram - details

Process variables #

Process variables are used to transfer data from one task to another. Usually they are used with Call REST API action to prepare data to send to foreign API or to retrieve data from answer form API. There is even special variable type json which can be used to prepare more complex data set.

Process variables

To use variable you have to declare it in this tab. Remember to choose proper type of variable. After saving the process you could use variable via mentions tree.

Process variables - mentions

You can select a data type from several available.

TEXTBOX – stores text data of the string (varchar) type

INTEGER – stores integers

DECIMAL NUMBER – stores floating point numbers

DATE AND TIME – stores data in date and time format

DATE – stores data in date format (without time)

JSON – (JavaScript Object Notation) stores more complex data in a special notation for easy data exchange and transport between instances

FILE – stores data in file structure

Process variables - types

Scheduled event #

Scheduled event is designed to run a process at a specific time and/or intervals. You can use the scheduled event in cyclical or planned processes, such as the monthly register of a machine or vehicle. The process opened with scheduled event runs independently of the related document. If the process runs after the document is saved, the scheduled event will not work properly. Therefore, the decision to use the scheduled event must be made at the beginning of the process creation, because the target layout of the workflow will depend on it.

In this tab you can see some fields needed to configure the scheduled event.

scheduled event

In the Task name field you can type the name of your scheduled event. It is good if the name indicates why the scheduled event was created and what process is related to. It is important because information about active scheduled events is available elsewhere for the system administrator.

Selected checkbox Active means the scheduled event should be enabled and working, otherwise – disabled (stopped).

Date and time field Run At stores the information when the scheduled event will start for the first time.

Selected checkbox Repeat means the scheduled event will run at a specific intervals, otherwise – it will run once as it was selected in the Run At field

Repeat mode together with the Repeat task every option define the cycles of starting the process. For now, you can choose from six available options.

MINUTE – selecting this option changes the property of the Repeat task every field, making the scheduled task repeat every selected number of minutes, starting from the time chosen in the Run At field.

HOURLY – similarly to the option above, selecting this option changes the property of the Repeat task every field, making the scheduled task repeat every selected number of hours, starting from the time selected in the Run At field.

DAILY – choosing this option works like selecting MINUTE or HOURLY with the difference that the task will run every selected number of days.

WEEKLY – selecting this option works similarly to those described above. In addition, a group of checkboxes Week days appears below. The scheduled task will run on the selected days of the week, in a predetermined cycle. For example, if you selected the “2 weeks” cycle and selected Tuesday and Thursday, the task will repeat every two weeks on Tuesdays and Thursdays.

MONTHLY – selecting this option works similarly to those described above. In addition, the Day of month option will appear below. The scheduled task will start on the selected day of the month in the predefined cycle. For example, if you choose the “2 months” cycle and the 10th day of the month then the scheduled task will run on the 10th day of the month, every two months starting from the date selected in the Run At field.

YEARLY – selecting this option works similarly to those described above. In addition, the Repeat on option will appear below. The scheduled task will run on the selected day and month in the predefined cycle. For example, if you select a cycle of “2 years” and “January 10”, the scheduled task will run on January 10, every two years, starting from the date selected in the Run At field.

Scheduled event - repeat mode

By selecting one of the options in the End dropdown list, you can decide whether the process should be deleted, and if so, when. There are 3 options to choose from.

NEVER – the cycle will be repeated until it is turned off (empty checkbox in the Active option)

DATE & HOUR – the scheduled event will be stopped when the selected End Date is reached

AFTER – scheduled event will be stopped after the selected number of executions. You can select the number in the Repeat count field.

Scheduled event - end

If all required fields have been filled in, the Add task button will become active. By clicking this button the configuration will be confirmed.

If you need to update created scheduled event, remember to click Update task to approve changes. You can also delete the scheduled event by clicking Delete task.

History #

In this tab you can find the log of process usage in individual document workflows. The information has been divided into 4 columns: Started date (when the process was started), started by (by whom the process was started), duration (duration of the process), status (latest workflow status). This information could be helpful to make a decision about modifying or deleting a process.

History

Dependencies #

In this tab, you can find information about what application elements the process uses and by which application element the process is used. Based on this information, the application can block intentional or accidental deletion of the related item. By clicking on one of the elements on the list, you can go to the related item. It could be helpful if you need to find out whether the aforementioned block is necessary or if the reference is linked to the active and used element.

Dependencies

Become a partner