|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 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.
|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:
|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:
|Data type||Icon||Is Expandable||Plus Button||Remove Button|
|Base (String, Integer, Float, Date, Boolean)||No||No||No|
|Collection||Depending on collection items||Yes||No (only if it is a collection in a collection)|
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:
|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.|
The complete URL:
The origin part:
The protocol part:
The host name:
|Host and Port|
The host name with port number:
The port number part:
The path component:
The value of a selected query parameter:
The page fragment (URL part after the hash-symbol):
|Geolocation||Longitude||The longitude of a place or city.|
|Latitude||The latitude of a place or city.|
|Device||Online||Holds the current connection state.|
|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.