Skip to content
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

[Fix_#3465] Adds DMN support to SonataFlow #3468

Merged
merged 6 commits into from
Apr 18, 2024
Merged

Conversation

fjtirado
Copy link
Contributor

@fjtirado fjtirado commented Apr 9, 2024

Fixes #3465
A new DMN custom type (called "dmn") has been added to swf parser.
The mapping is either automatically performed from the workflow model (if the name matches), so there is not need to provide args. If the workflow model names does not match, the workflow writer should provide the mapping as argument of the function call.

This is the workflow definition used in the unit test (which just calls the traffiction violation decision from the workflow)

{
  "id" : "traffic-violation",
  "name" : "traffic-violation",
  "version" : "1_0",
  "start" : "traffic-violation",
  "functions" : [ {
    "name" : "DMNTest",
    "operation" : "dmn",
    "type" : "custom",
    "metadata" : {
      "file" : "Traffic Violation.dmn",
      "namespace" : "https://github.com/kiegroup/drools/kie-dmn/_A4BCA8B8-CF08-433F-93B2-A2598F19ECFF",
      "model" : "Traffic Violation"
    }
  } ],
  "states" : [ {
    "actions" : [ {
      "functionRef" : "DMNTest"
    } ],
    "name" : "traffic-violation",
    "type" : "operation",
    "end" : true
  } ]
}

See example apache/incubator-kie-kogito-examples#1906

@fjtirado fjtirado force-pushed the Fix_#3465 branch 2 times, most recently from 1afb1a1 to 4238d01 Compare April 9, 2024 17:40
@fjtirado fjtirado force-pushed the Fix_#3465 branch 4 times, most recently from 30ec623 to 753e21f Compare April 12, 2024 15:29
@fjtirado fjtirado force-pushed the Fix_#3465 branch 2 times, most recently from bf1710f to d3acdc8 Compare April 12, 2024 15:50
@fjtirado fjtirado changed the title [Fix_#3465] Adding DMNWorkItemHandler [Fix_#3465] Adds DMN support to SonataFlow Apr 12, 2024
@fjtirado fjtirado marked this pull request as ready for review April 15, 2024 13:51
@baldimir
Copy link
Contributor

baldimir commented Apr 15, 2024

Hi, I opened a thread on the dev mailing list about this, because I didn't saw one there. Let's see if we have an agreement about this there. I think it is worth discussing it.

Copy link
Contributor

@gitgabrio gitgabrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fjtirado
There is only one bit I would prefer to be changed (the usage of dmn from shared model)
Thanks!

@fjtirado fjtirado requested a review from gitgabrio April 17, 2024 14:42
@fjtirado fjtirado merged commit de3b86b into apache:main Apr 18, 2024
6 checks passed
rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this pull request Apr 23, 2024
* [Fix_#3465] Adding DMNWorkItemHandler

* [Fix_#3465] Node approach

* [Fix apache#3465] Supporting white space

* [Fix apache#3465] Refactor mapping

* [Fix apache#3465]  Support function arguments

* [Fix apache#3465] Gabrieles comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to call drl or dmn natively through a function
4 participants