camunda-community-hub / camunda-platform-scenario

Easily execute Camunda process scenarios and verify your expectations with Given/Then/When style tests.
Apache License 2.0
66 stars 15 forks source link

DMN BusinessRuleTask with "asyncBefore" wants me to declare "waitsAtBusinessRuleTask" #93

Open stephanpelikan opened 2 years ago

stephanpelikan commented 2 years ago

Actual behavior

If one has a BusinessRuleTask and this task uses the asyncBefore flag then this is a wait-state. If the implemenation of the task is e.g. external then the mocked behavior can be defined by using waitsAtBusinessRuleTask.

In my situation the BusinessRuleTask is implemented by DMN, so actually there is no need to define any mocked behavior because DMN is execute by Camunda. But due to the asyncBefore flag camunda-platform-scenario is aborting and asks me to use waitsAtBusinessRuleTask for that task.

So, I need to add this

myScenario.waitsAtBusinessRuleTask("MyDMNTask").thenReturn(task -> task.complete());

to make camunda-platform-scenario run through it.

Expected behavior

camunda-platform-scenario recognizes this special situation for BusinessRuleTasks using DMN as implemenation and does not ask to configure the scenario using waitsAtBusinessRuleTask.