Search Entity Use Case

1. Description

Search Entity is a use case that is meant to implement any entity centric full search process.
Usually this type of use case introduces a criteria search input- or filter-, a search action that will search for entities satisfying the criteria and a search result that will display entities that were retrieved by the search action.

Averos introduces a workflow command, named search-entity-uc , that automates such use case creation. The command will create a search entity use case by combining two averos generic composite components: averos-search-entity and averos-search-result.

2. search-entity-uc Command Usage

ng g @wiforge/averos:search-entity-uc

The workflow will guide you throught several interactive steps towards the search entity use case creation.
It will end up by creating a full search entity use case with the appropriate menu items and advanced search actions.

πŸ”– Note that since Search Entity use case is the composition of two averos generic composite components, namely averos-search-entity and averos-search-result, its configuration will be managed by mainly two averos use case view layout:

  • searchInputUCViewLayout : This use case view layout controls averos-search-entity by defining which filters (entity fields) to include for search operation. Therefore adding and removing filters could be achieved by updating the searchInputUCViewLayout configuration with respect to the target entity.
  • tableUCViewLayout : This use case view layout controls averos-search-result by defining which entity members to display in the search result. Therefore adding and removing output fields could be achieved by updating the tableUCViewLayout configuration with respect to the target entity.

3. UI View Layout

Below is an averos UI view layout example related to create entity use case.

Since the search action will perform an api call in order to retrieve the list of objects satisfying the requested criteria, a notification is displayed to the end user in order to tell that the requested operation is ongoing.
Additionally, all action will be disabled untill the search is completed or the search timeout has reached.

One the search action completed, the resulting data will be displayed in the search result use case.

πŸ”– Note that while in the search result use case, end users have, by default, all crud operations at hand. These operations include create, update, delete, view and export. They can be disabled as well depending on the input use case configuration.

Notice the back button in both view and edit use case. This will take you back to your latest search query result.

🚩 All of the Search Entity use case specifications described above are already available out of the box by the workflow command search-entity-uc.