# Dashboard for a mortgage broker

{% hint style="info" %}
Availability of functionality depends on the license and may not be available in all deployments.
{% endhint %}

## Assumptions:

* The broker sees only cases that they started themselves, even when they are no longer currently assigned to them
* The broker can search cases by case number and client surname

{% hint style="info" %}
The dashboard uses data from a projection database, which is fed by events emitted from eximeeBpms. A case started by the broker appears on the list after the process (case) is started in eximeeBpms; this is handled by the thrown event RouterProcessStartedEvent
{% endhint %}

## Changes needed to link the application with the broker who started it

* Projection database in the table **process\_list** was extended with a column **startedBy**. The column stores the login of the user who started the application.
* The dashboard uses a projection database fed by events, therefore support was added to **KafkaProcessListEventConsumer** for handling and consuming the \*\*RouterProcessStartedEvent event containing the user's login. This login is placed into the column **startedBy**.
* On the application that is the start point of the process, a variable should be added **router\_user\_id** - it must be defined as **an input parameter** and added as **a session variable**.

  ```
  Example application: simpleMortgage_app
  Start form: simpleMortgageStartForm, process name: simpleMortgageProcess
  ```

## Defining visibility of dashboard functionality

Visibility of functionality is controlled by roles in the application. A mortgage broker has the permission **feature\_only\_started\_processes**, which allows them to see:

* inbox (list of cases),
* start a new mortgage application via the New Mortgage button (bound application: simpleMortgage\_app),
* filtering of applications tailored to the mortgage broker.

They should also have the permission **feature\_process\_list** - it allows them to have access to the list of cases.

## Filtering cases in the dashboard

* A filter was added when searching applications on the backend - the broker will retrieve only applications that they themselves started.
  * in the search above the case list you can filter cases by client surname,
  * in the Filter window in the Case Id field, after entering part of the case number we should see the filtered cases.
