Selection mask
The action type Selection is provided to offer the user a selection of items to choose from. The selection is based on searches and the user can be supported in the selection via corresponding configuration options.
![](../../../__attachments/68817344/20181015_BPM_ConfigureSelection.png?inst-v=01ce9f95-f40d-424e-a7da-0f3a4bad5824)
As a first step, a search must be configured. To do this, the process designer can use the Add search button to display the process searches that already exist in CRM, add them to the process or create a process search using the New search button. These are system searches and cannot be selected or edited in CRM via the standard search mask.
When creating a new search from this mask, only one of the entities from the data model of the process can be used as the start entity.
In particular, the button is inactive if the data model of the process is empty.
The process designer can then select the searches that are known to the process:
![](../../../__attachments/68817344/CRM-4727_ChoseSearch.png?inst-v=01ce9f95-f40d-424e-a7da-0f3a4bad5824)
This search can then be modified or saved under a new name using the
At this point it can be verified whether the search returns the expected result.
![](../../../__attachments/68817344/image2019-2-19_14-13-46.png?inst-v=01ce9f95-f40d-424e-a7da-0f3a4bad5824)
Figure: Editing a search
The search list fields are displayed to the user during execution, which is why these Search list fields are also listed for the process designer for orientation..
In addition to the selected search, the displayed search in the selection dialog can also be overloaded by a variable with the ID (plain key) of another search. Both searches should have a similar structure. It will then be possible to change the search used on the basis of previous decisions in the process.
![](../../../__attachments/68817344/CRM-4727_ChoseSearchVariable.png?inst-v=01ce9f95-f40d-424e-a7da-0f3a4bad5824)
If the selected search contains parameter templates, then these will have to be replaced by variable before execution and before they are displayed in the search mask. The selected variables are displayed as search parameters. Superfluous parameters can be removed via the context menu.
![](../../../__attachments/68817344/CRM-4727_AddSearchParameter.png?inst-v=01ce9f95-f40d-424e-a7da-0f3a4bad5824)
The designer can then configure the field "Selection type" with the number of datasets the user can or must select to successfully complete the work step.
![](../../../__attachments/68817344/20181015_BPM_ConfigureSelection1.png?inst-v=01ce9f95-f40d-424e-a7da-0f3a4bad5824)
The option "Execute search" ensures that the user finds a list when he opens the task. This is a useful feature if the search has already been restricted to this point. This will be the default if the option Show search fields is deactivated. "Show search fields" will ensure that the fields identified as search fields in the search are displayed to the user for input, and he will additionally have the option of executing the search.
Script options are provided here, just like in the detail mask. There are the analogue entry points and the analogue utility classes including "Auto complete" (shortcut UNKNOWN ATTACHMENT+UNKNOWN ATTACHMENT). The additional utility class SearchListUtils
is provided, which allows access to the selected datasets. In the initTask range of the option Search field BEFORE automatic search execution can be preconfigured via the utility class FieldUtils
. The full-text search field can be accessed via the field name "Lucene.entityname". Date fields that consist of two fields with the function "is between" can be selected by entering "#0" or "#1" to select the corresponding field of the search mask.
Optionally, a search can also be initiated automatically, i.e. without user interaction via the method SearchListUtils.startSearch()
. This will initiate the search execution directly at the start of the user task without user interaction. The method will use the preconfigured values from the selection mask or the values set via FieldUtils.setValue()
for the search.
Alternatively, Variables as search parameter can be added to a search. These parameters will replace the placeholder templates just like the logics in CRM in the visible sequence. Parameters without variables will not have any condition attached if less parameters are provided than were defined in the search. The replacement of the placeholder templates is triggered at the time the task opens and before the initial search execution.
To simplify the selection by the user, the continuation can be activated by double-clicking. This is useful if exactly one dataset is to be selected. However, double-clicking is also possible with a multiple selection using the CTRL key.