Closed ongbt closed 3 years ago
Hello @ongbengtiong, your last statement "Seems like you are using the label as the identifier of the output element instead of using name." is correct. It's also mentioned in the Outputs in XML chapter of documentation.
The reason why I decided to do it this way is that label is something that is what you seen in the Camunda decision table designer (and in the simulator as well) by default. Also when you create an output, the output name is empty by default and I think the most of users just set the label.
So the behavior you described is "as designed". Frankly I'm not sure whether to change (update) the design to take the name into the consideration as well, because this will probably be breaking change and a lot of existing DMN files might stop working properly, so there will have to be some king of flag/policy allowing the user to override the current behavior when needed.
Thanks Radek
closing the ticket, works as designed
I am using the downloaded DMN (v1.3) from https://consulting.camunda.com/dmn-simulator/
I changed the Inputs' name to 'season', 'guestCount', 'guestsWithChildren' from the original 'Season', 'Number of Guests', 'Guests with children?' so that WithInputParameter will run correctly.
At the line 'var outcome = ctx.ExecuteDecision("Beverages");', I encountered this exception:
DynamicExpresso.Exceptions.UnknownIdentifierException: 'Unknown identifier 'desiredDish' (at index 0).'
I looked at the DMN file and saw that the Beverages decision has an input:
`
... that is the output from Dish decision:
<output id="OutputClause_0lfar1z" label="Dish" name="desiredDish" typeRef="string" />
When I changed the output clause of Dish decision to the following, the code worked:
<output id="OutputClause_0lfar1z" label="desiredDish" name="desiredDish" typeRef="string" />
Seems like you are using the label as the identifier of the output element instead of using name.