Custom Events | Global Variables | Global Auto Fields
Within the Data Workbench, it is possible to administer custom events, global variables and auto fields that you want to use cross-functional in the user stories. |
Custom Events
Custom events can be imagined as tunnels that connect different user stories or processes. By publishing an event, you open the entrance to the tunnel and by subscribing to this particular event, you create the exit of the tunnel. This enabled you to jump between the user stories and helps you to have a clearly laid out working space. To create a new custom event, click on the plus icon. Enter a name and then you can use it in the Process Designer. Go to Events for an example of using the custom event in the Process Designer. In this section, you can also find out how to create a custom event directly in the Process Designer. |
Global Variables
Use global variables as a container to buffer data, e.g. if a connector returns a lot of data and you would like to use some of it later in your work process, you can save the parameter as variables and map them later. | |
To create a new one, click on the plus icon. Enter a variable name, variable type and default value (optional). | |
You can also select, e.g. a struct as the variable type. | |
If you have selected a struct as a variable type and clicking on the value helper for the default value, the dialog on the right appears. The dialog lists the fields of the ‘Machine’ struct on the left side like a tree. The struct is expanded to its first children so that the user can immediately see which are the fields of the parent node ‘Machine’. |
You get the information about the fields on the right panel to configure the default values.
In general, the fields have four different appearances depending on their own data type:
Data type | Appearance | Behavior/Usage |
String, Integer, Float | Input field with validation (depending on data type) | Values are written in the input field and saved on live change. |
Date | Date time picker | The date-time picker dialog opens and the user is able to select the date and time. |
Boolean | Switch | The switch can be set to true or false. |
Collection, Struct | Link | By clicking on the link, you will be navigated to a complex data type in the left tree, that will also be selected automatically. |
Example of a link press for clarification:
By pressing the ‘lubricant’ link from the dialog above, there are also different appearances of the tree items depending on their datatype:
Collection exception:
By adding a collection object, the item is inserted into the structure below the collection. The collection object can then be clicked like an ordinary tree element. The only difference is that a collection item can be removed using the delete button.
You can reference variables in data objects as in- or output parameter. To do so, drag a variable (that you’ve created previously in the Data Workbench) from the toolbar in the mapping dialog. |
Global Auto Fields
Auto fields are automatically computed/filled fields. You can use them e.g. if you want to greet the user who is logged in with his actual name or load e.g. the version number. To create a new auto field, click on the plus icon in the Data Workbench. Enter a name for the auto field, the type, and the characteristic. It is possible to declare auto fields from five types:
|
Category | Characteristic | Description |
Application | Name | The name of the application. |
Version | The current version of the application. If the application is not yet released, it is stated as “n/a”. |
|
User | Name | The currently logged in user name. |
URL | Complete URL |
The complete URL: https://community.simplifier.io:443/doc/current-release/?search=help#8263 |
Origin |
The origin part: https://community.simplifier.io:443/doc/current-release/?search=help#8263 |
|
Protocol |
The protocol part: https://community.simplifier.io:443/doc/current-release/?search=help#8263 |
|
Host Name |
The host name: https://community.simplifier.io:443/doc/current-release/?search=help#8263 |
|
Host and Port |
The host name with port number: https://community.simplifier.io:443/doc/current-release/?search=help#8263 |
|
Port |
The port number part: https://community.simplifier.io:443/doc/current-release/?search=help#8263 |
|
Path |
The path component: https://community.simplifier.io:443/doc/current-release/?search=help#8263 |
|
Query Parameter |
The value of a selected query parameter: https://community.simplifier.io:443/doc/current-release/?search=help#8263 |
|
Hash/Page fragment |
The page fragment (URL part after the hash-symbol): https://community.simplifier.io:443/doc/current-release/?search=help#8263 |
|
Geolocation | Longitude | The longitude of a place or city. |
Latitude | The latitude of a place or city. | |
Device | Online |
Holds the current connection state. Note: Use this autofield only in the context of mobile devices! Please refrain from using it in the browser and be aware that this autofield does not work in Mozilla Firefox. |
Mobile Client | Tells you if your application is running on the Cordova Client. | |
Screen orientation | The screen orientation is set. | |
Device Type | The auto field can hold these values: desktop, phone, tablet, watch and smartglass. |
In the overview, the type of the auto field is displayed underneath its name and the characteristic is displayed on the right-hand side.
To edit an auto field, use the edit icon. It opens the same dialog as creating the auto field, but of course, predefined with the data, you set before. If you no longer need an auto field, delete it by clicking the appropriate icon.
How to use Auto Fields
You can use auto fields within a data object. In this example, we created an auto field that automatically gets the user name. It is mapped with the input parameter ‘userName’ of a preconfigured business object. | |
We configured some more auto fields like “applicationVersion” or 2 URL parameter. The result is shown below: At first, you can see the former way of typing in the information by hand. On the second Screen, we used the Auto Fields and you get the information automatically, simply by clicking on the button.
|