Skip to main content
Version: 7.0

Implementation

Services that are offered in the b4A Service Portal are workflows in the Automic Automation Engine that may use one or more PromptSets for input parameters. For technical reasons, the workflows must always be generated at runtime if they contain PromptSets. The functionalities supported in this context are described below.

The workflows can perform any tasks. There are no restrictions in terms of number or object type. Rules must be observed when it comes to the prompt sets used and notification objects.

Input parameters - prompt sets

The following table shows the supported attributes and functions of the various element types. The attributes Data Reference, Label, and Variable Name are supported by all and are not listed separately in the table. The attribute Default Value can always be set manually. Setting the default value via variables is supported with curly bracket notation ({...}) as well as with system variables.

TypeAttributesNote
Heading/Text
  • Tooltip
This element can be used without restriction. Longer texts are wrapped and thus displayed in full and can help to explain forms.
Number
  • Minimum
  • Maximum
  • Read-only
  • Tooltip
Text field
  • Multi-line
  • Required field
  • Read-only
  • Uppercase
  • Regular expression
  • Tooltip
Combo box
  • Read-only
  • Update dynamically
  • Reset on change
  • Tooltip
Radio button
  • Read-only
  • Tooltip
Checkbox
  • Read-only
  • Reset on change
  • Array
  • Separator
  • Tooltip
Time/Date
  • Type
  • Read-only
  • Minimum
  • Maximum
  • Calendar condition
All types are supported for this element (Date, Timestamp, and Time)
File upload (text field)-In the PrompSet object, this field is inserted as a text field (Further details)
Dynamic text-In the PrompSet object, this field is inserted as a text field (Further details)

Additional input fields

The b4A Service Portal expands the possibilities for input masks compared to the Automic Web Interface. On the one hand, there are new input fields and, on the other hand, the possibilities for data sources are expanded. These techniques are described below.

General

The b4A Service Portal expands the options for input masks compared to the Automic Web Interface. On the one hand, there are new input fields, and on the other hand, the options for data sources have been expanded. These techniques are described below.

Structured documentation

The information is stored in JSON format. The following sections explain the exact definitions for the respective variants.

File upload

An additional field type is the file upload. This makes it possible to transfer files directly to an automation process. To use this, a text field must be inserted in the PromptSet object. The field must be filled in the Custom Field option with the following text in JSON format:

{
"type": "FileUpload"
}

Dynamic text

The Heading/Text element in a PromptSet object can display static text in an input mask. Such text can be used, for example, to explain the input fields. The dynamic text field is an extension of this field and allows you to display changeable text. This is implemented via a user-defined data source (Details). The change in text is triggered by changing values in other input fields in the PromptSet object. You can define which fields should trigger the changes. The displayed text can contain the values of other fields or object variables of the task. Below is an example of such a configuration.

{
"type": "DynamicLabel",
"source": {
"name": "dynamic-label",
"options": {
"dependsOn": [
{"variable":"B4AP_APPLICATION_I#","default":""},
{"variable":"B4AP_FUNCTION_I#","default": ""}
],
"onEmpty": "Select application and function to see the generated b4A Package name",
"else": "Generated b4A Package name: %(B4AP_APPLICATION_I#.value).%(B4AP_FUNCTION_I#.value)"
}
}
}

The two attributes onEmpty and else define the respective text that the field should display. onEmpty defines the text in case all attributes on which the field depends are empty. If at least one of the fields has a non-empty value, the text from the else attribute is displayed. B4A expressions can be used in both attributes to generate the text. All fields from the PromptSet object are available for this purpose. Each field has two subattributes. First, there is the label attribute, which contains the text to be displayed in the input mask, and second, there is the value attribute, which contains the text that is transferred to the service workflow.

For example, if the variable B4AP_APPLICATION_I# is a combo box that gets its data from another user-defined data source that provides the following list, then the b4A expression %(B4AP_APPLICATION_I#.label) can be used to access the value best4Automic or SAP Business Warehouse (depending on which value is currently selected). The expression %(B4AP_APPLICATION_I#.value) can be used to access the values B4A or SAP_BW, respectively.

The further structure of the configuration is explained in more detail in the following section, as it corresponds to a standard used by all extensions.

[
{
"value": "B4A",
"label": "best4Automic"
},
{
"value": "SAP_BW",
"label": "SAP Business Warehouse"
}
]

In the example configuration, the dependsOn attribute shows how the dependency on the other fields is defined. Here, the variable and a default value must be defined once for each field. If the specified field is not yet set, the default value is used.

