Skip to content

Commit

Permalink
🐛 [#4269] Fixed DMN integration for real-world decision definitions
Browse files Browse the repository at this point in the history
Backport-of: #4282
  • Loading branch information
sergei-maertens committed May 10, 2024
1 parent 62e0a9d commit 116214c
Show file tree
Hide file tree
Showing 22 changed files with 637 additions and 76 deletions.
100 changes: 100 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"classnames": "^2.3.1",
"copy-to-clipboard": "^3.3.1",
"design-token-editor": "^0.6.0",
"feelin": "^3.1.0",
"flatpickr": "^4.6.9",
"formik": "^2.2.9",
"formiojs": "~4.13.0",
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ django-autoslug==1.9.9
# via -r requirements/base.in
django-axes[ipware]==6.0.5
# via -r requirements/base.in
django-camunda==0.14.0
django-camunda==0.15.0
# via -r requirements/base.in
django-capture-tag==1.0
# via -r requirements/base.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ django-axes[ipware]==6.0.5
# -c requirements/base.txt
# -r requirements/base.txt
# django-axes
django-camunda==0.14.0
django-camunda==0.15.0
# via
# -c requirements/base.txt
# -r requirements/base.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ django-axes[ipware]==6.0.5
# -c requirements/ci.txt
# -r requirements/ci.txt
# django-axes
django-camunda==0.14.0
django-camunda==0.15.0
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements/extensions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ django-axes[ipware]==6.0.5
# -c requirements/base.in
# -r requirements/base.txt
# django-axes
django-camunda==0.14.0
django-camunda==0.15.0
# via
# -c requirements/base.in
# -r requirements/base.txt
Expand Down
24 changes: 12 additions & 12 deletions src/openforms/dmn/contrib/camunda/tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ def test_get_inputs_outputs(self):
outputs = params.outputs

self.assertEqual(len(inputs), 2)
self.assertEqual(inputs[0]["label"], "Invoice Amount")
self.assertEqual(inputs[0]["expression"], "amount")
self.assertEqual(inputs[1]["label"], "Invoice Category")
self.assertEqual(inputs[1]["expression"], "invoiceCategory")
self.assertEqual(inputs[0].label, "Invoice Amount")
self.assertEqual(inputs[0].expression, "amount")
self.assertEqual(inputs[1].label, "Invoice Category")
self.assertEqual(inputs[1].expression, "invoiceCategory")

self.assertEqual(len(outputs), 1)
self.assertEqual(outputs[0]["label"], "Classification")
self.assertEqual(outputs[0]["name"], "invoiceClassification")
self.assertEqual(outputs[0].label, "Classification")
self.assertEqual(outputs[0].name, "invoiceClassification")

def test_get_inputs_outputs_table_with_dependency(self):
# This decision ID depends on the invoiceClassification table
Expand All @@ -179,11 +179,11 @@ def test_get_inputs_outputs_table_with_dependency(self):
outputs = params.outputs

self.assertEqual(len(inputs), 2)
self.assertEqual(inputs[0]["label"], "Invoice Amount")
self.assertEqual(inputs[0]["expression"], "amount")
self.assertEqual(inputs[1]["label"], "Invoice Category")
self.assertEqual(inputs[1]["expression"], "invoiceCategory")
self.assertEqual(inputs[0].label, "Invoice Amount")
self.assertEqual(inputs[0].expression, "amount")
self.assertEqual(inputs[1].label, "Invoice Category")
self.assertEqual(inputs[1].expression, "invoiceCategory")

self.assertEqual(len(outputs), 1)
self.assertEqual(outputs[0]["label"], "Approver Group")
self.assertEqual(outputs[0]["name"], "result")
self.assertEqual(outputs[0].label, "Approver Group")
self.assertEqual(outputs[0].name, "result")
42 changes: 42 additions & 0 deletions src/openforms/js/compiled-lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,12 @@
"value": "Birth Date Component"
}
],
"4sFGgA": [
{
"type": 0,
"value": "The expressions here are extracted from the selected decision definition. It's possible certain inputs are displayed here that are already provided by a dependency of the selected decision, due to the complexity of the input expression."
}
],
"5/5LjA": [
{
"type": 0,
Expand Down Expand Up @@ -669,6 +675,12 @@
"value": "Stay logged in"
}
],
"6jv6nd": [
{
"type": 0,
"value": "Data type"
}
],
"6k14SS": [
{
"type": 0,
Expand Down Expand Up @@ -795,6 +807,12 @@
"value": "Years"
}
],
"7cfkp6": [
{
"type": 0,
"value": "Expected input expressions"
}
],
"7di6Fm": [
{
"type": 0,
Expand Down Expand Up @@ -2453,6 +2471,12 @@
"value": "Confidentiality"
}
],
"R8/zGm": [
{
"type": 0,
"value": "Form variable"
}
],
"RN628y": [
{
"type": 0,
Expand Down Expand Up @@ -4005,6 +4029,12 @@
"value": "Tab name"
}
],
"i7Vmcf": [
{
"type": 0,
"value": "Label"
}
],
"iHpAYZ": [
{
"type": 0,
Expand Down Expand Up @@ -4071,6 +4101,12 @@
"value": "years"
}
],
"ipGvSb": [
{
"type": 0,
"value": "Expression"
}
],
"iq0ppL": [
{
"type": 0,
Expand Down Expand Up @@ -4129,6 +4165,12 @@
"value": "House number component"
}
],
"jLv6k8": [
{
"type": 0,
"value": "DMN variable"
}
],
"jU/t8O": [
{
"type": 0,
Expand Down
Loading

0 comments on commit 116214c

Please sign in to comment.