powered by ASAP

1. Summary

Both commands let the user choose an item from a specified list. Search item additionally offers the functionality to search for an item by typing in the textfield.

2. Examples

Example 1. The Command

Due to simplicity, the descriptiveText input parameter will be left empty for the examples. By default, it is set to „Please select an item to continue.“.

All example images use the Human Task representation of the Workflow Executor.

The parameter issueKeyList has to be set for both commands.

2.1. Choose Item

ChooseItem1 1
Example 2. Command run with simple list

In the first example, we input [1,2,3,4], so we are prompted to choose out of a list containing all items. After selecting an item, it will be written to the datastore as is.

This representation works well for simple input lists, however sometimes you might have an input like

    "firstName": "Max",
    "lastName": "Mustermann",
    "age": 35
    "firstName": "John",
    "lastName": "Doe",
    "age": 23
    "firstName": "Peter",
    "lastName": "Smith",
    "age": 28

which would be shown as follows.

ChooseItem2 1
Example 3. Command run with complex JSON

This might be hard to read for your user. Using a simplified interpolation, we can make use of the labelMapping parameter to tackle this issue. So for instance we could map our input to §{lastName}, §{firstName}.

In order to not clash with PAKs interpolation, we use § to indicate a label mapping
You can only map one level deep into the JSON
ChooseItem2 2
Example 4. Command run with mapping

In the third example we mapped our input for better readability. When we for example select John Doe, our resulting item will be written as {"firstName":"John","lastName":"Doe","age":23} under the key selectedItem. The selectedLabel is also written as "Doe, John" in this instance.

2.2. Search Item

All functionality described above is also applicable to the SearchItem Command. In contrast to, SearchItem also offers the ability to look for an item using the appearing textfield. We can also adjust the initial text by setting the inputText parameter. Additionaly the input field selectionMode can be specified to multiple in order to select multiple items from the list.

SearchItem1 1
Example 5. Command run with prompt text

In this example we ran the command with the input list [1,2,3,34,35], the input text is "3" in this case. The displayed view is filtered according to our input text and could be filtered further by altering the textfields value.