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 a simple task such as creating a document, copying or setting the value to the document fields, generating a file, and sending it via mail in the workflow procedure.  Once the workflow is designed it can be attached to a button attribute, and start automatically upon creating a document.

What is a workflow?

The workflow consists of Activities (actions-steps) and transitions between activities (paths). To create the process you simply draw a graph of actions and paths and configure each one using a BPMN notation.

General tab #

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

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.

In the Description field, you can enter additional information about the process. Here you can write more about the goals, participants, etc., and purpose. Notes like this are useful for other system administrators to understand the purpose.

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

Element accessibility – in Navigator365 processes are assigned to the application and by default cannot be used outside this application. If there is a need to use a process in another application you have to change this option. There are three options available:

Private: process can be used only in this application (by default),

Public: process can be used in all applications, even those created in the future,

Shared with applications: most common and advised option for security reasons. You can specify a list of applications in which this process will be available. Notice, that if you later add a new application and want to use this process in this new application you have to share it with this new application.

Trigger configuration #

A trigger is designed to run a process at a specific time and/or intervals. You can use the trigger in cyclical or planned processes, such as the monthly register of a machine or vehicle. The process opened with a trigger that 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 scheduler must be made at the beginning of the process creation, because the target layout of the workflow will depend on it.

Schedule

Once you Add a task (you can add more than one task for each process), you can see some fields needed to configure.

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 schedulers is available elsewhere for the system administrator (System–>Logs–>Active scheduled processes).

The selected checkbox Active means the scheduled event should be enabled and working, or disabled when unchecked.

Repeat mode together with the Repeat task every option defines 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 – Similar 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 Weekdays 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 month day 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 “10 January”, the scheduler will run on January 10th, every two years, starting from the date selected in the Run At field.

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

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 scheduler will be stopped when the selected End Date is reached

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

If you need to update the created scheduled event, simply change the details and save the process.

Webhook

The process can also be triggered by an external system using webhooks. When Type is chosen as Webhook the system shows the POST method and generates a webhook URL to be used in the other system.

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 looks familiar.

Diagram

The simplest diagram consists of a task and path. Each task represents a single action. A detailed description of the action’s configuration can be found in another article here.

If you need something more complex, you can use some specialized elements such as:

Start event – a special task that is the first to be performed in the process. You can use only one start event. In N365 start event is used to configure the proper form display for a new document. If there is no need to alter the start view of the document it is possible to start the workflow with a task (start event is optional)

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

Task – the most important event in workflow design. The task creates the main logic of the workflow step. The task could be a user action event where a real user needs to make a decision or accept an event. The task can be also an automatic action performed by the system. You can learn more about possible actions in this article.

Gateway – a special task that evaluates the logic value and directs the process to a specific path

Pool/Participant – this element is used to better visualize the process. Each pool represents a 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 on the right side will open with the configuration.

 

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 the response from API. There is a special variable type JSON which can be used to prepare more complex data sets. A variable could be also a text field, integer, decimal, date, date & time, and a file.

Process variables

To use a variable you have to declare it in this tab. Remember to choose the proper type of variable. After saving the process you could use a variable via the 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 the file structure

Process variables - types

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), and 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 block as mentioned earlier is necessary or if the reference is linked to the active and used element.

Dependencies

Become a partner