Configuring Process Actions
Actions can be offered on data records in the monitor that You can trigger on existing processes. An action typically calls a backend system, such as the INUBIT Process Engine, and initiates the processing of the action there. For example, this allows data to be modified or business processes to be initiated.
Available process actions are stored via corresponding entries in the data records and then displayed in the user interface.
-
Toolbar Function
Available actions are displayed in the toolbar via function icons. -
Context Menu
The available actions are displayed via the context menu (right-click on a data record). -
Action Column
If an action column is configured, a button providing access to the action(s) is displayed in the data record’s row; see Action Column. -
Detail View
See Process Actions in the Monitor Detail View.
The user documentation for this feature can be found here.
Access Rights
For a user to be able to use process actions, they need the right bpcMonitor_processAction.
If the system processing the process action is accessed via a backend connection, all users of the feature require the right loadModule_backendconnection.
Providing Actions via Data Records
To offer actions, the data must include a field with the prefix ACTION_.
This usually requires creating a new column in the database that stores the data.
|
Multiple fields with the prefix can be used to offer more actions. However, multiple actions can also be provided via a single field. |
The following sections describe how the contents of the fields are interpreted.
Single Action
A simple text value (without a separator; see Action List) is offered directly as an action. In this case, the value serves as both the action’s ID and its label on the user interface.
Example: Freigeben
Action List
A text value containing separators (usually a comma ","). In this case, the text is split at the separator, and an action is offered for each part. The ID and label consist of the respective separated text part.
Example: "ACTION_Mehrere" : "Freigeben,Ablehnen,Löschen"
Detailed Action Configuration
It is also possible to save a JSON string.
This can contain one or more actions.
The following attributes can be specified:
-
id
(string)
ID -
name
(string)
Label
At least one of the attributesnameoridmust be set. -
label
(string, languageKey, object)
Label, overridesname
If neitherlabelnornameis set, no label is displayed. You can use a language key or an object containing localizations. -
tooltip
(string, languageKey, object)
Additional information when hovering over the label
You can use a language key or an object containing localizations. -
iconCls
(string)
Icon (Font Awesome icons—see the Font Awesome library) -
sortValue
(number)
Order (should be numerical).
(default is 1; items are first sorted in descending order bysortValueand then in ascending order byname) -
requireConfirmation
Confirmation is required before a user performs the action.
-
requireComment
(boolean)
A comment is required before a user performs the action.
-
confirmationText
(string, languageKey)
Confirmation text for the confirmation box (requireConfirmationmust be set to true). A language key can also be used here. If not configured, the text is set to the default as shown above. -
role
(array)
Restrict the display based on the user’s role.This is only a visibility restriction. The backend system must check the user’s roles and permissions itself when the page is loaded.
-
right
(array)
Restricting the display based on the user’s permissions.This is merely a visibility restriction. The backend system must verify the user’s roles and permissions itself when the page is loaded.
-
organisation
(array)
Restricting the display based on the user’s organization or group.This is merely a visibility restriction. The backend system must verify the user’s roles and permissions itself when the request is made.
-
target
(string)
This parameter specifies the target of the action. Possible options are:-
processStarter- Invoke a process starter via an action -
forms- Submitting Forms via an Action
-
-
params
(object)
This attribute can be used to provide an object with additional parameters. Used, for example, for Invoke a process starter via an action.
[
{
"id": "Annehmen",
"name": "Qualitätsprüfung erfolgreich",
"iconCls": "fas fa-award",
"sortValue": 1,
"requireComment": true
}
]
[
{
"id": "Ablehnen",
"name": "Fehler melden/Ablehnen",
"iconCls": "fas fa-times-circle",
"sortValue": 2,
"role": ["bpcadmin"]
}
]
|
Additional user-defined attributes are allowed but do not contribute to the action configuration. |
Invoke a process starter via an action
You can also use an action to invoke the Process Starter with a defined process. To do this, you must configure the process action using a JSON object (see Detailed Action Configuration).
The value processStarter is set as the target.
Using params, the key target process can be specified in the process attribute.
[
{
"id": "start-process",
"name": "Prozessstarter",
"iconCls": "x-fal fa-play",
"target":"processStarter",
"params":{
"process":"testProcess"
}
}
]
|
This method can also be used to call process starters for processes that are hidden by specifying |
Submitting Forms via an Action
You can submit currently displayed BPC forms using an action. To do this, you must configure the process action using a JSON object (see Detailed Action Configuration).
The value forms is set as the target.
In this case, the first form found is submitted (Submit - Form Submission).
|
Only a form that is visible can be submitted. This function is therefore particularly useful in the monitor detail view, where process actions and BPC forms can be displayed side by side. |
To ensure that the correct form is submitted, you can narrow down the selection using a selector.
To do this, define an additional selector in the “ selector ” attribute under “ params,” which will be taken into account when the form is selected.
FORMS-KOMPONENTEN-ID[
{
"id": "start-process",
"name": "Prozessstarter",
"iconCls": "x-fal fa-play",
"target":"forms",
"params":{
"selector":"moduleId=FORMS-KOMPONENTEN-ID"
}
}
]
Process Actions in the Monitor Detail View
Process actions can also be triggered in the monitor’s detail view. See “Configuration of the Monitor Detail View” for more information.
Action Column
To display a column in the monitor that provides direct access to the available actions, you must add a column of type “ gridActionColumn ” in the “ Monitor_ColumnConfig.”
The parameter “ showIconOnly ” can be used to control whether only the icons should be displayed on the button.
This action column can also be used in the history grid in the same way as in the monitor.
Monitor_Column_Config{
"xtype": "gridActionColumn",
"localized": {
"text": "Aktionen"
},
"showIconOnly": true
}
Process Action Endpoint
The following settings in the monitor configuration are relevant for the process action endpoint:
-
INUBIT Backend Connection (
inubit_proxyId):
The backend connection used to invoke the process action is specified here. This can be, for example, a connection to the INUBIT Process Engine or IGUASU. -
Base URL for INUBIT (
inubit_baseUrl):
The base URL for invoking the process action is specified here. -
Endpoint (
inubit_actionEndpoint):
The specific endpoint for the process action is specified here.
The exact URL for invoking the process action is composed as follows:
{URL der inubit_proxyId}/{inubit_baseUrl}/{inubit_actionEndpoint}
Expected Response Format
The client expects a JSON or XML response from the server.
The ` Content-Type` header must be set accordingly to correctly convey the data format to the client:
-
JSON responses require
Content-Type: application/json. -
XML responses require
Content-Type: application/xml.
The JSON-formatted response is recommended, as support for the XML format in process actions will be phased out in the future.
Response to Process Submission
{
"success": false,
"msg": "Fehlermeldung"
}
<Response>
<success>false</success>
<msg>Fehlermeldung</msg>
</Response>
{
"success": true,
"msg": "Aktion vom Prozess 4711 erfolreich"
}
<Response>
<success>true</success>
<msg>Aktion vom Prozess 4711 erfolreich</msg>
</Response>
{
"success": true,
"msg": "Alles toll. Siehe Datei!",
"download": {
"data": "UHJvemVzc2FrdGlvbiBEb3dubG9hZCE",
"fileName": "processAction.txt",
"contentType": "text/plain"
}
}
<Response>
<success>true</success>
<msg>Alles toll. Siehe Datei!</msg>
<download>
<data>UHJvemVzc2FrdGlvbiBEb3dubG9hZCE=</data>
<fileName>processAction.txt</fileName>
<contentType>text/plain</contentType>
</download>
</Response>