You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new text in 10.3.2.9.4 Type conversions is a welcome addition, but some situations are missed and left undefined in behaviour. There are a lot of places in a model that can explicitly define a typeRef. Having an explicit typeRef (IMO) has implications for implicit conversion. And it doesn't matter where it is ... everywhere that has a typeRef should be subject to the same implicit conversion as defined in this section - not just filters, invocations and DRG variables.
Here are just a few examples:
An InputData has a typeRef of (say) string, but the actual provided input value is a number. It should be coerced to null.
An InputData has a typeRef of (say) a collection of string, but the actual input value is just a simple string value. It should be coerced a singleton string list.
A boxed list has two elements. Element 2's expression has a typeRef of string. The executing expression actually returns a number. It should coerced to null with list being [, null]
A context entry has an expression with a typeRef of string. The actual expression returns a number. The value of the entry should become null.
That make sense?
I would add another element to the "There are several kinds of contexts in which conversions may occur:" section.
Something like:
"Any DMN element that may specify a typeRef may be subject to implicit conversion. If the explicitly-typed DMN element may have a value bound to it such as a DRGs element's variable, or an InputData's value then implicit conversion occurs on binding of the value. If the explicitly-typed DMN element provides a value, such as any boxed expression or Decision Service or BusinessKnowledgeModel, then its return value is subject to implicit conversion."
From discussion on the meeting - This needs to be transformed into an RTF proposal. @StrayAlien, could you please write a complete list of things you thing needs to be updated in the section? Or is the current description complete? We could then work together on a proposal.
The new text in 10.3.2.9.4 Type conversions is a welcome addition, but some situations are missed and left undefined in behaviour. There are a lot of places in a model that can explicitly define a typeRef. Having an explicit typeRef (IMO) has implications for implicit conversion. And it doesn't matter where it is ... everywhere that has a typeRef should be subject to the same implicit conversion as defined in this section - not just filters, invocations and DRG variables.
Here are just a few examples:
An InputData has a typeRef of (say)
string
, but the actual provided input value is anumber
. It should be coerced tonull
.An InputData has a typeRef of (say) a collection of
string
, but the actual input value is just a simple string value. It should be coerced a singleton string list.A boxed list has two elements. Element 2's expression has a typeRef of
string
. The executing expression actually returns anumber
. It should coerced to null with list being [, null]A context entry has an expression with a typeRef of
string
. The actual expression returns a number. The value of the entry should become null.That make sense?
I would add another element to the "There are several kinds of contexts in which conversions may occur:" section.
Something like:
"Any DMN element that may specify a typeRef may be subject to implicit conversion. If the explicitly-typed DMN element may have a value bound to it such as a DRGs element's variable, or an InputData's value then implicit conversion occurs on binding of the value. If the explicitly-typed DMN element provides a value, such as any boxed expression or Decision Service or BusinessKnowledgeModel, then its return value is subject to implicit conversion."
gives :
["foo", null]
.. or a BKM
should return
null
.or ...
But the actual input data is
["foo"]
.... it should be unboxed to a single value.The text was updated successfully, but these errors were encountered: