Jarvis Pizzeria: Managing DM Masterdata Validity Period

In a previous blog we described how to retrieving the masterdata from a VBCS Business Object. In this blog we will expand this further with a validity period for the masterdata.

Now let’s expand our scenario (see previous blog)  a little further. Currently, one of the means of transport in the Decision model is a bike. Many bikes in the Netherlands are currently being replaced by an electrically powered version. Jarvis Pizzeria will also replace regular bikes with electric bikes from the new year. The change must also be implemented in the system (read Decision Model).

However, we do not want to implement this change at the turn of the year, but are already preparing it now. To achieve this, the variables must be provided with attributes that delimit the validity period of the variable.

Because we have already moved the variables of the Decision Model to a Business Object (see previous post), this is fairly easy to implement. Extending the BO definition with a start and end date and adjusting the selection query so that it takes these dates into account would be sufficient. So let’s see what that will look like.

Firstly, the adaptation of the BO definition (the last two fields are new)

And a subset of the filled table.

As can be seen in the table, all parameters of the bike have an end date of Dec 31, 2019. And the parameters of the e-Bike have a start date the day after.

The modified select query (the q parameter):

q = (applicationType='') and (groupType='') and (startDate<'') and (endDate>='')

If we now e.g. on 31 Dec 2019 want to retrieve the variables for a bike, this can be done via the following content of the q parameter:

q=(applicationType='Deliverytime.calculateDeliveryTime') and (groupType='Bike') and (startDate='2019-12-31') and (endDate>='2019-12-31')

Because the next day the bike is no longer used, this same call will not produce any results.

It may be clear that it works the other way around for the e-Bike. Until the end of the year, it will not provide any value for the variables, and it will in the new year.

As a final step, this modified variant of the query must still be implemented in the integration. This happened in the mapping step “Map To CalculateDeliveryTime”.

This brings us to the end of the blog where we described a bit of functionality around Decision Models. But the story is not yet complete.

From an administrative point of view, we at Jarvis believe it is important that we can always see how we have achieved certain results. In this case this means that we want to know with which variables the Decision Model was invoked and what the outcomes were. How we do this is the subject of our next blog.

5 thoughts on “Jarvis Pizzeria: Managing DM Masterdata Validity Period

Leave a comment