User-defined data source

Input fields such as combo boxes, check boxes, and radio buttons use data sources to define the possible values. The Automic Automation Engine offers the option of creating dynamic lists with variable objects. In some use cases, this may not be sufficient or may lead to longer waiting times. To solve this and also offer the highest possible degree of flexibility, user-defined data sources are supported. While some of these data sources are part of the b4A RESTful API, additional customer-specific data sources can also be added.

To use such data sources, a field of type Text field must be defined in the PromptSet implementations. The configuration is done as described in General.

The following sample configuration shows the basic structure of a user-defined data source. The value for type determines which type of field is to be displayed in the Service Portal. The values ComboBox, CheckBox, and RadioGroup are possible here. The source field is used to specify the data source. name defines the name of the data source, and options for the respective data source are defined under options. The data sources available in the product and their options can be found in the b4A RESTful API documentation.

{
"type": "ComboBox|CheckBox|RadioGroup",
"source": {
"name": "<Name of the data source>",
"options": {
"<Options of the data source>",
}
},
"options": {
"<Depending on the type>",
}
}

There are also options for the defined type (type). These are described below depending on the type:

RadioGroup

  • defaultValue: Defines the default value. The value specified here must be an object with the attributes label and value.
"options": {
"defaultValue": { "label": "AE21A-0012", "value": "AE21A-0012"}
}

CheckBox

  • resets: List of variables whose values should be reset when the value of this option changes. The leading & must be omitted from the variable name.
  • required: If the value is set to true, at least one value must be selected
  • separator: If a character is specified, the selected values are combined in a string using the specified separator. If none is specified, a semicolon (;) is used
  • defaultValue: Defines the default value. The value specified here must be an object with the attributes label and value.
"options" : {
"resets": ["B4A_PARAM1_I#", "B4A_PARAM2_I#"],
"required": true,
"separator": ";",
"defaultValue": [{ "label": "AE21A-0012", "value": "AE21A-0012"}, { "label": "AE21A-0014", "value": "AE21A-0014"}]
}

ComboBox

  • resets: List of variables whose values should be reset when the value of this option changes. The leading & should be omitted from the variable name.
  • dynamicReload: If the value of the option is true, the last of the allowed values is reloaded when the combo box is opened.
  • defaultValue: Defines the default value. The value specified here must be an object with the attributes label and value.
"options" : {
'resets': ["B4A_PARAM1_I#", "B4A_PARAM2_I#"],
"dynamicReload": true,
"defaultValue": {
"label": "AE21A-0012",
"value": "AE21A-0012"
}
}

Included data source

base-folders
Provides a list of all configured base folders
packages
Provides a list of all b4A Package in a configured client.
OptionDescriptionRequired
devConnectionConnection to the development tenantyes

The devConnection option can be used to define the tenant.

connections
Provides a list of all configured connections
dynamic-labels
Used for dynamic text fields to configure the texts to be displayed
OptionDescriptionRequired
dependsOnList of fields on which this field dependsyes
onEmptyIf all fields on which this field depends are empty, this text is displayedyes
elseThe text is generated from this template if at least one field from the dependency list has been setyes
branches
Returns the list of all Git branches for a b4A Package.
OptionDescriptionRequired
devConnectionConnection to the development clientyes
repositoryName of the b4A Package or repositoryyes
patternA pattern that all branches to be listed must match in terms of nameno, default value is .*
repository
Can either return the list of all b4A Packages in the release repository or the list of available versions of a b4A Package.
OptionDescriptionRequired
operation'packages' or 'version', depending on what is to be listedyes
packageFor the 'versions' operation, the option for the name of the package must be specifiedyes

Redirecting PromptSets

By default, PromptSets are sent to the person who started the service. Using an entry in the structured documentation of the object that attached the PromptSet, the PromptSet can be redirected to another person. To do this, an entry must be created in the documentation tab configured in api.json according to the following schema.

info

In order for the PromptSet to be redirected, the Take over task privilege must be set for the registered user.

Structured documentation recipient

Notifications - Approvals

The b4A Service Portal supports services that include approvals. This makes it possible to integrate services that must be confirmed or rejected by a member from a list of groups before they can be executed. Technically, workflows in the Automic Automation Engine use notification objects (CALL) for this mechanism. The query type is supported with all possible priorities. The escalation options are not mapped by the b4A Service Portal.

One extension that the b4A Service Portal offers for notifications is the ability to use HTML for formatting in the message. This allows structures such as tables or lists to be used and displayed.