-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
False
-
False
-
-
2021 Week 40-42 (from Oct 4), 2021 Week 43-45 (from Oct 25)
Current design mandates that the DataContext only contains "data".
However, there are many use cases where the "request" that we "send" to the engine, requires extra parameters that are not part of the payload, but directives to the engine itself, i.e. metadata.
Define a way to provide such metadata.
e.g. *one possibility* may be to define an extended DataContext :
interface ExtendedDataContext extends DataContext { MetaDataContext meta(); DataContext data(); } // then: MetaDataContext meta = MapDataContext.create(); ctx.set("some-flag", value); MyCustomCtx datactx = new MyCustomCtx(...,...,...); DataContext ctx = ExtendedDataContext.create(meta, datactx); // the service decodes the type of context DataContext res = dmnSvc.evaluate(someId, ctx); ExtendedDataContext ext = res.as(ExtendedDataContext.class); MetaDataContext = ext.meta() // may be empty MyCustomCtx tres = ext.data().as(MyCustomCtx.class) // extract a typed result
Explore this design space.
- blocks
-
KOGITO-5842 Public API: Incubation (round 2)
- Resolved