PPA: Task Interface
Inputs & Outputs
Actions in the user interface module generate inputs & outputs in the task interface.
When new inputs & outputs are generated, they flow into the task interface from bottom to top.
The one exception to this rule is the progress bar, explained here.
Elements & IDs
All visual input & output elements in the PPA task interface have a unique ID.
By default PPA will auto-generate IDs for all elements, but you can also provide your own.
Most of the user interface actions accept the optional
The following rules explain how elements & IDs work:
- Only 1 element with a given ID will be visible at any time
- You can't display multiple elements with the same ID at the same time
- Generating a new element with an existing ID will replace the existing element
- When an element is replaced, the new element appears at the bottom
Using Element IDs
You should supply an
element_id if you need to:
- Create a progress bar & update its value
- Prompt for input that may require multiple attempts
- Replace an input or output element in the task interface with another
The progress bar works differently to other elements.
It is recommended to always supply an
element_id to a progress bar.
A progress bar with a given ID will not move once it is generated.
Rather than being replaced in the interface, it will be updated.
When using a progress bar you'll probably need to update its value along the way.
You can do this by:
- Assigning each progress bar a unique
- Supplying the
element_idto the action when you need to update its value
Updating Progress Bars
1 2 3 4 5 6 7 8 9
Multiple Inputs Example
The step in this example will:
- Ask the Task Operator to supply & confirm a new password
- Output an error if the passwords don't match
- Repeat all actions if the passwords don't match
Currently there are no
element_id parameters supplied to the actions.
Each input & output will have its ID auto-generated.
Example 1 - Without Element ID
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
The screenshot below shows what happens in PPA if the step repeats.
New input & output elements are generated each time the step runs.
The task interface can become cluttered if the step repeats multiple times.
Supplying a unique
element_id to each action will re-use the input & output elements.
Example 2 - With Element ID
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Again, the screenshot below shows what happens in PPA if the step repeats.
Each time the step runs, the existing input & output elements are re-used:
- The first New Password input has been removed
- A new one is presented at the bottom
No matter how many times the step repeats, there will only ever be 3 elements visible in PPA.