Workflow
Workflow is the automation engine in ServicePlaza. It uses scripts to perform automations.
The main concept of workflow consists of the following items:
- Trigger
A trigger is used to start an action based on a certain event, like a service request from the ServicePlaza catalog. - Action
The action defines what should be done when it gets executed. Typically, you insert a script into an action and assign parameters to the script what are needed for successful execution of the task.
The following chapters will explain the functions in more detail.
Action Execution
The Action Execution contains the monitoring of the actions in a table-based logging. All executed actions are documented here.
To see more details of a certain action, click on the corresponding line and press the info icon.
On opening, you´ll see detailed view of the executed action.
Scripts do typically provide a status message, which is shown in the corresponding view along with the status of the script execution.
You should make sure that a useful error message or success message is provided. Please note that this view is typically for an administrator point of view and not provided to end users.
Action
In actions you can now embed your scripts or functions what will provide some kind of automation functionality.
Every configured action is shown in the table.
On creating a new action or editing an existing you´ll see the configuration details of the action. The form for creating or changing an action has two tabs. The first tab General contains the name of the action, whether this action is active or not, what type of action it is, and depending on the type of action either a file or URL management.
The following table shows how to fill in the fields:
Parameter | Description |
---|---|
Name | The descriptive Name of the Action to create. |
Active | If the action is inactive, it cannot be used and will not be executed, even if it is stored in e.g., an order or a trigger. For example, the job is then terminated with an error. |
Type | Various types exist for actions, you can use HTTP (GET or POST) or embed a script with supported language in ServicePlaza. |
Type HTTP Post, HTTP Get | If You select Post or Get under type HTTP, the display changes so that you must enter a URL, also you can choose to Always trust certificate to accept self-signed certificates. Credentials can also be selected, which may be required for authentication of the HTTP action. For these to be selected, they must have been created beforehand in Credentials section. |
Type PowerShell, Python, C#, or C# Script | If you selected another (scripting) action, you must upload it. A file in the respective (script) language can be selected via Browse. Alternatively, this can also be a .zip file. Below there is a download link to download a sample file (script or .zip). If an existing action is to be adapted, the name of the script on the system or .zip file is also displayed. It can be downloaded via the Download button, and it can be deleted via the Delete button. If a .zip file is used in one of the variants, the script or file to be used from the .zip file must be selected after uploading the .zip file. The selected file is then displayed in File to Run. |
On the second tab Parameters, the user can create and manage parameters for the script. All specified parameters are passed to the script or URL when the action is executed. For each parameter, the variable name, the type of the variable, whether this is necessary, whether it should always be filled with the default value or whether this parameter is given during the call. The type of a parameter can be String, SecureString (in use of Passwords), Boolean, Integer, Float, Object or Array sand is selected via a pull-down menu. If Always use default value has been checked, a corresponding valid value must be entered. This value can also be empty, since an integer can also be "0", for example. If a value has to be passed for a parameter, but it is empty at the time of transfer, the default value would be used in this case. You can use the (x) icon to delete the corresponding parameter from the list of parameters. The following figure shows an example of configured parameters.
Fig. 387: Workflow – Actions – Parameters
Once you have filled in all the fields on the General tab, you can save the new or changed action by pressing the Save button.
If you want to delete an action from the list of all actions, select the corresponding line of the action and press the delete button. You will be prompted to confirm the deletion of the action.
Trigger
In order for actions to be executed, triggers exist. Without a trigger, no action ever becomes active. On the page of the triggers there is a table of all created triggers or triggers, divided into four tabs.
The following figure shows the corresponding table of the All tab:
Each trigger is displayed in one row in the table on the respective tab, depending on the type of execution.
The form for creating or changing a trigger consists of one page. When you select the type on this page, the form is changed depending on the trigger type.
The following table shows how to fill in the fields:
Parameter | Description |
---|---|
Name | The descriptive Name field of the trigger |
Active | If the trigger is inactive, it cannot be used and will not be executed. |
Log successful execution | Specifies whether an entry should be made in the Actions Execution table upon successful execution or whether only incorrect executions should be reported. |
Type | ![]() ![]() ![]() |
Actions | By selecting an action, it is defined which action is to be triggered by this trigger. This is done via a pull-down menu. To be able to select an action, it must be created beforehand. |
Once you have filled in all the fields on the page, you can save the new trigger by pressing the Save button.
Credentials
In certain situations, it may be necessary to register for the execution of an action (HTTP Actions) on a third-party system. For this purpose, there is the credentials option in ServicePlaza. Here, these accesses or the users required for registration can be created and managed. Currently, there is only one type of credentials, and that is HTTP Basic.
On the page of the Credentiels there is a table of all created user accounts that are required to log in to Actions.
To create a new credential or modify an existing one, press the corresponding icon. When editing a credential, you´ll see the form as shown below.
The Name field is a free text field to provide a descriptive name of the. The type determines what type of authentication process it should apply. Lastly, the username and password have to be provided.
Settings
The configuration of the Microservices SP Workflow is done on the single Tab Settings. In addition to the display name of the service, the modules for execution and the timeouts are defined there. You can access the Settings of the Workflow Service via Settings -> Services -> Workflow. The following figure shows the Settings tab:
On the SP Workflow Microservice Settings page, in addition to the display name of the service, you can configure the execution location for PowerShell, Python Executor, C# or C# Script Executors, and Execution Settings. While the URL for the HTTP Post and Get Requests are set directly in the action, this is done for the supported scripting languages PowerShell, Python, C# and C# Script here in the settings.
You can find out how to fill in the fields in the following table:
Parameter | Description |
---|---|
Service Display Name | This allows the service to be named "Workflow" so that it is displayed in used menus and titles with the configured name. |
PowerShell Executor / Python Executor | The URL specifies the location for either the PowerShell or the Python script. This is stored there and can be executed from there. New File can be used to load a script or .zip file into the Service Plaza, which can then be executed via an action or in an action. A .zip file is unpacked during upload and all files are stored on the server. This option can be used, for example, if a global script is used for several scripts, which are always or often called by the individual scripts. To load a script or .zip file onto the server, press the Browse button and select the file. As soon as the Save button is pressed, the displayed file is uploaded after New File. The uploaded files are then displayed after Current File. To exchange them, simply select a new script via Browse and press the Save button again . To delete the uploaded script, the administrator must press the Delete button. As long as no file has been uploaded, only the URL and New File lines are displayed. |
C# Executor, C# Script Executor | For these modules, the same applies as before for PowerShess or Python. The difference between C# and C# Script is that C# is a compiled .dll file, while C# Script processes a text file. Therefore, with C# Executor, only the entry of the URL call must be stored at which the corresponding .dll is stored on the system. |
Execution settings | The two parameters Connection timeout (ms) and Read timeout (ms) determine the maximum waiting times for the two operations, by when at the latest a response must be made to the workflow processes of systems or scripts, and the corresponding workflow or the executed action is aborted incorrectly. The value is defined in milliseconds. |