Introduction

The Case bundles all kinds of information in order to help the case workers in achieving their goals. This information might change, possibly leading to a different approach on getting to the goal. Changing a contact person for example, might lead to the need for sending a notification from the Case, or the change of a house address might lead to a needed recalculation of an offer on an insurance policy which was not yet completed.

These are examples of some other party, notifying the case engine that something has changed. Blueriq offers a possibility to send this notification to the Case-Engine, and make sure the consequences are determined after receiving the message. However, it takes some skill for the Business Engineer to run through all necessary steps. Below is an explanation on how to achieve this.

How to model Handling a Message Event

An example on how message events can be modelled.

Step 1 - Create a REST interface to retrieve messages

If some other system should be able to send events to a Case, it would probably needs to to this using either a REST or SOAP message. Therefore the first step would be to construct a BAA(R)S service to receive the message. This service needs to determine:

  • what message is should be thrown
  • which cases are affected and should be updated using the message event

The Message Event Type could correspond to an actual Message Event Type in de model. This can be added using the process module. In my example We're going to assign a case to a case worker. Meaning we will add the person to the involved users list of the case. Granting him access to the case as a case worker. In my example I already know which case I want to assign, so the input REST message contains a specific Case ID, and the username + userid of the user I want to assign.

A webservice implementation flow could look like this:

Step 2 - Send an actual Message Event to the right case

First some extra checks on the input of the service, when everything is valid, We will throw the message event to the right case:

The REST service pushes a message to the queue of the Case Engine and flows to the exit.

Note that Message Events can only be thrown to a process with exactly the same Application ID (project + branch), so the webservice should be modelled in the same project which is also used in the Case Engine to process the Case.

When no CaseID s sent in the DCM_ThrowAsyncMessageEvent service (the field is left empty), the event is thrown to all cases with the same Application ID. This might for example make sense when you want to migrate all cases with the same type after publishing a new model to the Runtime/Case-Engine.

Step 3 - Receive the Message Event in the Case Process

The Message is thrown to the process of the corresponding case. Make sure the process is listening to events of that specific type when the event is thrown. This can be done by adding the message event listener to the process. Make sure there is some follow up action modelled to actually process the message event. Probably an automatic task. For example:

When this process starts, it will start waiting on an incoming message event. When it has arrived, it will map the information to the process profile (selected on the right) and flow to the task below. The task is an automatic task to process the data which has just been stored in the process. In my example, this process is a repeatable ad-hoc process, so it will restart itself after the task has finished.

Step 4 - Process the data in an automatic task

The automatic task to process the message event should contain a DCM_GetCaseInfo to retrieve the actual data from the message event, and map this to the dossier. From this point on, you can do whatever is needed to process the data. In my example just adding an involved user to the set of users. But this could also mean retrieving the "changed" data from the source that has sent the message event in the first place. When a contact person has changed his details for example, toe response could be calling the system to retrieve the new contact details and adding them to the case for later use.

Another change could be that your logic on how to proceed with the case changes, for example an extra task becomes available to assess the new change, or maybe the goal of the case has been reached after change. It is up to the Business Engineer to do whatever is needed.

Future state

We are aware of the number of steps needed to process a message event. In the future we are aiming to make this much easier for the Business Engineer. 

  • No labels