Edit and configure the inputs in your service.
An input is automatically populated in your service for each variable in the workflow definition file. Inputs are presented to the submitter when they start a service. Submitters must provide values for all required inputs before they submit a published service to run.
When you build a service, you can edit inputs to add further customizations, restrictions, and make it easier for someone to submit the service. Some input properties are determined by the workflow definition file, while others can be set when you create the service. For more information, see Creating workflow definition files for services.
Go to the Details tab when you create your service to edit inputs. Select an input to open the input detail and properties right panel. Use the arrow to expand and collapse the Details pane and Properties pane.
- The input label is automatically populated with the label tag of a variable in the workflow definition file. You can enter a different name for the input in the Label field.
- Help text
- Variable help text is automatically populated with the description tag of a variable in the workflow definition file. You can enter different or additional help text in the Help field. Use help text to give submitters information about what the input is, how to determine the appropriate value for the input, or an example. You can also include information about any validation criteria on the input.
- You can set the requirement as "Required" or "Optional". A service cannot run without a value for a required input. An input cannot be "Optional" if the associated variable is set as "Required at Create" in the workflow definition file.
- Form element
- The form element controls how the submitter can interact with the input and how the input value
is provided. The types of form elements are field, selection, and hard-coded value.
- Text field
- A text field form element allows the submitter to enter the input value. This is usually a text field, but can also be a date or time picker, depending on the type of the variable in the workflow definition file.
- Use a text field if you want the submitter to enter a value and you are not providing any options to select.
- A selection form element allows the submitter to select an input value from options you provide. Use this form element if there's a finite number of possible values, or the same values are used repeatedly. Set the custom option to "enabled" if you want the submitter to be able to enter in a value other than the options you provide.
At least one option is required for inputs with a selection form element. Enter options in the Enter option field and click Add. Hover over options to click the delete icon , edit icon , or move icon . Click Apply when editing an option for your changes to take effect. Your ability to add, edit, and delete options for an input is restricted if "valueMustBeChoice" is set to "true" in the workflow definition file. In this case, you can further limit which options from the workflow definition file can be used by de-selecting them in the list of options. Only selected options are available to the submitter.
Inputs with a selection form element appear differently to the submitter based on the requirement and number of options available:
Table 1. Presentation of selection form element to submitters based on requirement and number of options Number of options Requirement Presentation 1 Optional Checkbox 2-7 Required Radio buttons 2-7 Optional Drop-down menu 8+ Required Drop-down menu 8+ Optional Drop-down menu
- Hard-coded value
- A hardcoded value cannot be changed, but are displayed to the submitter when they submit the service. Use a hardcoded value if you want the same input value used every time that the service runs.
- As described in the Details tab, all inputs that are used in runAsUser steps by the workflow definition file require a hardcoded value. You should use a hardcoded value instead if you require an input that only has one selection value and custom options disabled.
- Text field
- Default value
You can assign a default value to any input. If the form element is a text field, enter the default value. If the form element is a selection, select the default value from the list of options. The submitter can override a default value when you provide input values.
If you set a default value for an optional input, that value is used if the submitter does not change or remove it. If you do not set a default value for an optional input, no value is used if the submitter does not enter or select one.
- Validation criteria
Add validation criteria to inputs to limit acceptable values and prevent errors when the service runs. Validation criteria set in the workflow definition file cannot be changed in the service. The validation criteria available to services is the same as the validation criteria available in the Workflows task.
- Character count
- Regular expression
Variable types set in the workflow definition file impact the input format, form element, and other requirements.
|Variable type||Allowed form element||Details|