[jboss-jira] [JBoss JIRA] (DROOLS-4746) UX for DMN "quick test" tool
Guilherme Gomes (Jira)
issues at jboss.org
Tue Apr 7 14:28:27 EDT 2020
[ https://issues.redhat.com/browse/DROOLS-4746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14025763#comment-14025763 ]
Guilherme Gomes commented on DROOLS-4746:
-----------------------------------------
Hi [~uxdlc],
During our scrum meeting, you mentioned that you would need more examples of boxed expressions outputs.
Let's start checking a Decision Table example (which we're familiar with), and then we can check other boxed expressions.
h3. Decision Tables
Consider this example:
!decision-logic-3-2.png|width=800!
Each row represents a rule, thus when the input matches, the respective output value is selected as the decision output. Considering the decision table above, check the following examples and their expected output:
h5. Example 1
Let's consider this input data:
{code}
"Violation": {
"Type": "speed",
"Speed Limit": 60,
"Actual Speed": 100
}
{code}
When users execute this boxed expression, we can expect this output data:
{code}
"Fine": {
"Points": 7,
"Amount": 1000
}
{code}
h5. Example 2
Let's consider this input data:
{code}
"Violation": {
"Type": "speed",
"Speed Limit": 60,
"Actual Speed": 70
}
{code}
When users execute this boxed expression, we can expect this output data:
{code}
"Fine": {
"Points": 3,
"Amount": 500
}
{code}
h3. Other boxed expressions
All right, now let's check other boxed expressions. See this context boxed expression:
!decision-logic-2-2.png|width=800!
Contexts represent a collection of one or more key-value pairs, where the value is a decision logic, and the key is the respective identifier. The value can contain any type of expression: a literal expression, a decision table, a relation, function, an invocation, or even another context. Generally, contexts hold one or more local variables (values related to a local context).
The example above has only one key-value pair. The key is *"Total"* and the value is this Literal Expression: *Driver points + Violation points*
Considering this example, when *"Driver points"* and *"Violation points"* are, respectively, *10* and *5*, the output node *"Should the driver be suspended?"* returns *"NO"*. However, with *"Driver points"* and *"Violation points"* with *10* and *15*, the output node *"Should the driver be suspended?"* returns *"YES"*.
In the example above, we've checked _Literal Expressions_ and _Contexts_.
I think these three boxed expressions types are the most complex ones. You can check the others [here|http://learn-dmn-in-15-minutes.com/learn/decision-logic], but I don't think it's necessary.
Please, ping me if the examples above are not clear enough :)
> UX for DMN "quick test" tool
> ----------------------------
>
> Key: DROOLS-4746
> URL: https://issues.redhat.com/browse/DROOLS-4746
> Project: Drools
> Issue Type: Story
> Components: DMN Editor
> Reporter: Elizabeth Clayton
> Assignee: Elizabeth Clayton
> Priority: Major
> Labels: UX, UXTeam, drools-tools
> Attachments: decision-logic-2-2.png, decision-logic-3-2.png
>
>
> As a DMN author, I'd like to probe the DMN model during the authoring phase without leaving the DMN Editor. Actually, it's really important to explore the DMN model to understand with values are required by the test.
> When the user run the test he can get back the results of the DMN execution.
> Moreover, it would be handy to add those input/output to an existing (or new) test scenario.
> *Acceptance criteria*
> Users are able to:
> * Execute a single node boxed expression by providing node inputs (within the DMN editor.)
> * Explore the DMN model and provide inputs necessary to run a scenario test.
> * Obtain results (Expected) within the DMN editor once the test is run.
> Notes:
> * Try to dissociate this feature from the "test scenario" concept and think of this more as a partial execution. When we're thinking about the concept of a "test scenario", we think about input values and expected outputs... however, in this new component, users will be able to provide inputs and just check the current output.
> * Out of scope: Saving or exporting the "quick test."
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list