System Settings / Additional Parameters 

Additional Parameters

In this section, you can add and store parameters and then use them in scripts in business processes. Unlike context variables whose values change from instance to instance, parameters remain unchanged for all process instances.  All parameters are stored in one section. This means that in the future if you need to change a parameter, it won't require you to rewrite all scripts that access the parameter. It will suffice to edit the data in the Additional Parameters section.

0.png

начало примера

Example

Suppose a company accepts orders from customers through a website. The website is integrated with QuickBPM. This allows exchanging information about orders updates with the website, and customers are always aware of the progress on their orders. Such integration is implemented with a script. To ensure correct script operation, you need to specify the website address and token for authorization. No matter how many process instances there are, these parameters will remain unchanged. In addition, if the company decides to create another business process and set up integration with the web site, the same parameters will be reused.

конец примера

 

Given this, it is convenient to store the site address and token in the Additional Parameters section. If once the site address or token change, the company employees won't have to check all the scripts in the processes. It will be enough to change the parameter in the appropriate section.

Types of parameters

Parameters can be divided into two groups:

Global parameters – are set at the company level. Global parameters are always accessible from the company processes. You can also use them when creating scripts in any workspace or app after enabling the Global setting. Please note that in this case, you will no be able to export such workspace or app.

Workspace parameters – are set at the workspace level.  Workspace parameters are always accessible from the workspace processes. In addition, these parameters can be applied in the app business processes, after enabling the Namespace setting.

How to add a new parameter?

Only users included in the Administrators group can add, edit, and delete parameters.

There are two ways to set additional parameters:

1. On the main page, in the menu, select Administration> System Settings> Additional Parameters. Use this method to set both global and workspace parameters.

or

2. On the main page, select a workspace > click on the gear icon to the right of the workspace name> in the drop-down menu, select Workspace settings> Additional Parameters. Thus, you can only set the parameters for a specific workspace.

After you complete these steps, regardless of the method selected, you will be redirected to a page with additional parameters. In the upper right corner, click on the + Parameter button.

1.png

In the window that opens, fill in the following fields:

2.png

  • Display Name – enter the name that will be displayed in the list of parameters;
  • Property Name – this name is generated automatically based on the parameter name. If necessary, you can edit the contents of the field;
  • Tip – here you can enter additional information about the parameter;
  • Type the type of data that this parameter stores;
  • Value – specify the value of the parameter.

Once the fields are filled in, click Create.

If necessary, the parameter value can be changed. To do this, select the value you want to correct in the list of parameters, and then click on the pencil icon.

3.png

Example of using additional parameters

Consider a solution set up for the tech support department. While performing process tasks in QuickBPM, an employee describes the issue. Then QuickBPM executes a script which sends data to GitLab, the bug tracking system. There, a ticket is automatically created with a subject and description, and the performer is selected.

To implement this integration, we set up the following additional parameters:

- gitlab_host: server address;

- gitlab_project: identifier of the project that will include a new ticket;

- gitlab_token: authorization token;

- gitlab_user: a user who will deal with the ticket.

The ticket subject and description are defined through the context variables "title" and "description".

The scrip text looks as follows:

async function createIssueInGitlab(): Promise {
    const issue = await fetch(`${ Namespace.params.data.gitlab_host }/api/v4/projects/${ Namespace.params.data.gitlab_project }/issues`, {
        method: 'post',
        headers: {
            'PRIVATE-TOKEN': Namespace.params.data.gitlab_token,
            'Content-Type': 'application/json',
        },
        body: JSON.stringify({
            title: Context.data.title,
            description: Context.data.description,
            assignee_ids: [Namespace.params.data.gitlab_user],
        }),
    }).then(res => res.json());
    Context.data.issue_url = issue.web_url
}