How to emit the output values from child Decision Tables while calling parent's Decision

Hi DMNEngine Team,

I have many child Decision tables whose outputs are passed to other Decision tables as input. I have deployed the DMN into SpringBoot app, and invoking the parent table through REST calls. When I invoke the parent table, i get only the outputs defined in the parent table. Whereas, I want to get the outputs defined in the child tables as well. Can someone guide how can this be achieved.?

For eg, In the below DMN, when I invoke the ‘Beverages’ table, I want to see the outputs emitted from Dish table as well.
The DMN Online Simulator works this way, it always emits the outputs from child table as well. I expected the same will be possible through libraries.

Hi @Chenbaga_M_K ,

I think that in the runtime, the only way to make this happen is to split the decision tables so that the Dish DMN is called, and returns its results as variables, which are then fed into the Beverages DMN. It makes the overall Process a bit longer but I think it is the only way to ‘un-nest’ the decision tables.

Best Regards,
dg

Hi @Chenbaga_M_K ,

Each decision of DRD, whether it is a decision table or a literal expression, has a unique decision definition key.

REST API can evaluate only a single decision so to get results of each decision separately, you need to call REST API for each decision separately (two calls are needed in the provided example).

Thanks @hassang @davidgs .
@hassang I want to save the extra calls, since i have many child decision tables(7 tables) in my original usecase, cannot maintain REST calls to invoke each tables. Is it fine to explicitly ‘output’ the variables received from the child tables in the parent table?
In the above example, adding an output column for Dish in the Beverages. Can you recommend what would be the right approach to handle this?

Also, i wonder how the DMN Online Simulator is doing it the way I want it to be. Is there any way to mimic the same via a single REST call or DMN Java library… ?

FYKI,
This is the ScreenShot from DMN Online Simulator, which emits child table variables as well.

Hi @Chenbaga_M_K,

the DMN Simulator wraps some logic around the decision engine before it evaluates the rules.

The simulator does not invoke the REST API of the DMN engine directly. (Have a look at the dev tools of your browser)

The wrapper is responsible to provide the output you see.

Hope this help, Ingo

Thank you.