Determining Dependency between Decision Tables - Gnorion/BizVR GitHub Wiki

The Problem

Determining the dependency between two tables is an issue in both DMN and in BVR

In DMN the user must manually draw dependency arrows. This means they may either omit arrows when there is a dependency or they may add arrows when there is no real dependency

In BVR the dependency arrows are drawn automatically. However this currently only works when an explicit variable name in the condition of one table matches an explicit variable name in an action of another table. "explicit" = only the variable name is used by itself

So in two simple tables like this with no expressions

image

the arrow can be drawn automatically because the explicit output of DT1 is the variable "eligible" and that is an explicit input to DT2

image image

However, if the conditions or actions are expressions that have the variable names embedded such as this

image

image image

then the dependency is not discovered automatically.

A Solution

It would seem that we need to parse the expressions used in a decision table to extract a list of the input output variable names so they can be used for dependency analysis.

We already do this at the entire decision level by means of the inputs and outputs arrays.

Maybe we need to have inputs and outputs arrays for each table (containing only the variable names). Then for a table like this

image

which currently is displayed like this in the diagram

image

we could show it more compactly like this (displaying only the variable names and not the detailed expressions)

image

Where only the variable names are shown. To see the actual implementation expression you would click to open the table. This does mean that you would ONLY see inputs and outputs listed in the diagram. But I think that would make the diagram simpler - and would show the variables explicitly.

So maybe in the export json that gets sent to VV we might need to add something like this for each table (ruleset) so it can see the actual variable names that are embedded in the expressions.

image