- 23 May 2023
-
DarkLight
-
PDF
stub
- Updated on 23 May 2023
-
DarkLight
-
PDF
Purpose
The stub
task is used as a placeholder or "stand in" type of task in a workflow.
Potential Use Case
Let's say you are building a workflow and you identify some gaps in your high-level design, but you don't want to stop to work out the details where those gaps exist. You could use the stub task as a placeholder and once you've "stubbed" the placements that you need, you could go back and replace those stand in tasks with a real task or a set of tasks that perform what your workflow is designed to do.
Properties
Input and output parameters are shown below.
Incoming | Type | Description |
---|---|---|
type |
Enum | Required. The type of transition to emulate. Allowed values are error or success. |
delay |
Number | Represents the number of seconds to wait or delay the response. |
response |
String | The response to pass through the stub. |
Outgoing | Type | Description |
---|---|---|
response |
String | Response output from the stub. |
Example
In this example the type
Reference variable is set to "success". The job can also be set set to "error", in which case an error is returned as the response instead of a clean and complete automation. The delay
is set for "12", which shows in the automation as a delay of 12 seconds. The response to pass through is the word "awesome".
The response
that returns for this stub
is the word "awesome", which completed after a 12 second delay. Of note, you can view the 12 second delay in Job Mananger as the job is running.