Hi @Deepak_Srivastava,
The JUnit test will start a Camunda engine with an in-memory database as part of the test. There is no further installation required.
Instead of the documented version, you can write it a bit shorter with:
@Test
@Deployment(resources = {"tweetpruefung.dmn"})
public void testPasswortTweeten() {
Map<String, Object> variables = withVariables("content", "passwort: 123456", "email", "egal@email.de");
DmnDecisionTableResult decisionTableResult = decisionService().evaluateDecisionTableByKey("tweetpruefung", variables);
assertThat(decisionTableResult.getFirstResult()).containsEntry("approved", true);
}
Just adjust the input parameters and expected values to your need.
A project template with all maven dependencies for this Junit test is available at github: https://github.com/camunda/camunda-engine-unittest.
If you want to deploy the file directly into a running Camunda engine, you can use the Rest API: https://docs.camunda.org/manual/7.14/reference/rest/deployment/post-deployment/.
Why not? From my experience, a decision table with more that 10 Input parameters and more than 10 Output parameters didn’t serve just a single decision. It has grown over the past and from the business point of view it covers many special decisions where most of the parameters are not needed or null.
If this is the case, I would recommend to go the extra mile and have a look at common parameter combinations and try to extract them into separate tables.
You can find a simple example in our dmn simulator: https://consulting.camunda.com/dmn-simulator/.
Hope this helps, Ingo