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. AP1

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

Example

Suppose a company accepts orders from customers through a website. The website is integrated with ELMA365. 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 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. These 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 not be able to export such workspace or app.

Workspace parameters. These 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.

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.

AP2

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

AP3

 

  • 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.

AP4

Example of using additional parameters

Consider a solution set up for the tech support department. While performing process tasks in ELMA365, an employee describes the issue. Then ELMA365 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
}

Found a typo? Highlight the text, press ctrl + enter and notify us