You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "gitgabrio (via GitHub)" <gi...@apache.org> on 2024/02/13 09:39:51 UTC

[I] DMN - Support new attribute typeConstraint in ItemDefinition [incubator-kie-issues]

gitgabrio opened a new issue, #926:
URL: https://github.com/apache/incubator-kie-issues/issues/926

   In DMN ItemDefinition, add support for new attribute with the name `typeConstraint` with this definition: 
   - typeConstraint: UnaryTests [0..1]
   - "This attribute is a UnaryTests that restricts the values in the base type that are allowed in this ItemDefinition. In case of a collection, it directly constrains the collection and is not projected on the collection elements."
   
   This attribute is similar as the field allowedValues. So to implement this, typeConstraint should be added so it does the same as allowedValues, although also on collections.
   
   Acceptance criteria: 
   - DMN engine is able to evaluate DMN models with ItemDefinitions that are restricted with the new attribute `typeConstraint`.
   - New tests are added that cover 100% of the new code. 
   - DMN editor is able to define a type constraint based on the new attribute. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] DMN - Support new attribute typeConstraint in ItemDefinition [incubator-kie-issues]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio closed issue #926: DMN - Support new attribute typeConstraint in ItemDefinition
URL: https://github.com/apache/incubator-kie-issues/issues/926


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] DMN - Support new attribute typeConstraint in ItemDefinition [incubator-kie-issues]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on issue #926:
URL: https://github.com/apache/incubator-kie-issues/issues/926#issuecomment-1941525556

   (Some context from documentation)
   
   > An ItemDefinition element may restrict the values that are allowed from typeRef, using the
   allowedValues attribute. allowedValues is an instance of UnaryTests that constrains the domain of the
   typeRef. If an ItemDefinition element does not contain allowedValues, its range of allowed values is
   the full range of the referenced typeRef. When an ItemDefinition has sibling itemComponents, their
   values are available in the evaluation context of the UnaryTests of the allowedValues. In cases where the
   isCollection attribute of an ItemDefinition is true, each element of the collection must satisfy the
   UnaryTests of the allowedValues, i.e. the allowedValues are projected onto the collection elements.
   The default value of isCollection is false. The allowedValues attribute has been deprecated as of DMN
   1.5 and replaced with the typeConstraint attribute. The typeConstraint attribute differs from
   allowedValues by not projecting onto collection elements but directly constraining the collection.
   An alternative way to define an instance of ItemDefinition is as a composition of ItemDefinition
   elements. An instance of ItemDefinition may contain zero or more itemComponent, which are themselves
   ItemDefinitions. Each itemComponent in turn may be defined by either a typeRef and
   allowedValues or a nested itemComponent. In this way, complex types may be defined within DMN. The
   name of an itemComponent (nested ItemDefinition) must be unique within its containing
   ItemDefinition or itemComponent


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org