Creating workflows as a service using Orchestration CLI
You can develop a workflow as a service that provides an alternative approach to manage and automate tasks. You can add specific parameters related to service in the workflow definition for implementation.
This method streamlines the operations and ensure consistency across workflows. After you create a service, you can submit it from the UI. All you need to do is, submit the service as it is if there are no variables or specify a value for the parameters, if any, before submitting the service. This ensures that those who do not possess a high level of technical knowledge can also manage and update the workflows easily.
You can edit an existing workflow definition or create a new workflow definition to create a service, see Managing a workflow definition from the Orchestration CLI.
ISSERVICE
SERVICENAME "service_name"
SERVICEDESCRIPTION "free_text"
SERVICECONTACT "contact_information"
SERVICETAGS "tag1|tag2"
SERVICEVARIABLES
[{
"type" : "variable_type",
"key1" : "value1",
"key2" : "value2"
}]After you create the service, it appears in the Self-Service Catalog. You can than select and submit the required service from the list.
- ISSERVICE
- The mandatory parameter that you must add to create the workflow as a service.
- SERVICENAME
- Mandatory parameter and specify a name for the service. You can provide any alphanumeric value and wildcard characters. You can use a maximum of 64 characters.
- SERVICEDESCRIPTION
- Optional parameter and you can add any free text about the service. You can provide any alphanumeric value and wildcard characters. You can use a maximum of 1024 characters.
- SERVICECONTACT
- Optional parameter and you can add contact information for support.
- SERVICETAGS
- You can create a tag that you can later use to filter the required service from the list of services. You can provide any alphanumeric value and wildcard characters. You can create a maximum of 10 tags, each not exceeding 16 characters.
- SERVICEVARIABLES
- You can specify a data type for the fields in the form. Each data type needs
to be configured with a set a specific key-value pairs. This variable
decides the structure, behaviour, and properties of the field in the forms.
You can specify any of the following data types.
-
- checkbox
- You can specify the following mandatory and optional
key-value pairs to create a checkbox in the form.
- Mandatory parameter
-
- name: Specify a name for the entire set of key-value pairs that needs to be added to create the checkbox field. The name must start with a letter, and can contain alphanumeric characters, dashes, and underscores only. You can use a maximum of 16 characters.
- Optional parameters
-
- displayName: Specify a name for the checkbox. You can provide any alphanumeric values and wildcard characters. You can use a maximum of 24 characters.
- description: Optional parameter and you can add any free text. You can provide any alphanumeric value and wildcard characters. You can use a maximum of 1000 characters.
- defaultValue: You can set the default value to true and the checkbox remains selected by default in the form.
The key value pairs associated with checkbox should be configured under SERVICEVARIABLES in the workflow definition.SERVICEVARIABLES [{ "type": "CHECKBOX_TYPE", "name": "name A", "displayName": "display name", "description": "text", "defaultValue": "true" }] -
- checkboxGroup
- You can specify the following mandatory and optional
key-value pairs to create multiple checkboxs in the
form.
- Mandatory parameter
-
- name: Specify a name for the entire set of key-value pairs that needs to be added to create the checkbox field. The name must start with a letter, and can contain alphanumeric characters, dashes, and underscores only. You can use a maximum of 16 characters.
- Optional parameters
-
- displayName: Specify a name for the checkbox. You can provide any alphanumeric values and wildcard characters. You can use a maximum of 24 characters.
- description: Optional parameter and you can add any free text. You can provide any alphanumeric value and wildcard characters. You can use a maximum of 1000 characters.
- choices: You must specify the details in a key-value pair. For example, ["displayName", "value", "selected"] where name is displayed for the specific option and value is the associated with server side operations. You must specify the selected option as true to set the key-value pair as default or else ignore the option. You must at least provide 2 key-value pairs.
The key value pairs associated with checkboxGroup should be configured under SERVICEVARIABLES in the workflow definition.SERVICEVARIABLES [{ "type": "CHECKBOX_GROUP_TYPE", "name": "name A", "displayName": "display name", "description": "text", "choices": [["displayName": "display_name", "value": "actual_value", "selected": "true"], ["displayName": "display_name", "value": "actual_value", "selected": "true"]] }] -
- double
- You can specify the following mandatory and optional
key-value pairs to create a field for selecting numbers
with decimals within a specific range.
- Mandatory parameter
-
- name: Specify a name for the entire set of key-value pairs that needs to be added to create the field. The name must start with a letter, and can contain alphanumeric characters, dashes, and underscores only. You can use a maximum of 16 characters.
- Optional parameters
-
- displayName: Specify a name for the checkbox. You can provide any alphanumeric values and wildcard characters. You can use a maximum of 24 characters.
- description: Optional parameter and you can add any free text. You can provide any alphanumeric value and wildcard characters are supported. You can use a maximum of 1000 characters.
- required: Set the value to true to make the field as a mandatory field in the form.
- defaultValue: You can specify a default value for the field.
- placeholder: You can specify any free text to be displayed inside the field. You can provide any alphanumeric values and wildcard characters.
- minimum: Specify a minimum value for the field.
- maximum: Specify a maximum value for the field.
The key value pairs associated with double should be configured under SERVICEVARIABLES in the workflow definition.SERVICEVARIABLES [{ "type": "DOUBLE_TYPE", "name": "name A", "displayName": "display name", "description": "text", "placeholder": "text", "required": "true", "regex": "regular expression", "defaultValue": "number with decimal", "minimum": "number with decimal", "maximum": "number with decimal" }] -
- multiSelect
- You can specify the following mandatory key-value pairs
to create a drop-down list where multiple options can be
selected.
- Mandatory parameter
-
- name: Specify a name for the entire set of key-value pairs that needs to be added to create the field. The name must start with a letter, and can contain alphanumeric characters, dashes, and underscores only. You can use a maximum of 16 characters.
- Optional parameters
-
- displayName: Specify a name for the checkbox. You can provide any alphanumeric values and wildcard characters. You can use a maximum of 24 characters.
- description: Optional parameter and you can add any free text. You can provide any alphanumeric value and wildcard characters are supported. You can use a maximum of 1000 characters.
- required: Set the value to true to make the field as a mandatory field in the form.
- defaultValue: You can specify multiple default values for the field.
- choices: You must specify the details in a key-value pair. For example, ["displayName", "value", "selected"] where name is displayed for the specific option and value is the associated with server side operations. You must specify the selected option as true to set the key-value pair as default or else ignore the option. You must at least provide 2 key-value pairs.
The key value pairs associated with multiSelect should be configured under SERVICEVARIABLES in the workflow definition.SERVICEVARIABLES [{ "type": "SELECT_TYPE", "name": "name A", "displayName": "display name", "description": "text", "required": "true", "choices": [["displayName": "display_name", "value": "actual_value", "selected": "true"], ["displayName": "display_name", "value": "actual_value", "selected": "true"]] }] -
- select
- You can specify the following mandatory key-value pairs to create a drop-down list.
- Mandatory parameter
-
- name: Specify a name for the entire set of key-value pairs that needs to be added to create the field. The name must start with a letter, and can contain alphanumeric characters, dashes, and underscores only. You can use a maximum of 16 characters.
- Optional parameters
-
- displayName: Specify a name for the checkbox. You can provide any alphanumeric values and wildcard characters. You can use a maximum of 24 characters.
- description: Optional parameter and you can add any free text. You can provide any alphanumeric value and wildcard characters are supported. You can use a maximum of 1000 characters.
- required: Set the value to true to make the field as a mandatory field in the form.
- defaultValue: You can specify a default value for the field.
- choices: You must specify the details in a key-value pair. For example, ["displayName", "value", "selected"] where name is displayed for the specific option and value is the associated with server side operations. You must specify the selected option as true to set the key-value pair as default or else ignore the option. You must at least provide 2 key-value pairs.
The key value pairs associated with select should be configured under SERVICEVARIABLES in the workflow definition.SERVICEVARIABLES [{ "type": "SELECT_TYPE", "name": "name A", "displayName": "display name", "description": "text", "required": "true", "choices": [["displayName": "display_name", "value": "actual_value", "selected": true], ["displayName": "display_name", "value": "actual_value", "selected": "true"]] }] -
- radioGroup
- You can specify the following mandatory key-value pairs to create a radio button in the form.
- Mandatory parameter
-
- name: Specify a name for the entire set of key-value pairs that needs to be added to create the field. The name must start with a letter, and can contain alphanumeric characters, dashes, and underscores only. You can use a maximum of 16 characters.
- Optional parameters
-
- displayName: Specify a name for the checkbox. You can provide any alphanumeric values and wildcard characters. You can use a maximum of 24 characters.
- description: Optional parameter and you can add any free text. You can provide any alphanumeric value and wildcard characters are supported. You can use a maximum of 1000 characters.
- required: Set the value to true to make the field as a mandatory field in the form.
- defaultValue: You can specify a default value to set a default radio button option.
- choices: You must specify the details in a key-value pair. For example, ["displayName", "value", "selected"] where name is displayed for the specific option and value is the associated with server side operations. You must specify the selected option as true to set the key-value pair as default or else ignore the option. You must at least provide 2 key-value pairs.
The key-value pairs associated with radioGroup should be configured under SERVICEVARIABLES in the workflow definition.SERVICEVARIABLES [{ "type": "RADIO_GROUP_TYPE", "name": "name A", "displayName": "display name", "description": "text", "required": "true", "choices": [["displayName": "display_name", "value": "actual_value", "selected": "true"], ["displayName": "display_name", "value": "actual_value", "selected": "true"]] }] -
- string
- You must specify the following mandatory key-value pairs to create a text field.
- Mandatory parameter
-
- name: Specify a name for the entire set of key-value pairs that needs to be added to create the field. The name must start with a letter, and can contain alphanumeric characters, dashes, and underscores only. You can use a maximum of 16 characters.
- Optional parameters
-
- displayName: Specify a name for the checkbox. You can provide any alphanumeric values and wildcard characters. You can use a maximum of 24 characters.
- description: Optional parameter and you can add any free text. You can provide any alphanumeric value and wildcard characters are supported. You can use a maximum of 1000 characters.
- required: Set the value to true to make the field as a mandatory field in the form.
- defaultValue: You can specify a default value for the field.
- regex: You can provide the expected regular expression for the value in the input field. For example, specify (A-Z), if you expect only uppercase alphabets in the input field.
- placeholder: You can specify any free text to be displayed inside the field. You can provide any alphanumeric values and wildcard characters.
- defaultValue: You can specify a default value for the field.
The key-value pairs associated with string should be configured under SERVICEVARIABLES in the workflow definition.SERVICEVARIABLES [{ "type": "STRING_TYPE", "name": "name A", "displayName": "display name", "description": "text", "placeholder": "text", "required": "true", "regex": "regular expression", "defaultValue": "value1" }] -
- integer
- You can specify the following mandatory and optional
key-value pairs to create a field for selecting numbers
within a specific range.
- Mandatory parameter
-
- name: Specify a name for the entire set of key-value pairs that needs to be added to create the field. The name must start with a letter, and can contain alphanumeric characters, dashes, and underscores only. You can use a maximum of 16 characters.
- Optional parameters
-
- displayName: Specify a name for the checkbox. You can provide any alphanumeric values and wildcard characters. You can use a maximum of 24 characters.
- description: Optional parameter and you can add any free text. You can provide any alphanumeric value and wildcard characters are supported. You can use a maximum of 1000 characters.
- required: Set the value to true to make the field as a mandatory field in the form.
- defaultValue: You can specify a default value for the field.
- placeholder: You can specify any free text to be displayed inside the field. You can provide any alphanumeric values and wildcard characters.
- minimum: Specify a minimum value for the field.
- maximum: Specify a maximum value for the field.
The key-value pairs associated with integer should be configured under SERVICEVARIABLES in the workflow definition.SERVICEVARIABLES [{ "type": "INTEGER_TYPE", "name": "name A", "displayName": "display name", "description": "text", "placeholder": "text", "required": "true", "regex": "regular expression", "defaultValue": "value1", "minimum": "value", "maximum": "value" }]
-
Examples
- Run the following workflow
definition to create a mandatory drop-down list of footwear and accessories with
tags, in the form.
$jobstream JOBSTREAM /WS_K8S_AGT_0#/JS_NEW ISSERVICE SERVICENAME "modifier" SERVICETAGS "tag123|tag456" SERVICEVARIABLES [ { "type" : "select", "name" : "womenWear", "required" : true, "choices" : [ { "displayName" : "Dress", "value" : "Armani dress" }, { "displayName" : "Shoes", "value" : "Sneakers" }, { "displayName" : "Jeans", "value" : "Levi's jeans", "selected" : true } ] } ] MATCHING SAMEDAY : END - Run the following workflow
definition to create a mandatory radio button in the
form.
$jobstream JOBSTREAM /WS_K8S_AGT_0#/JSD_NEW ISSERVICE SERVICENAME "wear" SERVICEVARIABLES [ { "type" : "radioGroup", "name" : "clothes", "displayName" : "mens wear", "description" : "clothes for men", "required" : true, "choices" : [ { "displayName" : "shirt", "value" : "long-sleeve shirt" }, { "displayName" : "watch", "value" : "sport watch" }, { "displayName" : "hat", "value" : "baseball hat", "selected" : true } ] } ] MATCHING SAMEDAY : END