Skip to content

Upstream PR BXMSDOC-5256-master to upstream master Getting started with Decision Services #2208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added _images/dmn/decision_node_edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/dmn/dmn-custom-datatypes-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/dmn/dmn-gs-context-table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/dmn/dmn-gs-fine-decision-table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/dmn/dmn-gs-test-scenarios-execution-results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/dmn/dmn-gs-traffic-violation-test-scenarios.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/dmn/dmn-new-project-gs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/dmn/dmn-tDriver-custom-datatype.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/dmn/dmn-tFine-custom-datatype.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/dmn/dmn-tViolation-custom-datatype.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/dmn/info-requirement.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/dmn/library_objects.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/dmn/select_logic_type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ After you create the DMN custom data types, assign them to the appropriate *DMN
.Prerequisites
* You have created the traffic violations DMN custom data types in {CENTRAL}.


.Procedure
. Click the *Model* tab on the DMN designer and click *Properties* icon in the upper-right corner of the DMN designer to expose the DRD properties.
. Click the *Model* tab on the DMN designer and click the *Properties* image:getting-started/diagram_properties.png[] icon in the upper-right corner of the DMN designer to expose the DRD properties.
. In the DRD, select the *Driver* input data node and in the *Properties* panel, select `tDriver` from the *Data type* pull-down menu.
. Select the *Violation* input data node and select `tViolation` from the *Data type* pull-down menu.
. Select the *Fine* input data node and select `tFine` from the *Data type* pull-down menu.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The following tables list the `tDriver`, `tViolation`, and `tFine` custom data t
* You created the traffic violations DMN decision requirements diagram (DRDs) in {CENTRAL}.

.Procedure
. To create the `tDriver` custom data type, click *Add* on the *Data Types* tab, enter `tDriver` in the *Name* field, and select `Structure` from the *Type* list.
. To create the `tDriver` custom data type, click *Add a custom Data Type* on the *Data Types* tab, enter `tDriver` in the *Name* field, and select `Structure` from the *Type* list.
. Click the check mark to the right of the new data type to save your changes.
+
.The tDriver custom data type
Expand All @@ -66,7 +66,7 @@ image::dmn/dmn-tDriver-custom-datatype.png[]
* `City` (string)
* `Points` (number)

. To create the `tViolation` custom data type, click *Add* on the *Data Types* tab, enter `tViolation` in the *Name* field, and select `Structure` from the *Type* list.
. To create the `tViolation` custom data type, click *New Data Type*, enter `tViolation` in the *Name* field, and select `Structure` from the *Type* list.
. Click the check mark to the right of the new data type to save your changes.
+
.The tViolation custom data type
Expand All @@ -86,7 +86,7 @@ image::dmn/dmn-tViolation-custom-datatype.png[]
* `driving under the influence`

. Click *OK*, then click the check mark to the right of the *Type* data type to save your changes.
. To create the `tFine` custom data type, click *Add* on the *Data Types* tab, enter `tFine` in the *Name* field, select `Structure` from the *Type* list, and click *Save*.
. To create the `tFine` custom data type, click *New Data Type*, enter `tFine` in the *Name* field, select `Structure` from the *Type* list, and click *Save*.
+
.The tFine custom data type
image::dmn/dmn-tFine-custom-datatype.png[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ image::dmn/dmn-traffic-violations-drd.png[]
.. From the *Package* list, select `org.kie.example.traffic.traffic_violation`.
.. Click *Ok*. The DMN asset in the DMN designer is opened.
. In the DMN designer canvas, drag two *DMN Input Data* input nodes on to the canvas.
. Double-click each input node and rename one to `Driver` and the other to `Violation`.
+

.DMN Input Data nodes
image::dmn/library_objects.png[]

. In the upper-right corner, click the *Properties* image:getting-started/diagram_properties.png[] icon.
. Double-click each input node, and in the *Name* field, rename one to `Driver` and the other to `Violation`.
. Drag a *DMN Decision* decision node on to the canvas.
. Double-click the decision node and rename it to `Fine`.
. Click the *Violation* input node, select the *Create DMN Information Requirement* icon and click the `Fine` decision node to link the two nodes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@ image::dmn/dmn-gs-context-table.png[]

.Procedure
. To calculate the fine, in the DMN designer canvas, select the *Fine* decision node and click the *Edit* icon to open the DMN boxed expression designer.
+

.Decision node edit icon
image::dmn/decision_node_edit.png[]

. Click *Select expression* -> *Decision Table*.
+

.Select Decisiong Table logic type
image::dmn/select_logic_type.png[]

. For the *Violation.Date*, *Violation.Code*, and *Violation.Speed Limit* parameter fields, right-click and select *Delete* for each field.
. Click the *Violation.Actual Speed* column header and enter the expression `Violation.Actual Speed - Violation.Speed Limit` in the *Name* field.
. Right-click the *Fine* parameter field and select either `Insert left` or `Insert right`.
Expand Down