From d02a04178b7fc57c2b13b19e56afebe6336097f6 Mon Sep 17 00:00:00 2001
From: Mario Fusco
Date: Thu, 28 Mar 2024 08:01:35 +0100
Subject: [PATCH 01/12] [DROOLS-7616][DROOLS-7617] minor documentation fixes
(#5809)
---
.../_drl-declarations-enumerative-con.adoc | 2 +-
.../src/modules/ROOT/pages/language-reference/_drl-rules.adoc | 2 +-
.../modules/ROOT/pages/rule-engine/_execution-control-con.adoc | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-declarations-enumerative-con.adoc b/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-declarations-enumerative-con.adoc
index d1dc314537f..9300b67e0c4 100644
--- a/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-declarations-enumerative-con.adoc
+++ b/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-declarations-enumerative-con.adoc
@@ -16,7 +16,7 @@ end
rule "Using a declared Enum"
when
- $emp : Employee( dayOff == DaysOfWeek.MONDAY )
+ $emp : Employee( dayOff == DaysOfWeek.MON )
then
...
end
diff --git a/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc b/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc
index 33aa0bd0147..7c06016c2dd 100644
--- a/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc
+++ b/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc
@@ -379,7 +379,7 @@ end
rule "Using a declared Enum"
when
- $emp : /employees[ dayOff == DaysOfWeek.MONDAY ]
+ $emp : /employees[ dayOff == DaysOfWeek.MON ]
then
...
end
diff --git a/drools-docs/src/modules/ROOT/pages/rule-engine/_execution-control-con.adoc b/drools-docs/src/modules/ROOT/pages/rule-engine/_execution-control-con.adoc
index b4e4670801d..5eb5d043fc9 100644
--- a/drools-docs/src/modules/ROOT/pages/rule-engine/_execution-control-con.adoc
+++ b/drools-docs/src/modules/ROOT/pages/rule-engine/_execution-control-con.adoc
@@ -87,7 +87,7 @@ then
end
----
-For this example, the rules in the `"report"` agenda group must always be executed first and the rules in the `"calculation"` agenda group must always be executed second. Any remaining rules in other agenda groups can then be executed. Therefore, the `"report"` and `"calculation"` groups must receive the focus to be executed in that order, before other rules can be executed:
+For this example, the rules in the `"calculation"` agenda group must always be executed first and the rules in the `"report"` agenda group must always be executed second. Any remaining rules in other agenda groups can then be executed. Therefore, the `"report"` and `"calculation"` groups must receive the focus to be executed in reverse order (due to the fact that the agenda groups are placed on a stack), before other rules can be executed:
.Set the focus for the order of agenda group execution
[source,java]
From 9500edcb387d9065573b522693107d394d3a42d2 Mon Sep 17 00:00:00 2001
From: Gabriele Cardosi
Date: Tue, 2 Apr 2024 15:18:06 +0200
Subject: [PATCH 02/12] [incubator-kie-issues#1044] DMN: Copy shared models
from kogito-examples (#5810)
* [incubator-kie-issues#1044] WIP
* [incubator-kie-issues#1044] WIP
* [incubator-kie-issues#1044] WIP - all valid models validated
* [incubator-kie-issues#1044] Fix tags
* [incubator-kie-issues#1044] Validate all valid models from shared module
---------
Co-authored-by: Gabriele-Cardosi
---
.../core/stronglytyped/Traffic Violation.dmn | 13 +-
.../AllowedValuesChecksInsideCollection.dmn | 68 +-
.../DMNv1_5/DateToDateTimeFunction.dmn | 10 +-
.../DMNv1_5/Importing_EmptyNamed_Model.dmn | 2 +-
.../DMNv1_5/Importing_Named_Model.dmn | 4 +-
.../Importing_OverridingEmptyNamed_Model.dmn | 2 +-
.../DMNv1_5/TypeConstraintsChecks.dmn | 70 +-
.../valid_models/DMNv1_x/LoanEligibility.dmn | 432 +++++++++
.../valid_models/DMNv1_x/Prequalification.dmn | 837 ++++++++++++++++++
.../DMNv1_x/Traffic Violation Simple.dmn | 240 +++++
.../DMNv1_x/Traffic Violation.dmn | 313 +++++++
.../valid_models/DMNv1_x/allTypes.dmn | 12 +-
.../valid_models/DMNv1_x/dtevent.dmn | 137 +++
.../valid_models/DMNv1_x/habitability.dmn | 134 +++
.../DMNv1_x/multiple/Financial.dmn | 57 +-
.../multiple/Imported_Traffic_Violation.dmn | 35 +
.../Traffic Violation With Import.dmn | 221 +++++
.../valid_models/DMNv1_x/multiple/stdlib.dmn | 12 +-
kie-dmn/kie-dmn-validation/pom.xml | 40 +-
.../org/kie/dmn/validation/ValidatorTest.java | 107 ++-
20 files changed, 2620 insertions(+), 126 deletions(-)
create mode 100644 kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/LoanEligibility.dmn
create mode 100644 kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Prequalification.dmn
create mode 100644 kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Traffic Violation Simple.dmn
create mode 100644 kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Traffic Violation.dmn
create mode 100644 kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/dtevent.dmn
create mode 100644 kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/habitability.dmn
create mode 100644 kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Imported_Traffic_Violation.dmn
create mode 100644 kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Traffic Violation With Import.dmn
diff --git a/kie-dmn/kie-dmn-core/src/test/resources/org/kie/dmn/core/stronglytyped/Traffic Violation.dmn b/kie-dmn/kie-dmn-core/src/test/resources/org/kie/dmn/core/stronglytyped/Traffic Violation.dmn
index b24fed0d258..1f8f002a13b 100644
--- a/kie-dmn/kie-dmn-core/src/test/resources/org/kie/dmn/core/stronglytyped/Traffic Violation.dmn
+++ b/kie-dmn/kie-dmn-core/src/test/resources/org/kie/dmn/core/stronglytyped/Traffic Violation.dmn
@@ -1,5 +1,16 @@
-
+
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/AllowedValuesChecksInsideCollection.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/AllowedValuesChecksInsideCollection.dmn
index fca927bc707..d0bddbe7989 100644
--- a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/AllowedValuesChecksInsideCollection.dmn
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/AllowedValuesChecksInsideCollection.dmn
@@ -1,58 +1,58 @@
-
-
-
+
- string
-
- string
+
+
- tInterests
-
-
-
- string
-
-
- tInterest
- tInterests
+
+
+
+ string
+
+
+ tInterest
+
- "Golf","Computer","Hockey","Jogging"
-
-
- "Golf","Computer","Hockey","Jogging"
+
+
+
-
-
-
-
-
- "The Person " + p1.Name + " likes " + string(count( p1.Interests )) + " thing(s)."
-
-
-
+
+
+
+ "The Person " + p1.Name + " likes " + string(count( p1.Interests )) + " thing(s)."
+
+
+
-
-
-
+
+
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/DateToDateTimeFunction.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/DateToDateTimeFunction.dmn
index 69986be5faf..31048608aea 100644
--- a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/DateToDateTimeFunction.dmn
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/DateToDateTimeFunction.dmn
@@ -1,11 +1,13 @@
-
+ id="_14BDA5CA-C87F-448D-AF75-F976A9E0EF83"
+ name="new-file"
+ typeLanguage="http://www.omg.org/spec/DMN/20230324/FEEL/"
+ namespace="https://kiegroup.org/dmn/_A7F17D7B-F0AB-4C0B-B521-02EA26C2FBEE">
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Importing_EmptyNamed_Model.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Importing_EmptyNamed_Model.dmn
index ae2fa55bdc5..6bcd6e18387 100644
--- a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Importing_EmptyNamed_Model.dmn
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_5/Importing_EmptyNamed_Model.dmn
@@ -2,7 +2,7 @@
-
-
-
+
- string
-
- string
+
+
- tInterests
-
-
-
- string
-
-
- tInterest
-
- count (?) = 1
-
-
- tInterests
+
+
+
+ string
+
+
+ tInterest
+
+ count (?) = 1
+
+
+
-
-
-
-
-
- "The Person " + p1.Name + " likes " + string(count( p1.Interests )) + " thing(s)."
-
-
-
+
+
+
+ "The Person " + p1.Name + " likes " + string(count( p1.Interests )) + " thing(s)."
+
+
+
-
-
-
+
+
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/LoanEligibility.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/LoanEligibility.dmn
new file mode 100644
index 00000000000..9e57a3a2205
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/LoanEligibility.dmn
@@ -0,0 +1,432 @@
+
+
+
+
+ number
+
+ [18..80]
+
+
+
+ number
+
+ > 0
+
+
+
+ number
+
+ >= 0
+
+
+
+
+
+ number
+
+ > 0
+
+
+
+ number
+
+ > 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Is the client eligible for the loan?
+ "Yes" "No"
+
+
+
+
+
+
+
+
+
+
+ Client.salary
+
+
+
+
+ Client.age + Loan.duration
+
+
+
+
+ ((Client.existing payments + Loan.installment) / Client.salary) * 100
+
+
+
+
+ "No"
+
+
+
+
+ (0..2000]
+
+
+ <= 80
+
+
+ <= 20
+
+
+ "Yes"
+
+
+
+
+ (2000..3000]
+
+
+ <= 80
+
+
+ <= 25
+
+
+ "Yes"
+
+
+
+
+ > 3000
+
+
+ <= 80
+
+
+ <= 35
+
+
+ "Yes"
+
+
+
+
+
+
+
+
+
+
+ does the director approve it?
+ "yes" , "no"
+
+
+
+
+
+
+
+
+
+
+ Eligibility
+
+
+
+
+ SupremeDirector
+
+
+
+
+
+ "Yes"
+
+
+ "No"
+
+
+ "No"
+
+
+
+
+ "No"
+
+
+ "Yes"
+
+
+ "Yes"
+
+
+
+
+ "No"
+
+
+ "No"
+
+
+ "No"
+
+
+
+
+ "Yes"
+
+
+ "Yes"
+
+
+ "Yes"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Bribe
+
+
+
+
+
+ <= 100
+
+
+ 0
+
+
+
+
+ > 100
+
+
+ 100
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Is Enough?
+
+
+
+
+ Judgement
+
+
+
+
+
+ 100
+
+
+ "Yes"
+
+
+ true
+
+
+
+
+ 100
+
+
+ "No"
+
+
+ true
+
+
+
+
+ 0
+
+
+ "Yes"
+
+
+ true
+
+
+
+
+ 0
+
+
+ "No"
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 50
+ 100
+ 100
+ 100
+ 100
+ 100
+
+
+ 50
+ 100
+ 100
+ 100
+ 100
+
+
+ 50
+ 100
+ 100
+ 100
+
+
+ 50
+ 100
+ 100
+ 100
+ 100
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Prequalification.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Prequalification.dmn
new file mode 100644
index 00000000000..97a3340dc23
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Prequalification.dmn
@@ -0,0 +1,837 @@
+
+
+
+
+ string
+
+
+
+ "High", "Medium", "Low"
+
+ "High"
+ "High"
+
+
+ "Medium"
+ "Medium"
+
+
+ "Low"
+ "Low"
+
+
+
+ "High","Medium","Low"
+
+
+
+ number
+
+
+
+ [300..850]
+
+
+ [300..850]
+
+
+
+ string
+
+
+
+ "Excellent", "Good", "Problem", "Not a client"
+
+ "Excellent"
+ "Excellent"
+
+
+ "Good"
+ "Good"
+
+
+ "Problem"
+ "Problem"
+
+
+ "Not a client"
+ "Not a client"
+
+
+
+ "Excellent","Good","Problem","Not a client"
+
+
+
+
+ number
+
+
+ number
+
+
+ number
+
+
+
+ string
+
+
+
+ "Approved", "Declined"
+
+ "Approved"
+ "Approved"
+
+
+ "Declined"
+ "Declined"
+
+
+
+ "Approved","Declined"
+
+
+
+
+ number
+
+
+ number
+
+
+
+ string
+
+
+
+ "Approved", "Declined"
+
+ "Approved"
+ "Approved"
+
+
+ "Declined"
+ "Declined"
+
+
+
+ "Approved","Declined"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LTV
+
+
+
+
+ DTI
+
+
+
+
+ Credit Score
+
+
+ [300..850]
+
+
+
+
+ "Approved","Declined"
+
+
+
+
+
+ <=0.75
+
+
+ <=0.36
+
+
+ >=620
+
+
+ "Approved"
+
+
+
+
+
+
+
+ <=0.75
+
+
+ (0.36..0.45]
+
+
+ >=640
+
+
+ "Approved"
+
+
+
+
+
+
+
+ (0.75..0.80]
+
+
+ <=0.36
+
+
+ >=680
+
+
+ "Approved"
+
+
+
+
+
+
+
+ (0.75..0.80]
+
+
+ (0.36..0.45]
+
+
+ >=700
+
+
+ "Approved"
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ "Declined"
+
+
+
+
+
+
+
+
+
+ Qualification = "Approved"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (Loan Payment+Borrower.Monthly Other Debt)/Borrower.Monthly Income
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LLPA*.00125 + Best Rate
+
+
+
+
+
+
+ payment
+
+
+
+
+ Loan Amount
+
+
+
+
+
+ adjustedRate
+
+
+
+
+
+ 360
+
+
+
+
+
+
+ decimal( amount, 2 )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Loan Amount/Appraised Value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ principal*rate/12/(1-(1+rate/12)**-term)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LTV
+
+
+
+
+ Credit Score
+
+
+ [300..850]
+
+
+
+
+
+
+ <=0.60
+
+
+ >=660
+
+
+ 0
+
+
+
+
+
+
+
+ <=0.60
+
+
+ [620..660)
+
+
+ 0.5
+
+
+
+
+
+
+
+ (0.60..0.70]
+
+
+ >=720
+
+
+ 0.25
+
+
+
+
+
+
+
+ (0.60..0.70]
+
+
+ [680..720)
+
+
+ 0.5
+
+
+
+
+
+
+
+ (0.60..0.70]
+
+
+ [660..680)
+
+
+ 1.0
+
+
+
+
+
+
+
+ (0.60..0.70]
+
+
+ [640..660)
+
+
+ 1.25
+
+
+
+
+
+
+
+ (0.60..0.70]
+
+
+ [620..640)
+
+
+ 1.5
+
+
+
+
+
+
+
+ (0.70..0.75]
+
+
+ >=740
+
+
+ 0.25
+
+
+
+
+
+
+
+ (0.70..0.75]
+
+
+ [720..740)
+
+
+ 0.5
+
+
+
+
+
+
+
+ (0.70..0.75]
+
+
+ [700..720)
+
+
+ 1.0
+
+
+
+
+
+
+
+ (0.70..0.75]
+
+
+ [680..700)
+
+
+ 1.25
+
+
+
+
+
+
+
+ (0.70..0.75]
+
+
+ [660..680)
+
+
+ 2.25
+
+
+
+
+
+
+
+ (0.70..0.75]
+
+
+ [640..660)
+
+
+ 2.75
+
+
+
+
+
+
+
+ (0.70..0.75]
+
+
+ [620..640)
+
+
+ 3.0
+
+
+
+
+
+
+
+ (0.75..0.80]
+
+
+ >=740
+
+
+ 0.5
+
+
+
+
+
+
+
+ (0.75..0.80]
+
+
+ [720..740)
+
+
+ 0.75
+
+
+
+
+
+
+
+ (0.75..0.80]
+
+
+ [700..720)
+
+
+ 1.25
+
+
+
+
+
+
+
+ (0.75..0.80]
+
+
+ [680..700)
+
+
+ 1.75
+
+
+
+
+
+
+
+ (0.75..0.80]
+
+
+ [660..680)
+
+
+ 2.75
+
+
+
+
+
+
+
+ (0.75..0.80]
+
+
+ [620..660)
+
+
+ 3.0
+
+
+
+
+
+
+
+ -
+
+
+ <620
+
+
+ 4
+
+
+
+
+
+
+
+ >0.80
+
+
+ -
+
+
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Traffic Violation Simple.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Traffic Violation Simple.dmn
new file mode 100644
index 00000000000..874e228580c
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Traffic Violation Simple.dmn
@@ -0,0 +1,240 @@
+
+
+
+
+ string
+
+
+ number
+
+
+ string
+
+
+ string
+
+
+ number
+
+
+
+
+ string
+
+
+ date
+
+
+ string
+
+ "speed", "parking", "driving under the influence"
+
+
+
+ number
+
+
+ number
+
+
+
+
+ number
+
+
+ number
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Violation.Type
+
+
+
+
+ Violation.Actual Speed - Violation.Speed Limit
+
+
+
+
+
+
+ "speed"
+
+
+ [10..30)
+
+
+ 500
+
+
+ 3
+
+
+
+
+ "speed"
+
+
+ >= 30
+
+
+ 1000
+
+
+ 7
+
+
+
+
+ "parking"
+
+
+ -
+
+
+ 100
+
+
+ 1
+
+
+
+
+ "driving under the influence"
+
+
+ -
+
+
+ 1000
+
+
+ 5
+
+
+
+
+
+
+
+
+ Should the driver be suspended due to points on his license?
+ "Yes", "No"
+
+
+
+
+
+
+
+
+
+
+
+ Driver.Points + Fine.Points
+
+
+
+
+ if Total Points >= 20 then "Yes" else "No"
+
+
+
+
+
+
+
+
+
+ 50.0
+ 254.0
+ 329.0
+ 119.0
+ 100.0
+ 186.0
+
+
+ 50.0
+ 100.0
+ 398.0
+
+
+ 398.0
+
+
+ 398.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Traffic Violation.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Traffic Violation.dmn
new file mode 100644
index 00000000000..c15afa09aae
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/Traffic Violation.dmn
@@ -0,0 +1,313 @@
+
+
+
+
+ string
+
+
+ number
+
+ [18..90]
+
+
+
+ string
+
+
+ string
+
+
+ number
+
+
+
+
+ string
+
+
+ date
+
+
+ string
+
+ "speed", "parking", "driving under the influence"
+
+
+
+ number
+
+
+ number
+
+
+
+
+ number
+
+
+ number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Violation.Type
+
+
+
+
+ Violation.Actual Speed - Violation.Speed Limit
+
+
+
+
+
+
+
+ "speed"
+
+
+ [10..30)
+
+
+ 500
+
+
+ 3
+
+
+
+
+
+
+
+ "speed"
+
+
+ >= 30
+
+
+ 1000
+
+
+ 7
+
+
+
+
+
+
+
+ "parking"
+
+
+ -
+
+
+ 100
+
+
+ 1
+
+
+
+
+
+
+
+ "driving under the influence"
+
+
+ -
+
+
+ 1000
+
+
+ 5
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Should the driver be suspended due to points on his license?
+ "Yes", "No"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ calculateTotalPoints(Driver, Fine)
+
+
+
+
+ if Total Points >= 20 then "Yes" else "No"
+
+
+
+
+
+
+
+
+
+
+
+ fine.Points * (if driver.Age >= 22 then 1 else 2) + driver.Points
+
+
+
+
+
+
+
+
+ 50
+ 254
+ 329
+ 119
+ 100
+ 186
+
+
+ 50
+ 100
+ 398
+
+
+ 398
+
+
+ 398
+
+
+ 300
+
+
+ 50
+ 300
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/allTypes.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/allTypes.dmn
index 826666a894f..418f4f3468e 100644
--- a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/allTypes.dmn
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/allTypes.dmn
@@ -1,4 +1,14 @@
-
+
string
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/dtevent.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/dtevent.dmn
new file mode 100644
index 00000000000..ed42e5d3d62
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/dtevent.dmn
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a
+
+
+
+
+ b
+
+
+
+
+
+
+ >0
+
+
+ -
+
+
+ "a gt 0"
+
+
+
+
+
+
+
+ -
+
+
+ >0
+
+
+ "b gt 0"
+
+
+
+
+
+
+
+ >0
+
+
+ >0
+
+
+ "a and b gt 0"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a
+
+
+
+
+
+
+ >0
+
+
+ "r1"
+
+
+
+
+
+
+
+ <=0
+
+
+ "r2"
+
+
+
+
+
+
+
+
+
+ e1
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/habitability.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/habitability.dmn
new file mode 100644
index 00000000000..2d3d0cd262c
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/habitability.dmn
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ oxygene
+
+
+
+
+ temperature
+
+
+
+
+
+
+ [10..100]
+
+
+ < 40
+
+
+ "somehow doable"
+
+
+
+
+
+
+
+ <10
+
+
+ < 40
+
+
+ "hardly doable"
+
+
+
+
+
+
+
+ -
+
+
+ >= 40
+
+
+ "too hot"
+
+
+
+
+
+
+
+
+
+
+
+
+ 50
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Financial.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Financial.dmn
index 5a722a9bc2a..a3f7b71098c 100644
--- a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Financial.dmn
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Financial.dmn
@@ -1,22 +1,39 @@
-
-
-
-
-
-
-
-
- <p><span lang="JA">Standard calculation of monthly installment </span>from Rate, Term and Amount.</p>
-
-
-
-
-
-
- (Amount *Rate/12) / (1 - (1 + Rate/12)**-Term)
-
-
-
+
+
+
+
+
+
+
+
+ <p><span lang="JA">Standard calculation of monthly installment </span>from Rate, Term and Amount.</p>
+
+
+
+
+
+
+ (Amount *Rate/12) / (1 - (1 + Rate/12)**-Term)
+
+
+
@@ -28,4 +45,4 @@
-
+
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Imported_Traffic_Violation.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Imported_Traffic_Violation.dmn
new file mode 100644
index 00000000000..8915f813c39
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Imported_Traffic_Violation.dmn
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+ string
+
+
+ number
+
+
+ string
+
+
+ string
+
+
+ number
+
+
+
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Traffic Violation With Import.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Traffic Violation With Import.dmn
new file mode 100644
index 00000000000..1deb997831f
--- /dev/null
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/Traffic Violation With Import.dmn
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+ string
+
+
+ date
+
+
+ string
+
+ "speed", "parking", "driving under the influence"
+
+
+
+ number
+
+
+ number
+
+
+
+
+ number
+
+
+ number
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Violation.Type
+
+
+
+
+ Violation.Actual Speed - Violation.Speed Limit
+
+
+
+
+
+
+ "speed"
+
+
+ [10..30)
+
+
+ 500
+
+
+ 3
+
+
+
+
+ "speed"
+
+
+ >= 30
+
+
+ 1000
+
+
+ 7
+
+
+
+
+ "parking"
+
+
+ -
+
+
+ 100
+
+
+ 1
+
+
+
+
+ "driving under the influence"
+
+
+ -
+
+
+ 1000
+
+
+ 5
+
+
+
+
+
+
+
+
+ Should the driver be suspended due to points on his license?
+ "Yes", "No"
+
+
+
+
+
+
+
+
+
+
+
+ Driver.Points + Fine.Points
+
+
+
+
+ if Total Points >= 20 then "Yes" else "No"
+
+
+
+
+
+
+
+
+
+ 50.0
+ 254.0
+ 329.0
+ 119.0
+ 100.0
+ 186.0
+
+
+ 50.0
+ 100.0
+ 398.0
+
+
+ 398.0
+
+
+ 398.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/stdlib.dmn b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/stdlib.dmn
index 19aa5a3ac60..eada692b0ce 100644
--- a/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/stdlib.dmn
+++ b/kie-dmn/kie-dmn-test-resources/src/test/resources/valid_models/DMNv1_x/multiple/stdlib.dmn
@@ -1,4 +1,14 @@
-
+
diff --git a/kie-dmn/kie-dmn-validation/pom.xml b/kie-dmn/kie-dmn-validation/pom.xml
index 838b3198021..3dfc05eb19a 100644
--- a/kie-dmn/kie-dmn-validation/pom.xml
+++ b/kie-dmn/kie-dmn-validation/pom.xml
@@ -33,6 +33,7 @@
org.kie.dmn.validation
true
+ 3.6.1
@@ -176,7 +177,44 @@
+
+
+ src/test/resources
+
+
+ ${project.build.directory}/generated-test-resources
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ ${dependency-plugin.version}
+
+
+ unpack
+ generate-test-resources
+
+ unpack
+
+
+
+
+ org.kie
+ kie-dmn-test-resources
+ ${project.version}
+ tests
+ jar
+ true
+ ${project.build.directory}/generated-test-resources
+ valid_models/**/*.dmn
+
+
+
+
+
+
org.codehaus.mojo
exec-maven-plugin
@@ -199,7 +237,7 @@
true
${project.basedir}/src/test/resources/
-
+
diff --git a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTest.java b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTest.java
index f19151aa408..9096a81755a 100644
--- a/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTest.java
+++ b/kie-dmn/kie-dmn-validation/src/test/java/org/kie/dmn/validation/ValidatorTest.java
@@ -23,11 +23,23 @@
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URISyntaxException;
+import java.net.URL;
+import java.nio.file.DirectoryIteratorException;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Collections;
import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import java.util.stream.StreamSupport;
+import org.drools.io.FileSystemResource;
import org.junit.Ignore;
import org.junit.Test;
import org.kie.api.builder.Message.Level;
+import org.kie.api.io.Resource;
import org.kie.dmn.api.core.DMNMessage;
import org.kie.dmn.api.core.DMNMessageType;
import org.kie.dmn.api.core.DMNModel;
@@ -36,6 +48,7 @@
import org.kie.dmn.backend.marshalling.v1x.DMNMarshallerFactory;
import org.kie.dmn.core.DMNInputRuntimeTest;
import org.kie.dmn.core.DMNRuntimeTest;
+import org.kie.dmn.core.compiler.profiles.ExtendedDMNProfile;
import org.kie.dmn.core.decisionservices.DMNDecisionServicesTest;
import org.kie.dmn.core.imports.ImportsTest;
import org.kie.dmn.core.util.DMNRuntimeUtil;
@@ -43,15 +56,24 @@
import org.kie.dmn.model.api.DMNElement;
import org.kie.dmn.model.api.DMNModelInstrumentedBase;
import org.kie.dmn.model.api.Definitions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import static org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_COMPILATION;
import static org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_MODEL;
import static org.kie.dmn.validation.DMNValidator.Validation.VALIDATE_SCHEMA;
public class ValidatorTest extends AbstractValidatorTest {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ValidatorTest.class);
+
+ static final DMNValidator validator = DMNValidatorFactory.newValidator(List.of(new ExtendedDMNProfile()));
+ static final DMNValidator.ValidatorBuilder validatorBuilder = validator.validateUsing(DMNValidator.Validation.VALIDATE_SCHEMA, DMNValidator.Validation.VALIDATE_MODEL);
+
@Test
public void testDryRun() {
DMNRuntime runtime = DMNRuntimeUtil.createRuntime( "0001-input-data-string.dmn", DMNInputRuntimeTest.class );
@@ -80,33 +102,11 @@ public void testMACDInputDefinitions() {
@Test
public void testMACDInputReader() throws IOException {
- try (final Reader reader = new InputStreamReader(getClass().getResourceAsStream("/org/kie/dmn/core/MACD-enhanced_iteration.dmn") )) {
+ try (final Reader reader = new InputStreamReader(Objects.requireNonNull(getClass().getResourceAsStream("/org/kie/dmn/core/MACD-enhanced_iteration.dmn")))) {
List messages = DMNValidatorFactory.newValidator().validate(reader, VALIDATE_MODEL, VALIDATE_COMPILATION);
assertThat(messages).withFailMessage(messages.toString()).hasSize(0);
}
}
-
- private Definitions utilDefinitions(String filename, String modelName) {
-// List validateXML;
-// try {
-// validateXML = validator.validate( new File(this.getClass().getResource(filename).toURI()), DMNValidator.Validation.VALIDATE_SCHEMA );
-// assertThat( "using unit test method utilDefinitions must received a XML valid DMN file", validateXML, IsEmptyCollection.empty() );
-// } catch (URISyntaxException e) {
-// e.printStackTrace();
-// fail("Unable for the test suite to locate the file for XML validation.");
-// }
-
- DMNMarshaller marshaller = DMNMarshallerFactory.newDefaultMarshaller();
- try( InputStreamReader isr = new InputStreamReader( getClass().getResourceAsStream( filename ) ) ) {
- Definitions definitions = marshaller.unmarshal( isr );
- assertThat(definitions).isNotNull();
- return definitions;
- } catch ( IOException e ) {
- e.printStackTrace();
- fail("Unable for the test suite to locate the file for validation.");
- }
- return null;
- }
@Test
public void testInvalidXml() throws URISyntaxException {
@@ -169,7 +169,7 @@ public void testINVOCATION_INCONSISTENT_PARAM_NAMES() {
@Test @Ignore( "Needs to be improved as invocations can be used to invoke functions node defined in BKMs. E.g., FEEL built in functions, etc.")
public void testINVOCATION_MISSING_TARGET() {
- Definitions definitions = utilDefinitions( "INVOCATION_MISSING_TARGET.dmn", "INVOCATION_MISSING_TARGET" );
+ Definitions definitions = utilDefinitions( "INVOCATION_MISSING_TARGET.dmn" );
List validate = validator.validate(definitions);
// assertTrue( validate.stream().anyMatch( p -> p.getMessageType().equals( DMNMessageType.INVOCATION_MISSING_TARGET ) ) );
@@ -178,7 +178,7 @@ public void testINVOCATION_MISSING_TARGET() {
@Ignore("known current limitation")
@Test
public void testINVOCATION_MISSING_TARGETRbis() {
- Definitions definitions = utilDefinitions( "INVOCATION_MISSING_TARGETbis.dmn", "INVOCATION_MISSING_TARGETbis" );
+ Definitions definitions = utilDefinitions( "INVOCATION_MISSING_TARGETbis.dmn");
List validate = validator.validate(definitions);
// assertTrue( validate.stream().anyMatch( p -> p.getMessageType().equals( DMNMessageType.INVOCATION_MISSING_TARGET ) ) );
@@ -532,6 +532,63 @@ public void testInformationItemMissingTypeRef_SMC() {
checkInformationItemMissingTypeRef(VALIDATE_SCHEMA, VALIDATE_MODEL, VALIDATE_COMPILATION);
}
+ @Test
+ public void validateAllValidSharedModels() throws URISyntaxException, IOException {
+ String modelFilesPath = "valid_models";
+ URL modelFilesUrl =
+ Collections.list(Thread.currentThread().getContextClassLoader().getResources(modelFilesPath))
+ .stream()
+ .filter(url -> url.getProtocol().equals("file"))
+ .findFirst()
+ .orElseThrow(() -> new RuntimeException("Failed to retrieve " + modelFilesPath));
+ Path modelsPath = Path.of(modelFilesUrl.toURI());
+ testDirectory(modelsPath);
+ }
+
+ private void testDirectory(Path modelsPath) {
+ try (DirectoryStream pathIterator = Files.newDirectoryStream(modelsPath)) {
+ Map> allFiles = StreamSupport.stream(pathIterator.spliterator(), false)
+ .collect(Collectors.groupingBy(path -> path.toFile().isDirectory()));
+ if (allFiles.containsKey(true)) {
+ allFiles.get(true).forEach(this::testDirectory);
+ }
+ if (allFiles.containsKey(false)) {
+ testFiles(allFiles.get(false));
+ }
+ } catch (IOException | DirectoryIteratorException e) {
+ String messageToShow = e.getMessage() != null && !e.getMessage().isEmpty() ? e.getMessage() : String.format("Unable to navigate directory %s", modelsPath);
+ LOGGER.error(messageToShow);
+ LOGGER.debug(messageToShow, e);
+ fail(messageToShow);
+ }
+ }
+
+ private void testFiles(List modelPaths) {
+ Resource[] resources = modelPaths.stream()
+ .map(path -> new FileSystemResource(path.toFile()))
+ .toArray(value -> new Resource[modelPaths.size()]);
+ List dmnMessages = validatorBuilder.theseModels(resources);
+ assertNotNull(dmnMessages);
+ dmnMessages.forEach(dmnMessage -> LOGGER.error(dmnMessage.toString()));
+ assertTrue(dmnMessages.isEmpty());
+ }
+
+
+ private Definitions utilDefinitions(String filename) {
+ DMNMarshaller marshaller = DMNMarshallerFactory.newDefaultMarshaller();
+ try( InputStreamReader isr = new InputStreamReader(Objects.requireNonNull(getClass().getResourceAsStream(filename))) ) {
+ Definitions definitions = marshaller.unmarshal( isr );
+ assertThat(definitions).isNotNull();
+ return definitions;
+ } catch ( IOException e ) {
+ String messageToShow = e.getMessage() != null && !e.getMessage().isEmpty() ? e.getMessage() : String.format("Unable to find file %s", filename);
+ LOGGER.error(messageToShow);
+ LOGGER.debug(messageToShow, e);
+ fail(String.format("Unable for the test suite to locate the file %s for validation.", filename));
+ return null;
+ }
+ }
+
private void checkInformationItemMissingTypeRef(DMNValidator.Validation... options) {
List validate = validator.validate(getReader("variableMissingTypeRef.dmn"),
options);
From fe80cc19cb117ef064308da163997b6fbc531a4a Mon Sep 17 00:00:00 2001
From: Mario Fusco
Date: Wed, 3 Apr 2024 08:32:04 +0200
Subject: [PATCH 03/12] [KIE-1062] PhreakActivationIterator collects duplicated
activations when serializing a KieSession (#5817)
---
.../iterators/PhreakActivationIterator.java | 26 ++++-
.../common/InternalMatchIteratorTest.java | 110 +++++++++++++++++-
2 files changed, 127 insertions(+), 9 deletions(-)
diff --git a/drools-serialization-protobuf/src/main/java/org/drools/serialization/protobuf/iterators/PhreakActivationIterator.java b/drools-serialization-protobuf/src/main/java/org/drools/serialization/protobuf/iterators/PhreakActivationIterator.java
index a768f27e24c..b12da2c0127 100644
--- a/drools-serialization-protobuf/src/main/java/org/drools/serialization/protobuf/iterators/PhreakActivationIterator.java
+++ b/drools-serialization-protobuf/src/main/java/org/drools/serialization/protobuf/iterators/PhreakActivationIterator.java
@@ -18,6 +18,13 @@
*/
package org.drools.serialization.protobuf.iterators;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.InternalWorkingMemory;
@@ -26,14 +33,25 @@
import org.drools.core.impl.InternalRuleBase;
import org.drools.core.reteoo.AccumulateNode.AccumulateContext;
import org.drools.core.reteoo.AccumulateNode.AccumulateMemory;
-import org.drools.core.reteoo.*;
+import org.drools.core.reteoo.BetaMemory;
+import org.drools.core.reteoo.BetaNode;
import org.drools.core.reteoo.FromNode.FromMemory;
+import org.drools.core.reteoo.LeftInputAdapterNode;
+import org.drools.core.reteoo.LeftTuple;
+import org.drools.core.reteoo.LeftTupleSink;
+import org.drools.core.reteoo.LeftTupleSource;
+import org.drools.core.reteoo.ObjectSource;
+import org.drools.core.reteoo.ObjectTypeNode;
+import org.drools.core.reteoo.RightTuple;
+import org.drools.core.reteoo.RuleTerminalNode;
+import org.drools.core.reteoo.TerminalNode;
+import org.drools.core.reteoo.Tuple;
+import org.drools.core.reteoo.TupleImpl;
+import org.drools.core.reteoo.TupleMemory;
import org.drools.core.rule.consequence.InternalMatch;
import org.drools.core.util.FastIterator;
import org.drools.core.util.Iterator;
-import java.util.*;
-
public class PhreakActivationIterator
implements
Iterator {
@@ -208,7 +226,7 @@ private static void collectFromPeers(TupleImpl peer, List interna
}
} else if ( peer.getFirstChild() != null ) {
for (TupleImpl childLt = peer.getFirstChild(); childLt != null; childLt = childLt.getHandleNext()) {
- collectFromLeftInput(childLt, internalMatches, nodeSet, reteEvaluator);
+ collectFromPeers(childLt, internalMatches, nodeSet, reteEvaluator);
}
} else if (peer.getSink().getType() == NodeTypeEnums.RuleTerminalNode ) {
internalMatches.add((InternalMatch) peer);
diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/common/InternalMatchIteratorTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/common/InternalMatchIteratorTest.java
index 06b52dce024..88d13384662 100644
--- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/common/InternalMatchIteratorTest.java
+++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/common/InternalMatchIteratorTest.java
@@ -18,16 +18,17 @@
*/
package org.drools.mvel.compiler.common;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.drools.core.rule.consequence.InternalMatch;
-import org.drools.serialization.protobuf.iterators.ActivationIterator;
import org.drools.core.common.InternalAgenda;
import org.drools.core.common.InternalWorkingMemory;
import org.drools.core.impl.RuleBaseFactory;
+import org.drools.core.rule.consequence.InternalMatch;
import org.drools.core.util.Iterator;
+import org.drools.serialization.protobuf.iterators.ActivationIterator;
import org.drools.testcoverage.common.util.KieBaseTestConfiguration;
import org.drools.testcoverage.common.util.KieBaseUtil;
import org.drools.testcoverage.common.util.TestParametersUtil;
@@ -654,9 +655,9 @@ public void testAccnSharingWithMixedDormantAndActive() {
KieBase kbase = KieBaseUtil.getKieBaseFromKieModuleFromDrl("test", kieBaseTestConfiguration, str);
KieSession ksession = kbase.newKieSession();
- ksession.insert( new Integer( 1 ) );
- ksession.insert( new Integer( 2 ) );
- ksession.insert( new Integer( 3 ) );
+ ksession.insert( 1 );
+ ksession.insert( 2 );
+ ksession.insert( 3 );
ksession.fireAllRules();
@@ -754,4 +755,103 @@ public void matchCreated(org.kie.api.event.rule.MatchCreatedEvent event) {
assertThat(list.size()).isEqualTo(1);
}
+
+ @Test
+ public void testCollectAndCountActivationsWithNodesSharing() {
+ // KIE-1062
+ String str =
+ "import " + CartLineDetails.class.getCanonicalName() + ";" +
+ "\n" +
+ "rule R1 when\n" +
+ " exists($cartLineDetails1 : CartLineDetails(cartLineProductId in (\"Product1\" ) &&\n" +
+ " cartLineProductCategoryId == \"Category1\"))\n" +
+ " Number(doubleValue() > 1) from\n" +
+ " accumulate ( CartLineDetails(cartLineProductId in (\"Product1\" , \"NotUsedProduct\" ) &&\n" +
+ " $qty : cartLineItemQuantity != null), sum($qty) )\n" +
+ " Number(doubleValue() > 1) from\n" +
+ " accumulate ( CartLineDetails(cartLineProductId in (\"Product2\" ) &&\n" +
+ " $qty : cartLineItemQuantity != null), sum($qty) )\n" +
+ " Boolean(this == true)\n" +
+ " $cartLineDetails4 : CartLineDetails(cartLineProductCategoryId == \"Category1\")\n" +
+ " then\n" +
+ "end\n" +
+ "\n" +
+ "rule R2 when\n" +
+ " exists($cartLineDetails1 : CartLineDetails(cartLineProductId in (\"Product1\" ) &&\n" +
+ " cartLineProductCategoryId == \"Category1\"))\n" +
+ " Number(doubleValue() > 1) from\n" +
+ " accumulate ( CartLineDetails(cartLineProductId in (\"Product1\" , \"NotUsedProduct\" ) &&\n" +
+ " $qty : cartLineItemQuantity != null), sum($qty) )\n" +
+ " Number(doubleValue() > 1) from\n" +
+ " accumulate ( CartLineDetails(cartLineProductId in (\"Product2\" ) &&\n" +
+ " $qty : cartLineItemQuantity != null), sum($qty) )\n" +
+ " Boolean(this == false)\n" +
+ " $cartLineDetails4 : CartLineDetails(cartLineProductCategoryId == \"Category1\")\n" +
+ " then\n" +
+ "end";
+
+ KieBase kbase = KieBaseUtil.getKieBaseFromKieModuleFromDrl("test", kieBaseTestConfiguration, str);
+ KieSession kieSession = kbase.newKieSession();
+
+ int totalMatchingLineItems = 4;
+ List cartLineDetails = generateCartDetails(totalMatchingLineItems);
+
+ for (CartLineDetails lineItem : cartLineDetails) {
+ kieSession.insert(lineItem);
+ }
+ kieSession.insert(true);
+
+ kieSession.fireAllRules();
+
+ Iterator it = ActivationIterator.iterator( kieSession );
+ List matches = new ArrayList<>();
+ for (InternalMatch act = (InternalMatch) it.next(); act != null; act = (InternalMatch) it.next() ) {
+ matches.add( act );
+ }
+
+ assertThat(matches.size()).isEqualTo(totalMatchingLineItems);
+ }
+
+ private List generateCartDetails(int totalMatchingLineItems) {
+ List lineItemList = new ArrayList<>();
+ for(int i = 1 ; i <= totalMatchingLineItems; i++){
+ CartLineDetails lineItem = new CartLineDetails();
+ lineItem.setCartLineProductId("Product" + i);
+ lineItem.setCartLineProductCategoryId("Category" + "1");
+ lineItem.setCartLineItemQuantity(10.0);
+ lineItemList.add(lineItem);
+ }
+ return lineItemList;
+ }
+
+ public static class CartLineDetails implements Serializable {
+ private static final long serialVersionUID = 1L;
+ private String cartLineProductCategoryId;
+ private Double cartLineItemQuantity;
+ private String cartLineProductId;
+
+ public String getCartLineProductCategoryId(){
+ return cartLineProductCategoryId;
+ }
+
+ public void setCartLineProductCategoryId( String cartLineProductCategoryId ){
+ this.cartLineProductCategoryId = cartLineProductCategoryId;
+ }
+
+ public Double getCartLineItemQuantity(){
+ return cartLineItemQuantity;
+ }
+
+ public void setCartLineItemQuantity( Double cartLineItemQuantity ){
+ this.cartLineItemQuantity = cartLineItemQuantity;
+ }
+
+ public String getCartLineProductId(){
+ return cartLineProductId;
+ }
+
+ public void setCartLineProductId( String cartLineProductId ){
+ this.cartLineProductId = cartLineProductId;
+ }
+ }
}
From 52033404b9e237aaf8d6c66afd09264f9a30a547 Mon Sep 17 00:00:00 2001
From: Enrique
Date: Mon, 8 Apr 2024 08:27:00 +0200
Subject: [PATCH 04/12] [incubator-kie-issues-861] PIM for kogito workflow /
remove unused kie api / kie internal api (#5685)
* [incubator-kie-issues-916] PIM for kogito workflow / remove unused kie api / kie internal api
* [incubator-kie-issues-916] add process event data state change
---
.../drools/core/process/ProcessContext.java | 20 --
.../org/drools/core/process/WorkItem.java | 6 +-
.../core/process/impl/WorkItemImpl.java | 9 +-
.../drools/kiesession/ProcessContextTest.java | 182 -----------
.../kie/api/cluster/ClusterAwareService.java | 63 ----
.../org/kie/api/cluster/ClusterListener.java | 27 --
.../java/org/kie/api/cluster/ClusterNode.java | 73 -----
.../api/definition/process/Connection.java | 2 +-
.../org/kie/api/definition/process/Node.java | 14 +-
.../api/definition/process/NodeContainer.java | 2 +-
.../definition/process/WorkflowElement.java | 21 +-
.../process/WorkflowElementIdentifier.java | 30 +-
.../event/process/ProcessEventListener.java | 5 +
.../event/process/ProcessMigrationEvent.java | 11 +-
.../persistence/ObjectStoringStrategy.java | 52 ---
.../org/kie/api/runtime/manager/Context.java | 36 ---
.../manager/RegisterableItemsFactory.java | 89 ------
.../api/runtime/manager/RuntimeEngine.java | 52 ---
.../runtime/manager/RuntimeEnvironment.java | 83 -----
.../manager/RuntimeEnvironmentBuilder.java | 127 --------
.../RuntimeEnvironmentBuilderFactory.java | 143 ---------
.../api/runtime/manager/RuntimeManager.java | 98 ------
.../manager/RuntimeManagerFactory.java | 162 ----------
.../runtime/manager/audit/AuditService.java | 127 --------
.../manager/audit/NodeInstanceLog.java | 129 --------
.../manager/audit/ProcessInstanceLog.java | 115 -------
.../manager/audit/VariableInstanceLog.java | 70 ----
.../api/runtime/process/CaseAssignment.java | 71 ----
.../org/kie/api/runtime/process/CaseData.java | 62 ----
.../kie/api/runtime/process/NodeInstance.java | 3 +-
.../api/runtime/process/ProcessContext.java | 4 -
.../runtime/query/AdvancedQueryContext.java | 70 ----
.../kie/api/runtime/query/QueryContext.java | 117 -------
.../java/org/kie/api/task/TaskContext.java | 44 ---
.../main/java/org/kie/api/task/TaskEvent.java | 35 --
.../api/task/TaskLifeCycleEventListener.java | 81 -----
.../java/org/kie/api/task/TaskService.java | 113 -------
.../org/kie/api/task/UserGroupCallback.java | 45 ---
.../main/java/org/kie/api/task/UserInfo.java | 38 ---
.../org/kie/api/task/model/Attachment.java | 40 ---
.../java/org/kie/api/task/model/Comment.java | 35 --
.../java/org/kie/api/task/model/Content.java | 29 --
.../java/org/kie/api/task/model/Email.java | 24 --
.../java/org/kie/api/task/model/Group.java | 24 --
.../java/org/kie/api/task/model/I18NText.java | 31 --
.../api/task/model/OrganizationalEntity.java | 27 --
.../kie/api/task/model/PeopleAssignments.java | 33 --
.../kie/api/task/model/QuickTaskSummary.java | 52 ---
.../java/org/kie/api/task/model/Status.java | 27 --
.../java/org/kie/api/task/model/Task.java | 54 ----
.../java/org/kie/api/task/model/TaskData.java | 78 -----
.../org/kie/api/task/model/TaskSummary.java | 48 ---
.../java/org/kie/api/task/model/User.java | 23 --
.../process/ProcessVariableIndexer.java | 31 --
.../ExtendedParametrizedQueryBuilder.java | 62 ----
.../internal/query/InternalQueryService.java | 28 --
.../kie/internal/query/ParametrizedQuery.java | 46 ---
.../query/ParametrizedQueryBuilder.java | 194 -----------
.../internal/query/ParametrizedUpdate.java | 24 --
.../query/ProcessInstanceIdQueryBuilder.java | 55 ----
.../org/kie/internal/query/QueryContext.java | 52 ---
.../org/kie/internal/query/QueryFilter.java | 111 -------
.../query/QueryParameterIdentifiers.java | 154 ---------
.../kie/internal/query/data/QueryData.java | 57 ----
.../internal/query/data/QueryParameters.java | 298 -----------------
.../runtime/error/ExecutionError.java | 302 ------------------
.../runtime/error/ExecutionErrorContext.java | 64 ----
.../runtime/error/ExecutionErrorFilter.java | 80 -----
.../runtime/error/ExecutionErrorHandler.java | 36 ---
.../runtime/error/ExecutionErrorListener.java | 25 --
.../runtime/error/ExecutionErrorManager.java | 27 --
.../runtime/error/ExecutionErrorStorage.java | 38 ---
.../runtime/manager/CacheManager.java | 56 ----
.../internal/runtime/manager/Disposable.java | 39 ---
.../runtime/manager/DisposeListener.java | 35 --
.../manager/EventListenerProducer.java | 51 ---
.../runtime/manager/GlobalProducer.java | 50 ---
.../manager/InternalRuntimeEngine.java | 35 --
.../kie/internal/runtime/manager/Mapper.java | 63 ----
.../runtime/manager/RuntimeEnvironment.java | 34 --
.../manager/RuntimeManagerFactory.java | 72 -----
.../manager/RuntimeManagerIdFilter.java | 36 ---
.../manager/RuntimeManagerRegistry.java | 75 -----
.../runtime/manager/SessionFactory.java | 53 ---
.../runtime/manager/TaskServiceFactory.java | 39 ---
.../manager/WorkItemHandlerProducer.java | 53 ---
.../audit/query/AuditDateDeleteBuilder.java | 52 ---
.../audit/query/AuditDeleteBuilder.java | 80 -----
.../audit/query/AuditLogQueryBuilder.java | 59 ----
.../audit/query/ErrorInfoDeleteBuilder.java | 24 --
.../query/NodeInstanceLogDeleteBuilder.java | 59 ----
.../query/NodeInstanceLogQueryBuilder.java | 85 -----
.../audit/query/ProcessIdQueryBuilder.java | 40 ---
.../ProcessInstanceLogDeleteBuilder.java | 115 -------
.../query/ProcessInstanceLogQueryBuilder.java | 141 --------
.../VariableInstanceLogDeleteBuilder.java | 32 --
.../VariableInstanceLogQueryBuilder.java | 104 ------
.../runtime/manager/context/CaseContext.java | 57 ----
.../context/CorrelationKeyContext.java | 68 ----
.../runtime/manager/context/EmptyContext.java | 55 ----
.../context/ProcessInstanceIdContext.java | 72 -----
.../org/kie/internal/task/api/AuditTask.java | 89 ------
.../task/api/ContentMarshallerContext.java | 51 ---
.../kie/internal/task/api/EventService.java | 32 --
.../task/api/InternalTaskService.java | 218 -------------
.../internal/task/api/TaskAdminService.java | 52 ---
.../task/api/TaskAttachmentService.java | 41 ---
.../internal/task/api/TaskCommentService.java | 39 ---
.../internal/task/api/TaskContentService.java | 58 ----
.../kie/internal/task/api/TaskContext.java | 34 --
.../task/api/TaskDeadlinesService.java | 54 ----
.../kie/internal/task/api/TaskDefService.java | 42 ---
.../org/kie/internal/task/api/TaskEvent.java | 24 --
.../internal/task/api/TaskEventsService.java | 38 ---
.../task/api/TaskIdentityService.java | 56 ----
.../task/api/TaskInstanceService.java | 135 --------
.../internal/task/api/TaskModelFactory.java | 107 -------
.../internal/task/api/TaskModelProvider.java | 37 ---
.../task/api/TaskModelProviderService.java | 27 --
.../task/api/TaskPersistenceContext.java | 183 -----------
.../internal/task/api/TaskQueryService.java | 118 -------
.../task/api/TaskStatisticsService.java | 32 --
.../kie/internal/task/api/TaskVariable.java | 91 ------
.../task/api/TaskVariableIndexer.java | 29 --
.../internal/task/api/UserGroupCallback.java | 23 --
.../org/kie/internal/task/api/UserInfo.java | 40 ---
.../task/api/assignment/Assignment.java | 80 -----
.../api/assignment/AssignmentStrategy.java | 59 ----
.../internal/task/api/model/AccessType.java | 29 --
.../task/api/model/AllowedToDelegate.java | 26 --
.../task/api/model/BooleanExpression.java | 38 ---
.../internal/task/api/model/CommandName.java | 117 -------
.../internal/task/api/model/ContentData.java | 40 ---
.../kie/internal/task/api/model/Deadline.java | 50 ---
.../task/api/model/DeadlineSummary.java | 36 ---
.../internal/task/api/model/Deadlines.java | 35 --
.../internal/task/api/model/Delegation.java | 37 ---
.../task/api/model/EmailNotification.java | 32 --
.../api/model/EmailNotificationHeader.java | 52 ---
.../internal/task/api/model/Escalation.java | 46 ---
.../internal/task/api/model/FaultData.java | 29 --
.../task/api/model/InternalAttachment.java | 49 ---
.../task/api/model/InternalComment.java | 37 ---
.../task/api/model/InternalContent.java | 29 --
.../task/api/model/InternalI18NText.java | 31 --
.../model/InternalOrganizationalEntity.java | 27 --
.../api/model/InternalPeopleAssignments.java | 48 ---
.../internal/task/api/model/InternalTask.java | 68 ----
.../task/api/model/InternalTaskData.java | 162 ----------
.../task/api/model/InternalTaskSummary.java | 71 ----
.../kie/internal/task/api/model/Language.java | 30 --
.../internal/task/api/model/Notification.java | 63 ----
.../task/api/model/NotificationEvent.java | 67 ----
.../task/api/model/NotificationType.java | 23 --
.../internal/task/api/model/Operation.java | 40 ---
.../internal/task/api/model/Reassignment.java | 41 ---
.../task/api/model/SubTasksStrategy.java | 26 --
.../kie/internal/task/api/model/TaskDef.java | 38 ---
.../internal/task/api/model/TaskEvent.java | 53 ---
.../api/prediction/PredictionOutcome.java | 85 -----
.../api/prediction/PredictionService.java | 50 ---
.../task/query/AuditTaskDeleteBuilder.java | 35 --
.../task/query/AuditTaskQueryBuilder.java | 201 ------------
.../task/query/TaskAuditQueryBuilder.java | 52 ---
.../task/query/TaskEventDeleteBuilder.java | 28 --
.../task/query/TaskEventQueryBuilder.java | 132 --------
.../task/query/TaskSummaryQueryBuilder.java | 296 -----------------
.../task/query/TaskVariableDeleteBuilder.java | 28 --
.../task/query/TaskVariableQueryBuilder.java | 133 --------
.../internal/utils/NotificationPublisher.java | 63 ----
170 files changed, 54 insertions(+), 10682 deletions(-)
delete mode 100644 drools-kiesession/src/test/java/org/drools/kiesession/ProcessContextTest.java
delete mode 100644 kie-api/src/main/java/org/kie/api/cluster/ClusterAwareService.java
delete mode 100644 kie-api/src/main/java/org/kie/api/cluster/ClusterListener.java
delete mode 100644 kie-api/src/main/java/org/kie/api/cluster/ClusterNode.java
rename kie-internal/src/main/java/org/kie/internal/task/api/TaskPersistenceContextManager.java => kie-api/src/main/java/org/kie/api/definition/process/WorkflowElement.java (69%)
rename kie-internal/src/main/java/org/kie/internal/runtime/manager/SessionNotFoundException.java => kie-api/src/main/java/org/kie/api/definition/process/WorkflowElementIdentifier.java (62%)
rename kie-internal/src/main/java/org/kie/internal/builder/fluent/TaskFluent.java => kie-api/src/main/java/org/kie/api/event/process/ProcessMigrationEvent.java (83%)
delete mode 100644 kie-api/src/main/java/org/kie/api/persistence/ObjectStoringStrategy.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/Context.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/RegisterableItemsFactory.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEngine.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironment.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironmentBuilder.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironmentBuilderFactory.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeManager.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeManagerFactory.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/audit/AuditService.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/audit/NodeInstanceLog.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/audit/ProcessInstanceLog.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/manager/audit/VariableInstanceLog.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/process/CaseAssignment.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/process/CaseData.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/query/AdvancedQueryContext.java
delete mode 100644 kie-api/src/main/java/org/kie/api/runtime/query/QueryContext.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/TaskContext.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/TaskEvent.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/TaskLifeCycleEventListener.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/TaskService.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/UserGroupCallback.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/UserInfo.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/Attachment.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/Comment.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/Content.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/Email.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/Group.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/I18NText.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/OrganizationalEntity.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/PeopleAssignments.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/QuickTaskSummary.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/Status.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/Task.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/TaskData.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/TaskSummary.java
delete mode 100644 kie-api/src/main/java/org/kie/api/task/model/User.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/process/ProcessVariableIndexer.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/query/ExtendedParametrizedQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/query/InternalQueryService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/query/ParametrizedQuery.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/query/ParametrizedQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/query/ParametrizedUpdate.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/query/ProcessInstanceIdQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/query/QueryContext.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/query/QueryFilter.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/query/QueryParameterIdentifiers.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/query/data/QueryData.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/query/data/QueryParameters.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionError.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorContext.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorFilter.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorHandler.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorListener.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorManager.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorStorage.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/CacheManager.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/Disposable.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/DisposeListener.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/EventListenerProducer.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/GlobalProducer.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/InternalRuntimeEngine.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/Mapper.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeEnvironment.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerFactory.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerIdFilter.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerRegistry.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/SessionFactory.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/TaskServiceFactory.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/WorkItemHandlerProducer.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditDateDeleteBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditDeleteBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditLogQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ErrorInfoDeleteBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/NodeInstanceLogDeleteBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/NodeInstanceLogQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessIdQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessInstanceLogDeleteBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessInstanceLogQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/VariableInstanceLogDeleteBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/VariableInstanceLogQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/context/CaseContext.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/context/CorrelationKeyContext.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/context/EmptyContext.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/runtime/manager/context/ProcessInstanceIdContext.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/AuditTask.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/ContentMarshallerContext.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/EventService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/InternalTaskService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskAdminService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskAttachmentService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskCommentService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskContentService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskContext.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskDeadlinesService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskDefService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskEvent.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskEventsService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskIdentityService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskInstanceService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskModelFactory.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskModelProvider.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskModelProviderService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskPersistenceContext.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskQueryService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskStatisticsService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskVariable.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/TaskVariableIndexer.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/UserGroupCallback.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/UserInfo.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/assignment/Assignment.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/assignment/AssignmentStrategy.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/AccessType.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/AllowedToDelegate.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/BooleanExpression.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/CommandName.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/ContentData.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/Deadline.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/DeadlineSummary.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/Deadlines.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/Delegation.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/EmailNotification.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/EmailNotificationHeader.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/Escalation.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/FaultData.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/InternalAttachment.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/InternalComment.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/InternalContent.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/InternalI18NText.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/InternalOrganizationalEntity.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/InternalPeopleAssignments.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/InternalTask.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/InternalTaskData.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/InternalTaskSummary.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/Language.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/Notification.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/NotificationEvent.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/NotificationType.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/Operation.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/Reassignment.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/SubTasksStrategy.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/TaskDef.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/model/TaskEvent.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/prediction/PredictionOutcome.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/api/prediction/PredictionService.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/query/AuditTaskDeleteBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/query/AuditTaskQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/query/TaskAuditQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/query/TaskEventDeleteBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/query/TaskEventQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/query/TaskSummaryQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/query/TaskVariableDeleteBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/task/query/TaskVariableQueryBuilder.java
delete mode 100644 kie-internal/src/main/java/org/kie/internal/utils/NotificationPublisher.java
diff --git a/drools-core/src/main/java/org/drools/core/process/ProcessContext.java b/drools-core/src/main/java/org/drools/core/process/ProcessContext.java
index f866cd609d9..da3567ed9c8 100644
--- a/drools-core/src/main/java/org/drools/core/process/ProcessContext.java
+++ b/drools-core/src/main/java/org/drools/core/process/ProcessContext.java
@@ -20,32 +20,12 @@
import java.util.Collection;
-import org.kie.api.runtime.ClassObjectFilter;
import org.kie.api.runtime.KieRuntime;
-import org.kie.api.runtime.process.CaseAssignment;
-import org.kie.api.runtime.process.CaseData;
public class ProcessContext extends AbstractProcessContext {
public ProcessContext(KieRuntime kruntime) {
super(kruntime);
}
- public CaseData getCaseData() {
- Collection extends Object> objects = getKieRuntime().getObjects(new ClassObjectFilter(CaseData.class));
- if (objects.size() == 0) {
- return null;
- }
-
- return (CaseData) objects.iterator().next();
- }
-
- public CaseAssignment getCaseAssignment() {
- Collection extends Object> objects = getKieRuntime().getObjects(new ClassObjectFilter(CaseAssignment.class));
- if (objects.size() == 0) {
- return null;
- }
-
- return (CaseAssignment) objects.iterator().next();
- }
}
diff --git a/drools-core/src/main/java/org/drools/core/process/WorkItem.java b/drools-core/src/main/java/org/drools/core/process/WorkItem.java
index 9fdef51c6d6..1f65717c7f4 100644
--- a/drools-core/src/main/java/org/drools/core/process/WorkItem.java
+++ b/drools-core/src/main/java/org/drools/core/process/WorkItem.java
@@ -20,6 +20,8 @@
import java.util.Map;
+import org.kie.api.definition.process.WorkflowElementIdentifier;
+
public interface WorkItem extends org.kie.api.runtime.process.WorkItem {
void setName(String name);
@@ -38,11 +40,11 @@ public interface WorkItem extends org.kie.api.runtime.process.WorkItem {
void setNodeInstanceId(long deploymentId);
- void setNodeId(long deploymentId);
+ void setNodeId(WorkflowElementIdentifier nodeIdentifier);
String getDeploymentId();
long getNodeInstanceId();
- long getNodeId();
+ WorkflowElementIdentifier getNodeId();
}
diff --git a/drools-core/src/main/java/org/drools/core/process/impl/WorkItemImpl.java b/drools-core/src/main/java/org/drools/core/process/impl/WorkItemImpl.java
index 1a080ceeaa4..c5f02fbedcc 100644
--- a/drools-core/src/main/java/org/drools/core/process/impl/WorkItemImpl.java
+++ b/drools-core/src/main/java/org/drools/core/process/impl/WorkItemImpl.java
@@ -24,6 +24,7 @@
import java.util.Map;
import org.drools.core.process.WorkItem;
+import org.kie.api.definition.process.WorkflowElementIdentifier;
public class WorkItemImpl implements WorkItem, Serializable {
@@ -37,7 +38,7 @@ public class WorkItemImpl implements WorkItem, Serializable {
private String processInstanceId;
private String deploymentId;
private long nodeInstanceId;
- private long nodeId;
+ private WorkflowElementIdentifier nodeId;
public void setId(long id) {
this.id = id;
@@ -121,11 +122,13 @@ public void setNodeInstanceId(long nodeInstanceId) {
this.nodeInstanceId = nodeInstanceId;
}
- public long getNodeId() {
+ @Override
+ public WorkflowElementIdentifier getNodeId() {
return nodeId;
}
- public void setNodeId(long nodeId) {
+ @Override
+ public void setNodeId(WorkflowElementIdentifier nodeId) {
this.nodeId = nodeId;
}
diff --git a/drools-kiesession/src/test/java/org/drools/kiesession/ProcessContextTest.java b/drools-kiesession/src/test/java/org/drools/kiesession/ProcessContextTest.java
deleted file mode 100644
index 3820ecf1590..00000000000
--- a/drools-kiesession/src/test/java/org/drools/kiesession/ProcessContextTest.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.drools.kiesession;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.drools.core.process.ProcessContext;
-import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
-import org.junit.Test;
-import org.kie.api.KieBase;
-import org.kie.api.runtime.KieSession;
-import org.kie.api.runtime.process.CaseAssignment;
-import org.kie.api.runtime.process.CaseData;
-import org.kie.api.task.model.OrganizationalEntity;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class ProcessContextTest {
-
-
- @Test
- public void testProcessContextGetAssignment() {
-
- KieBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
- KieSession ksession = kbase.newKieSession();
- assertThat(ksession).isNotNull();
-
- CaseInformation caseInfo = new CaseInformation();
- caseInfo.assign("owner", new OrganizationalEntity() {
- @Override
- public String getId() {
- return "testUser";
- }
-
- @Override
- public void writeExternal(ObjectOutput out) throws IOException {
-
- }
-
- @Override
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-
- }
- });
- ksession.insert(caseInfo);
-
- ProcessContext processContext = new ProcessContext(ksession);
-
- CaseAssignment caseAssignment = processContext.getCaseAssignment();
- assertThat(caseAssignment).isNotNull();
- Collection forRole = caseAssignment.getAssignments("owner");
- assertThat(forRole).isNotNull();
- assertThat(forRole.size()).isEqualTo(1);
- }
-
- @Test
- public void testProcessContextGetData() {
-
- KieBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
- KieSession ksession = kbase.newKieSession();
- assertThat(ksession).isNotNull();
-
- CaseInformation caseInfo = new CaseInformation();
- caseInfo.add("test", "value");
-
- ksession.insert(caseInfo);
-
- ProcessContext processContext = new ProcessContext(ksession);
-
- CaseData caseData = processContext.getCaseData();
- assertThat(caseData).isNotNull();
- Map allData = caseData.getData();
- assertThat(allData).isNotNull();
- assertThat(allData.size()).isEqualTo(1);
- assertThat(caseData.getData("test")).isEqualTo("value");
- }
-
- @Test
- public void testProcessContextGetDataAndAssignmentWithoutInsert() {
-
- KieBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
- KieSession ksession = kbase.newKieSession();
- assertThat(ksession).isNotNull();
-
- ProcessContext processContext = new ProcessContext(ksession);
-
- CaseData caseData = processContext.getCaseData();
- assertThat(caseData).isNull();
-
- CaseAssignment caseAssignment = processContext.getCaseAssignment();
- assertThat(caseAssignment).isNull();
- }
-
- private class CaseInformation implements CaseData, CaseAssignment {
-
- private String definitionId;
- private Map data = new HashMap<>();
- private Map assignment = new HashMap<>();
-
- @Override
- public void assign(String roleName, OrganizationalEntity entity) {
- assignment.put(roleName, entity);
- }
-
- @Override
- public void assignUser(String roleName, String userId) {
- }
-
- @Override
- public void assignGroup(String roleName, String groupId) {
- }
-
- @Override
- public void remove(String roleName, OrganizationalEntity entity) {
- assignment.remove(roleName);
- }
-
- @Override
- public Collection getAssignments(String roleName) {
- OrganizationalEntity entity = assignment.get(roleName);
- if (entity == null) {
- return Collections.emptyList();
- }
-
- return List.of(entity);
- }
-
- @Override
- public Collection getRoles() {
- return assignment.keySet();
- }
-
- @Override
- public Map getData() {
- return data;
- }
-
- @Override
- public Object getData(String name) {
- return data.get(name);
- }
-
- @Override
- public void add(String name, Object data) {
- this.data.put(name, data);
- }
-
- @Override
- public void remove(String name) {
- this.data.remove(name);
- }
-
- @Override
- public String getDefinitionId() {
- return definitionId;
- }
- }
-}
diff --git a/kie-api/src/main/java/org/kie/api/cluster/ClusterAwareService.java b/kie-api/src/main/java/org/kie/api/cluster/ClusterAwareService.java
deleted file mode 100644
index e205821e597..00000000000
--- a/kie-api/src/main/java/org/kie/api/cluster/ClusterAwareService.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.cluster;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.kie.api.internal.utils.KieService;
-
-/**
- * Interface that allows to rise some awareness about the cluster environment
- *
- */
-public interface ClusterAwareService extends KieService {
-
- String CLUSTER_NODES_KEY = "nodes";
- String CLUSTER_JOBS_KEY = "jobs";
-
- ClusterNode getThisNode();
- /**
- * Computes whether the jbpm engine instance is the coordinator therefore the one to
- * provide singleton cluster active features.
- * @return whether this instance of jbpm engine is the one coordinating or not.
- */
-
- boolean isCoordinator();
-
- /**
- * Get all active members of the cluster
- */
- Collection getActiveClusterNodes();
-
- void removeData(String key, String partition, T value);
-
- void addData(String key, String partition, T value);
-
- List getData(String key);
-
- List getDataFromPartition(String key, String partition);
-
- /**
- * Add cluster listener for join and left members
- * @param listener
- */
- void addClusterListener(ClusterListener listener);
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/cluster/ClusterListener.java b/kie-api/src/main/java/org/kie/api/cluster/ClusterListener.java
deleted file mode 100644
index ede4c5892b1..00000000000
--- a/kie-api/src/main/java/org/kie/api/cluster/ClusterListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.cluster;
-
-public interface ClusterListener {
-
- void nodeJoined(ClusterNode node);
-
- void nodeLeft(ClusterNode node);
-
-}
\ No newline at end of file
diff --git a/kie-api/src/main/java/org/kie/api/cluster/ClusterNode.java b/kie-api/src/main/java/org/kie/api/cluster/ClusterNode.java
deleted file mode 100644
index cd68aaf4eab..00000000000
--- a/kie-api/src/main/java/org/kie/api/cluster/ClusterNode.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.cluster;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-
-public final class ClusterNode implements Externalizable {
-
- private String location;
-
- private String serverId;
-
-
- public ClusterNode() {
- // for serializing
- }
-
- public ClusterNode(String serverId, String location) {
- this.serverId = serverId;
- this.location = location;
- }
-
- public String getLocation() {
- return location;
- }
-
- public String getServerId() {
- return serverId;
- }
-
- public String toKey() {
- return serverId + "-" + location;
- }
-
- @Override
- public String toString() {
- return "Cluster Node [" + toKey() + "]";
- }
-
- @Override
- public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException {
- input.read(); // skip version
- serverId = (String) input.readObject();
- location = (String) input.readObject();
- }
-
- @Override
- public void writeExternal(ObjectOutput output) throws IOException {
- output.write(1); // read version
- output.writeObject(serverId);
- output.writeObject(location);
- }
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/definition/process/Connection.java b/kie-api/src/main/java/org/kie/api/definition/process/Connection.java
index 32fd57cb1a4..7c53ec6f04e 100644
--- a/kie-api/src/main/java/org/kie/api/definition/process/Connection.java
+++ b/kie-api/src/main/java/org/kie/api/definition/process/Connection.java
@@ -23,7 +23,7 @@
/**
* A connection is a link from one Node to another.
*/
-public interface Connection {
+public interface Connection extends WorkflowElement {
/**
* The Node the connection starts from.
diff --git a/kie-api/src/main/java/org/kie/api/definition/process/Node.java b/kie-api/src/main/java/org/kie/api/definition/process/Node.java
index 68e4830d04d..79f9233dbd6 100644
--- a/kie-api/src/main/java/org/kie/api/definition/process/Node.java
+++ b/kie-api/src/main/java/org/kie/api/definition/process/Node.java
@@ -25,19 +25,7 @@
* A Node represents an activity in the process flow chart.
* Many different predefined nodes are supported out-of-the-box.
*/
-public interface Node {
-
- /**
- * The id of the node. This is unique within its NodeContainer.
- * @return the id of the node
- */
- long getId();
-
- /**
- * the node id in the bpmn
- * @return
- */
- String getNodeUniqueId();
+public interface Node extends WorkflowElement {
/**
* The name of the node
diff --git a/kie-api/src/main/java/org/kie/api/definition/process/NodeContainer.java b/kie-api/src/main/java/org/kie/api/definition/process/NodeContainer.java
index 46f2f5ca3ce..86405c1b996 100644
--- a/kie-api/src/main/java/org/kie/api/definition/process/NodeContainer.java
+++ b/kie-api/src/main/java/org/kie/api/definition/process/NodeContainer.java
@@ -36,7 +36,7 @@ public interface NodeContainer {
*
* @return the node with the given id
*/
- Node getNode(long id);
+ Node getNode(WorkflowElementIdentifier id);
/**
* the node in this NodeContainer with the give unique id
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskPersistenceContextManager.java b/kie-api/src/main/java/org/kie/api/definition/process/WorkflowElement.java
similarity index 69%
rename from kie-internal/src/main/java/org/kie/internal/task/api/TaskPersistenceContextManager.java
rename to kie-api/src/main/java/org/kie/api/definition/process/WorkflowElement.java
index 32a32ba0267..475eb015b2c 100644
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskPersistenceContextManager.java
+++ b/kie-api/src/main/java/org/kie/api/definition/process/WorkflowElement.java
@@ -16,18 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.kie.internal.task.api;
-public interface TaskPersistenceContextManager {
+package org.kie.api.definition.process;
- TaskPersistenceContext getPersistenceContext();
+public interface WorkflowElement {
- void beginCommandScopedEntityManager();
-
- void endCommandScopedEntityManager();
+ /**
+ * The id of the node. This is unique within its NodeContainer.
+ * @return the id of the node
+ */
+ WorkflowElementIdentifier getId();
/**
- * Executes the necessary actions in order to clean up and dispose of the internal fields of this instance.
+ * the node id in the bpmn
+ * @return
*/
- void dispose();
+ default String getUniqueId() {
+ return this.getId().toExternalFormat();
+ }
+
}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/SessionNotFoundException.java b/kie-api/src/main/java/org/kie/api/definition/process/WorkflowElementIdentifier.java
similarity index 62%
rename from kie-internal/src/main/java/org/kie/internal/runtime/manager/SessionNotFoundException.java
rename to kie-api/src/main/java/org/kie/api/definition/process/WorkflowElementIdentifier.java
index 72e0e16cf48..c2d7f5143fb 100644
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/SessionNotFoundException.java
+++ b/kie-api/src/main/java/org/kie/api/definition/process/WorkflowElementIdentifier.java
@@ -16,26 +16,28 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.kie.internal.runtime.manager;
-/**
- * Exception that indicates that ksession could not be found
- *
- */
-public class SessionNotFoundException extends RuntimeException {
+package org.kie.api.definition.process;
- private static final long serialVersionUID = 1L;
+public interface WorkflowElementIdentifier extends Comparable {
- public SessionNotFoundException(String message, Throwable cause) {
- super(message, cause);
- }
+ T toValue();
- public SessionNotFoundException(String message) {
- super(message);
+ @Override
+ int hashCode();
+
+ @Override
+ boolean equals(Object obj);
+
+ @Override
+ default int compareTo(WorkflowElementIdentifier o) {
+ return this.toExternalFormat().compareTo(o.toExternalFormat());
}
- public SessionNotFoundException(Throwable cause) {
- super(cause);
+ default String toExternalFormat() {
+ return toValue().toString();
}
+ String toSanitizeString();
+
}
diff --git a/kie-api/src/main/java/org/kie/api/event/process/ProcessEventListener.java b/kie-api/src/main/java/org/kie/api/event/process/ProcessEventListener.java
index 085f7a34a3b..6ad3c467c14 100644
--- a/kie-api/src/main/java/org/kie/api/event/process/ProcessEventListener.java
+++ b/kie-api/src/main/java/org/kie/api/event/process/ProcessEventListener.java
@@ -111,6 +111,11 @@ default void afterSLAViolated(SLAViolatedEvent event) {}
*/
default void onSignal(SignalEvent event) {}
+ /**
+ * This listeners is triggered when a migration occurs
+ * @param event
+ */
+ default void onMigration(ProcessMigrationEvent event) { }
/**
* This listener method is invoked when a message is sent
* @param event
diff --git a/kie-internal/src/main/java/org/kie/internal/builder/fluent/TaskFluent.java b/kie-api/src/main/java/org/kie/api/event/process/ProcessMigrationEvent.java
similarity index 83%
rename from kie-internal/src/main/java/org/kie/internal/builder/fluent/TaskFluent.java
rename to kie-api/src/main/java/org/kie/api/event/process/ProcessMigrationEvent.java
index f62ecca7daf..b57ca5475f1 100644
--- a/kie-internal/src/main/java/org/kie/internal/builder/fluent/TaskFluent.java
+++ b/kie-api/src/main/java/org/kie/api/event/process/ProcessMigrationEvent.java
@@ -16,14 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.kie.internal.builder.fluent;
-
-import org.kie.api.task.TaskService;
+package org.kie.api.event.process;
/**
- * See {@link TaskService}
- *
+ * An event when a process instance has been started.
*/
-public interface TaskFluent {
+public interface ProcessMigrationEvent
+ extends
+ ProcessEvent {
}
diff --git a/kie-api/src/main/java/org/kie/api/persistence/ObjectStoringStrategy.java b/kie-api/src/main/java/org/kie/api/persistence/ObjectStoringStrategy.java
deleted file mode 100644
index 4a9cdb63795..00000000000
--- a/kie-api/src/main/java/org/kie/api/persistence/ObjectStoringStrategy.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.persistence;
-
-public interface ObjectStoringStrategy {
-
- /**
- * Similar to ObjectMarshallingStrategy, it is used to
- * decide whether this implementation is going to work for
- * the given Object.
- * @param obj a given object
- * @return true if it can persist the given object.
- */
- boolean accept(Object obj);
-
- /**
- * Returns the key for the persisted object.
- * @param persistable the object to persist.
- * @return the key of the persisted object.
- */
- Object persist(Object persistable);
-
- /**
- * Returns the key for the persisted object.
- * @param persistable the object to persist.
- * @return the key of the persisted object.
- */
- Object update(Object persistable);
-
- /**
- * Returns the persisted object.
- * @param key the key of the persisted object.
- * @return a persisted object or null.
- */
- Object read(Object key);
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/Context.java b/kie-api/src/main/java/org/kie/api/runtime/manager/Context.java
deleted file mode 100644
index ecbd53e67ce..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/Context.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager;
-
-/**
- * Context represents to highest level hierarchy of contextual data that might be used
- * when working with RuntimeManager
that is then relying on the context to look up correct
- * instances of RuntimeEngine
.
- *
- * @param - represents the actual type of data context implements as an identifier
- */
-public interface Context {
-
- /**
- * See concrete implementation for available types
- *
- * @return the id of context which is specific to the type of context.
- */
- T getContextId();
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/RegisterableItemsFactory.java b/kie-api/src/main/java/org/kie/api/runtime/manager/RegisterableItemsFactory.java
deleted file mode 100644
index 0bfefd0447f..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/RegisterableItemsFactory.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager;
-
-import java.util.List;
-import java.util.Map;
-
-import org.kie.api.event.process.ProcessEventListener;
-import org.kie.api.event.rule.AgendaEventListener;
-import org.kie.api.event.rule.RuleRuntimeEventListener;
-import org.kie.api.runtime.process.WorkItemHandler;
-import org.kie.api.task.TaskLifeCycleEventListener;
-
-/**
- * Factory that is used by RuntimeManager
to configure RuntimeEngine
- * (especially KieSession) with various registerable items:
- *
- * - Work item handlers
- * - Process event listeners
- * - Agenda event listeners
- * - Working memory event listeners
- *
- * Implementations of this interface shall decide what shall be registered for given RuntimeEngine
.
- * If there are any needs to be bound handlers or listeners to eny parts of runtime engine these can be obtained:
- *
- * - KieSession
- * - TaskService
- *
- * Although it's possible to get individual instance from runtime engine it's recommended to use RuntimeEngine
- * instance instead to allow most flexible behavior.
- */
-public interface RegisterableItemsFactory {
-
- /**
- * Returns new instances of WorkItemHandler
that will be registered on RuntimeEngine
- * @param runtime provides RuntimeEngine
in case handler need to make use of it internally
- * @return map of handlers to be registered - in case of no handlers empty map shall be returned.
- */
- Map getWorkItemHandlers(RuntimeEngine runtime);
-
- /**
- * Returns new instances of ProcessEventListener
that will be registered on RuntimeEngine
- * @param runtime provides RuntimeEngine
in case listeners need to make use of it internally
- * @return list of listeners to be registered - in case of no listeners empty list shall be returned.
- */
- List getProcessEventListeners(RuntimeEngine runtime);
-
- /**
- * Returns new instances of AgendaEventListener
that will be registered on RuntimeEngine
- * @param runtime provides RuntimeEngine
in case listeners need to make use of it internally
- * @return list of listeners to be registered - in case of no listeners empty list shall be returned.
- */
- List getAgendaEventListeners(RuntimeEngine runtime);
-
- /**
- * Returns new instances of RuleRuntimeEventListener
that will be registered on RuntimeEngine
- * @param runtime provides RuntimeEngine
in case listeners need to make use of it internally
- * @return list of listeners to be registered - in case of no listeners empty list shall be returned.
- */
- List getRuleRuntimeEventListeners(RuntimeEngine runtime);
-
- /**
- * Returns globals that shall be registered on KieSession
.
- * @param runtime provides RuntimeEngine
in case globals need to make use of it internally
- * @return map of globals to be registered - in case of no globals empty map shall be returned.
- */
- Map getGlobals(RuntimeEngine runtime);
-
- /**
- * @return new instances of TaskLifeCycleEventListener
that will be registered on RuntimeEngine
.
- */
- List getTaskListeners();
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEngine.java b/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEngine.java
deleted file mode 100644
index 7124d7d9cca..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEngine.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager;
-
-import org.kie.api.runtime.KieSession;
-import org.kie.api.runtime.manager.audit.AuditService;
-import org.kie.api.task.TaskService;
-
-/**
- * RuntimeEngine is the main entry point to interact with the process engine and task
- * service. It's responsibility is to ensure that process engine and task service
- * are properly configured and know about each other which eliminate the need to
- * manually setup the integration between these two.
- * RuntimeEngines are always produced by RuntimeManager
and thus shall never be
- * created manually. RuntimeManager
provides all required information to build
- * and bootstrap the RuntimeEngine
so it is configured and ready to be used
- * regardless of when it is invoked.
- */
-public interface RuntimeEngine {
-
- /**
- * @return KieSession
configured for this RuntimeEngine
- */
- KieSession getKieSession();
-
- /**
- * @return TaskService
configured for this RuntimeEngine
- */
- TaskService getTaskService();
-
- /**
- * @return AuditService
that gives access to underlying runtime data such
- * as process instance, node instance and variable log entries.
- */
- AuditService getAuditService();
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironment.java b/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironment.java
deleted file mode 100644
index 444ea30410a..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironment.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager;
-
-import org.kie.api.KieBase;
-import org.kie.api.runtime.Environment;
-import org.kie.api.runtime.KieSessionConfiguration;
-import org.kie.api.task.UserGroupCallback;
-import org.kie.api.task.UserInfo;
-
-/**
- * Definition of the runtime environment that will be used by instance of RuntimeManager
.
- * RuntimeEnvironment
delivers all information to the runtime manager to be able to properly
- * configure and bootstrap the manager and then runtime engine instances.
- * It shall be considered as template of the configuration used by the manager that is read only and shall
- * not be changed once RuntimeManager
has been created.
- */
-public interface RuntimeEnvironment {
-
- /**
- * @return KieBase
that shall be used by the manager
- */
- KieBase getKieBase();
-
- /**
- * @return environment that shall be used to create instances of KieSession
- */
- Environment getEnvironment();
-
- /**
- * @return KieSession configuration that shall be used to create instances of KieSession
- */
- KieSessionConfiguration getConfiguration();
-
- /**
- * @return indicates if persistence shall be used for the KieSession instances
- */
- boolean usePersistence();
-
- /**
- * @return concrete implementation of RegisterableItemsFactory
to obtain handlers and listeners
- * that shall be registered on instances of KieSession
- */
- RegisterableItemsFactory getRegisterableItemsFactory();
-
- /**
- * @return concrete implementation of UserGroupCallback
that shall be registered on instances
- * of TaskService
for managing users and groups.
- */
- UserGroupCallback getUserGroupCallback();
-
- /**
- * @return concrete implementation of UserInfo
that shall be registered on instances
- * of TaskService
for managing user info.
- */
- UserInfo getUserInfo();
-
- /**
- * @return custom class loader that shall be used by the process engine and task service instances
- */
- ClassLoader getClassLoader();
-
- /**
- * Closes the environment allowing to close all depending components such as ksession factories, etc
- */
- void close();
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironmentBuilder.java b/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironmentBuilder.java
deleted file mode 100644
index b13582730b4..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironmentBuilder.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager;
-
-import org.kie.api.KieBase;
-import org.kie.api.builder.ReleaseId;
-import org.kie.api.io.Resource;
-import org.kie.api.io.ResourceType;
-import org.kie.api.task.UserGroupCallback;
-import org.kie.api.task.UserInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public interface RuntimeEnvironmentBuilder {
-
- public RuntimeEnvironmentBuilder persistence(boolean persistenceEnabled);
-
- public RuntimeEnvironmentBuilder entityManagerFactory(Object emf);
-
- public RuntimeEnvironmentBuilder addAsset(Resource asset, ResourceType type);
-
- public RuntimeEnvironmentBuilder addEnvironmentEntry(String name, Object value);
-
- public RuntimeEnvironmentBuilder addConfiguration(String name, String value);
-
- public RuntimeEnvironmentBuilder knowledgeBase(KieBase kbase);
-
- public RuntimeEnvironmentBuilder userGroupCallback(UserGroupCallback callback);
-
- public RuntimeEnvironmentBuilder userInfo(UserInfo userInfo);
-
- public RuntimeEnvironmentBuilder registerableItemsFactory(RegisterableItemsFactory factory);
-
- public RuntimeEnvironment get();
-
- public RuntimeEnvironmentBuilder classLoader(ClassLoader cl);
-
- public RuntimeEnvironmentBuilder schedulerService(Object globalScheduler);
-
- public static class Factory implements RuntimeEnvironmentBuilderFactory {
- private static RuntimeEnvironmentBuilderFactory INSTANCE;
- private static Logger logger = LoggerFactory.getLogger(Factory.class);
-
- static {
- try {
- INSTANCE = ( RuntimeEnvironmentBuilderFactory )
- Class.forName(System.getProperty("org.jbpm.runtime.env.builder.class",
- "org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder")).newInstance();
- } catch (Exception e) {
- logger.error("Unable to instance RuntimeEnvironmentBuilderFactory due to " + e.getMessage());
- }
- }
-
- /**
- * Returns a reference to the RuntimeEnvironmentBuilderFactory singleton
- */
- public static RuntimeEnvironmentBuilderFactory get() {
- if (INSTANCE == null) {
- throw new RuntimeException("RuntimeEnvironmentBuilder was not initialized, see previous errors");
- }
- return INSTANCE;
- }
-
- @Override
- public RuntimeEnvironmentBuilder newEmptyBuilder() {
- return get().newEmptyBuilder();
- }
-
- @Override
- public RuntimeEnvironmentBuilder newDefaultBuilder() {
- return get().newDefaultBuilder();
- }
-
- @Override
- public RuntimeEnvironmentBuilder newDefaultInMemoryBuilder() {
- return get().newDefaultInMemoryBuilder();
- }
-
- @Override
- public RuntimeEnvironmentBuilder newDefaultBuilder(String groupId, String artifactId, String version) {
- return get().newDefaultBuilder(groupId, artifactId, version);
- }
-
- @Override
- public RuntimeEnvironmentBuilder newDefaultBuilder(String groupId, String artifactId, String version, String kbaseName, String ksessionName) {
- return get().newDefaultBuilder(groupId, artifactId, version, kbaseName, ksessionName);
- }
-
- @Override
- public RuntimeEnvironmentBuilder newDefaultBuilder(ReleaseId releaseId) {
- return get().newDefaultBuilder(releaseId);
- }
-
- @Override
- public RuntimeEnvironmentBuilder newDefaultBuilder(ReleaseId releaseId, String kbaseName, String ksessionName) {
- return get().newDefaultBuilder(releaseId, kbaseName, ksessionName);
- }
-
- @Override
- public RuntimeEnvironmentBuilder newClasspathKmoduleDefaultBuilder() {
- return get().newClasspathKmoduleDefaultBuilder();
- }
-
- @Override
- public RuntimeEnvironmentBuilder newClasspathKmoduleDefaultBuilder(String kbaseName, String ksessionName) {
- return get().newClasspathKmoduleDefaultBuilder(kbaseName, ksessionName);
- }
-
-
- }
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironmentBuilderFactory.java b/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironmentBuilderFactory.java
deleted file mode 100644
index 8e4502c9d1f..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEnvironmentBuilderFactory.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager;
-
-import org.kie.api.builder.ReleaseId;
-
-public interface RuntimeEnvironmentBuilderFactory {
-
- /**
- * Provides completely empty RuntimeEnvironmentBuilder
instance that allows to manually
- * set all required components instead of relying on any defaults.
- * @return new instance of RuntimeEnvironmentBuilder
- */
- public RuntimeEnvironmentBuilder newEmptyBuilder();
-
- /**
- * Provides default configuration of RuntimeEnvironmentBuilder
that is based on:
- *
- * - DefaultRuntimeEnvironment
- *
- * @return new instance of RuntimeEnvironmentBuilder
that is already preconfigured with defaults
- *
- * see DefaultRuntimeEnvironment
- */
- public RuntimeEnvironmentBuilder newDefaultBuilder();
-
- /**
- * Provides default configuration of RuntimeEnvironmentBuilder
that is based on:
- *
- * - DefaultRuntimeEnvironment
- *
- * but it does not have persistence for process engine configured so it will only store process instances in memory
- * @return new instance of RuntimeEnvironmentBuilder
that is already preconfigured with defaults
- *
- * see DefaultRuntimeEnvironment
- */
- public RuntimeEnvironmentBuilder newDefaultInMemoryBuilder();
-
- /**
- * Provides default configuration of RuntimeEnvironmentBuilder
that is based on:
- *
- * - DefaultRuntimeEnvironment
- *
- * This one is tailored to works smoothly with kjars as the notion of kbase and ksessions
- * @param groupId group id of kjar
- * @param artifactId artifact id of kjar
- * @param version version number of kjar
- * @return new instance of RuntimeEnvironmentBuilder
that is already preconfigured with defaults
- *
- * see DefaultRuntimeEnvironment
- */
- public RuntimeEnvironmentBuilder newDefaultBuilder(String groupId, String artifactId, String version);
-
- /**
- * Provides default configuration of RuntimeEnvironmentBuilder
that is based on:
- *
- * - DefaultRuntimeEnvironment
- *
- * This one is tailored to works smoothly with kjars as the notion of kbase and ksessions
- * @param groupId group id of kjar
- * @param artifactId artifact id of kjar
- * @param version version number of kjar
- * @param kbaseName name of the kbase defined in kmodule.xml stored in kjar
- * @param ksessionName name of the ksession define in kmodule.xml stored in kjar
- * @return new instance of RuntimeEnvironmentBuilder
that is already preconfigured with defaults
- *
- * see DefaultRuntimeEnvironment
- */
- public RuntimeEnvironmentBuilder newDefaultBuilder(String groupId, String artifactId, String version, String kbaseName, String ksessionName);
-
- /**
- * Provides default configuration of RuntimeEnvironmentBuilder
that is based on:
- *
- * - DefaultRuntimeEnvironment
- *
- * This one is tailored to works smoothly with kjars as the notion of kbase and ksessions
- * @param releaseId ReleaseId
that described the kjar
- * @return new instance of RuntimeEnvironmentBuilder
that is already preconfigured with defaults
- *
- * see DefaultRuntimeEnvironment
- */
- public RuntimeEnvironmentBuilder newDefaultBuilder(ReleaseId releaseId);
-
- /**
- * Provides default configuration of RuntimeEnvironmentBuilder
that is based on:
- *
- * - DefaultRuntimeEnvironment
- *
- * This one is tailored to works smoothly with kjars as the notion of kbase and ksessions
- * @param releaseId ReleaseId
that described the kjar
- * @param kbaseName name of the kbase defined in kmodule.xml stored in kjar
- * @param ksessionName name of the ksession define in kmodule.xml stored in kjar
- * @return new instance of RuntimeEnvironmentBuilder
that is already preconfigured with defaults
- *
- * see DefaultRuntimeEnvironment
- */
- public RuntimeEnvironmentBuilder newDefaultBuilder(ReleaseId releaseId, String kbaseName, String ksessionName);
-
- /**
- * Provides default configuration of RuntimeEnvironmentBuilder
that is based on:
- *
- * - DefaultRuntimeEnvironment
- *
- * It relies on KieClasspathContainer that requires to have kmodule.xml present in META-INF folder which
- * defines the kjar itself.
- * Expects to use default kbase and ksession from kmodule.
- * @return new instance of RuntimeEnvironmentBuilder
that is already preconfigured with defaults
- *
- * see DefaultRuntimeEnvironment
- */
- public RuntimeEnvironmentBuilder newClasspathKmoduleDefaultBuilder();
-
- /**
- * Provides default configuration of RuntimeEnvironmentBuilder
that is based on:
- *
- * - DefaultRuntimeEnvironment
- *
- * It relies on KieClasspathContainer that requires to have kmodule.xml present in META-INF folder which
- * defines the kjar itself.
- * @param kbaseName name of the kbase defined in kmodule.xml
- * @param ksessionName name of the ksession define in kmodule.xml
- * @return new instance of RuntimeEnvironmentBuilder
that is already preconfigured with defaults
- *
- * see DefaultRuntimeEnvironment
- */
- public RuntimeEnvironmentBuilder newClasspathKmoduleDefaultBuilder(String kbaseName, String ksessionName);
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeManager.java b/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeManager.java
deleted file mode 100644
index 8580c5975e9..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeManager.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager;
-
-/**
- * RuntimeManager manages RuntimeEngine
s that are essentially build with
- * KieSession
and TaskService
to deliver executable environments for
- * processes and user tasks.
- * Moreover RuntimeManager
ensures that all components are configured and bootstrapped
- * as soon as manager is instantiated to ensure its fully featured functionality right from the start.
- * That includes:
- *
- * - timer service
- * - task service
- * - finds and initializes timer start events based processes
- *
- * RuntimeManager shall always be closed whenever it's not needed any more to free up resources it allocated.
- * RuntimeManager
s are identified by unique identifiers and thus there cannot be two RuntimeManagers
- * with the same id active at the same time in the same system.
- * RuntimeManager implements runtime strategy that provides certain management capabilities to reduce manual
- * work needed to control ksession behavior. Which mainly covers when to create, dispose and when to use which ksession.
- * Currently there are three predefined strategies:
- *
- * - Singleton - there is only one, always active ksession for the manager,
- * access to it is thread safe that is achieved by synchronization which applies to both
- * ksession and task service
- * - PerRequest - new ksession and task service instances will be returned for every invocation of the
- * getRuntimeEngine(Context) method. Important to know is same instance of RuntimeEngine will
- * be returned through out transaction to avoid issues with persistence context.
- * - PerProcessInstance - most advanced strategy that keeps track of which ksession was used to work with
- * given process instance. It lives as long as process instance is alive and is destroyed
- * when process instance is completed/aborted.
- *
- */
-public interface RuntimeManager {
-
- /**
- * Returns RuntimeEngine
instance that is fully initialized:
- *
- * - KiseSession is created or loaded depending on the strategy
- * - TaskService is initialized and attached to ksession (via listener)
- * - WorkItemHandlers are initialized and registered on ksession
- * - EventListeners (process, agenda, working memory) are initialized and added to ksession
- *
- * @param context the concrete implementation of the context that is supported by given RuntimeManager
- * @return instance of the RuntimeEngine
- */
- RuntimeEngine getRuntimeEngine(Context> context);
-
- /**
- * @return unique identifier of this RuntimeManager
- */
- String getIdentifier();
-
- /**
- * Disposes RuntimeEngine
and notifies all listeners about that fact.
- * This method should always be used to dispose RuntimeEngine
that is not needed
- * anymore.
- * ksession.dispose() shall never be used with RuntimeManager as it will break the internal
- * mechanisms of the manager responsible for clear and efficient disposal.
- * Dispose is not needed if RuntimeEngine
was obtained within active JTA transaction,
- * this means that when getRuntimeEngine method was invoked during active JTA transaction then dispose of
- * the runtime engine will happen automatically on transaction completion.
- * @param runtime
- */
- void disposeRuntimeEngine(RuntimeEngine runtime);
-
- /**
- * Closes RuntimeManager
and releases it's resources. Shall always be called when
- * runtime manager is not needed any more. Otherwise it will still be active and operational.
- */
- void close();
-
- /**
- * Allows to signal event on runtime manager level which in turn allows to broadcast given event to all listening
- * components managed by this RuntimeManager
- * @param type type of the signal
- * @param event actual event data
- */
- void signalEvent(String type, Object event);
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeManagerFactory.java b/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeManagerFactory.java
deleted file mode 100644
index e5bfc516f3b..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeManagerFactory.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Factory that produces instances of RuntimeManager
. It allows to produce
- * runtime managers based on predefined strategies:
- *
- * - Singleton
- * - PerRequest
- * - PerProcessInstance
- *
- * By default uses org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl
as implementation
- * of the factory but can be overridden using system property org.jbpm.runtime.manager.class
- * that should provide fully qualified class name of the class that implements this factory.
- */
-public interface RuntimeManagerFactory {
-
- /**
- * Produces new instance of singleton RuntimeManager
with default identifier.
- * Since it relies on default identifier it can only be invoked once unless previously produced
- * manager is closed. Otherwise error will be thrown indicating that managers must be identifier uniquely.
- * @param environment environment instance for the new runtime manager
- * @return new instance of RuntimeManager
- */
- RuntimeManager newSingletonRuntimeManager(RuntimeEnvironment environment);
-
- /**
- * Produces new instance of singleton RuntimeManager
with custom identifier.
- * In case the given identifier is already in use error will be thrown indicating that managers must be identifier uniquely.
- * @param environment environment instance for the new runtime manager
- * @param identifier custom identifier for the manager
- * @return new instance of RuntimeManager
- */
- RuntimeManager newSingletonRuntimeManager(RuntimeEnvironment environment, String identifier);
-
- /**
- * Produces new instance of per request RuntimeManager
with default identifier.
- * Since it relies on default identifier it can only be invoked once unless previously produced
- * manager is closed. Otherwise error will be thrown indicating that managers must be identifier uniquely.
- * @param environment environment instance for the new runtime manager
- * @return new instance of RuntimeManager
- */
- RuntimeManager newPerRequestRuntimeManager(RuntimeEnvironment environment);
-
- /**
- * Produces new instance of per request RuntimeManager
with custom identifier.
- * In case the given identifier is already in use error will be thrown indicating that managers must be identifier uniquely.
- * @param environment environment instance for the new runtime manager
- * @param identifier custom identifier for the manager
- * @return new instance of RuntimeManager
- */
- RuntimeManager newPerRequestRuntimeManager(RuntimeEnvironment environment, String identifier);
-
- /**
- * Produces new instance of per process instance RuntimeManager
with default identifier.
- * Since it relies on default identifier it can only be invoked once unless previously produced
- * manager is closed. Otherwise error will be thrown indicating that managers must be identifier uniquely.
- * @param environment environment instance for the new runtime manager
- * @return new instance of RuntimeManager
- */
- RuntimeManager newPerProcessInstanceRuntimeManager(RuntimeEnvironment environment);
-
- /**
- * Produces new instance of per process instance RuntimeManager
with custom identifier.
- * In case the given identifier is already in use error will be thrown indicating that managers must be identifier uniquely.
- * @param environment environment instance for the new runtime manager
- * @param identifier custom identifier for the manager
- * @return new instance of RuntimeManager
- */
- RuntimeManager newPerProcessInstanceRuntimeManager(RuntimeEnvironment environment, String identifier);
-
- /**
- * Produces new instance of per case RuntimeManager
with default identifier.
- * Since it relies on default identifier it can only be invoked once unless previously produced
- * manager is closed. Otherwise error will be thrown indicating that managers must be identifier uniquely.
- * @param environment environment instance for the new runtime manager
- * @return new instance of RuntimeManager
- */
- public RuntimeManager newPerCaseRuntimeManager(RuntimeEnvironment environment);
-
- /**
- * Produces new instance of per case RuntimeManager
with custom identifier.
- * In case the given identifier is already in use error will be thrown indicating that managers must be identifier uniquely.
- * @param environment environment instance for the new runtime manager
- * @param identifier custom identifier for the manager
- * @return new instance of RuntimeManager
- */
- public RuntimeManager newPerCaseRuntimeManager(RuntimeEnvironment environment, String identifier);
-
- /**
- * A Factory for this RuntimeManagerFactory
- */
- public static class Factory {
- private static boolean initialized = false;
- private static RuntimeManagerFactory INSTANCE;
- private static Logger logger = LoggerFactory.getLogger(Factory.class);
-
- private static Exception initializationException;
-
- /**
- * Returns a reference to the RuntimeManagerFactory singleton
- */
- public static RuntimeManagerFactory get() {
- return get(null);
- }
-
- public synchronized static RuntimeManagerFactory get(ClassLoader classLoader) {
- if (!initialized) {
- INSTANCE = create(classLoader);
- } else if (INSTANCE == null) {
- throw new RuntimeException("RuntimeManagerFactory was not initialized due to "+ initializationException.getMessage(), initializationException);
- }
- return INSTANCE;
- }
-
- private static RuntimeManagerFactory create(ClassLoader classLoader) {
- initialized = true;
- try {
- String className = System.getProperty("org.jbpm.runtime.manager.class",
- "org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl" );
- return classLoader != null ?
- ( RuntimeManagerFactory ) Class.forName( className, true, classLoader ).newInstance() :
- ( RuntimeManagerFactory ) Class.forName( className ).newInstance();
- } catch (Exception e) {
- initializationException = e;
- logger.error("Unable to instance RuntimeManagerFactory due to " + e.getMessage());
- }
- return null;
- }
-
- /**
- * This method is used in jBPM OSGi Activators as we need a way to force reset when starting
- * the bundles in case it failed previously.
- */
- public static synchronized void reset() {
- if (initializationException != null) {
- initializationException = null;
- initialized = false;
- }
- }
- }
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/audit/AuditService.java b/kie-api/src/main/java/org/kie/api/runtime/manager/audit/AuditService.java
deleted file mode 100644
index 11e5ec34491..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/audit/AuditService.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager.audit;
-
-import java.util.List;
-
-/**
- * AuditService provides access to active and already completed process (and its components) data.
- * Delivers data about:
- *
- * - Process instances
- * - Node instances
- * - Variable instances
- *
- * there might be some limitations in various implementations thus some of the methods might throw
- * UnsupportedOperationException
- */
-public interface AuditService {
-
- /**
- * Returns all known process instances currently available to the audit service
- * @return all process instance logs or empty list if none were found
- */
- List extends ProcessInstanceLog> findProcessInstances();
-
- /**
- * Returns all known process instances for given process id
- * @param processId identifier of the process definition
- * @return all process instance logs for given process id or empty list if none were found
- */
- List extends ProcessInstanceLog> findProcessInstances(String processId);
-
- /**
- * Returns all active process instances for given process id
- * @param processId identifier of the process definition
- * @return all active process instance logs for given process id or empty list if none were found
- */
- List extends ProcessInstanceLog> findActiveProcessInstances(String processId);
-
- /**
- * Returns process instance log for given process instance id
- * @param processInstanceId unique identifier of process instance
- * @return process instance log for given process instance id or null if not found
- */
- ProcessInstanceLog findProcessInstance(String processInstanceId);
-
- /**
- * Returns all known subprocess instance logs for given process instance id - considered parent process instance id
- * @param processInstanceId identifier of the parent process instance id
- * @return all process instance logs that are subprocess to a given process instance id
- */
- List extends ProcessInstanceLog> findSubProcessInstances(String processInstanceId);
-
- /**
- * Returns all node instances that were already triggered for given process instance id
- * @param processInstanceId unique identifier of process instance
- * @return all node instance logs for given process instance id
- */
- List extends NodeInstanceLog> findNodeInstances(String processInstanceId);
-
- /**
- * @param processInstanceId unique identifier of process instance
- * @param nodeId node identifier - by default it should be unique id (from process definition)
- * but if not available regular node id shall be used
- * @return all node instances that were already triggered for given process instance id and node identifier
- */
- List extends NodeInstanceLog> findNodeInstances(String processInstanceId, String nodeId);
-
- /**
- * Returns all variable logs for given process instance id
- * @param processInstanceId unique identifier of process instance
- * @return all variables logs for given process instance or empty list of none were found
- */
- List extends VariableInstanceLog> findVariableInstances(String processInstanceId);
-
- /**
- * Returns all variable logs for given process instance id and variable identifier
- * @param processInstanceId unique identifier of process instance
- * @param variableId variable name
- * @return all variable logs for given process instance and variable identifier or empty list if none were found
- */
- List extends VariableInstanceLog> findVariableInstances(String processInstanceId, String variableId);
-
- /**
- * Returns all variable logs that are identified by variable id regardless of what process instance they belong to
- * @param variableId variable name
- * @param onlyActiveProcesses indicates if only active process instances should be considered or both active and completed
- * @return all variable logs for given variable id or empty list if none were found
- */
- List extends VariableInstanceLog> findVariableInstancesByName(String variableId, boolean onlyActiveProcesses);
-
- /**
- * Returns all variable logs that are identified by variable id and has given value
- * regardless of what process instance they belong to
- * @param variableId variable name
- * @param value value of the variable
- * @param onlyActiveProcesses indicates if only active process instances should be considered or both active and completed
- * @return all variable logs for given variable id and its value matches given value or empty list if none were found
- */
- List extends VariableInstanceLog> findVariableInstancesByNameAndValue(String variableId, String value, boolean onlyActiveProcesses);
-
- /**
- * Removes all entries from audit data store
- */
- void clear();
-
- /**
- * Indicates that work with this instance of AuditService
is completed and can be disposed (release resources)
- */
- void dispose();
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/audit/NodeInstanceLog.java b/kie-api/src/main/java/org/kie/api/runtime/manager/audit/NodeInstanceLog.java
deleted file mode 100644
index cd3e4294b68..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/audit/NodeInstanceLog.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager.audit;
-
-import java.util.Date;
-/**
- * Audit view of node instance where each node instance (in most of the cases) will have two entries:
- *
- * - when node instance was triggered
- * - when node instance was left - completed
- *
- */
-public interface NodeInstanceLog {
-
- /**
- * Indicates that node instance was triggered
- */
- public static final int TYPE_ENTER = 0;
-
- /**
- * Indicates that node instance was left (it's no more active)
- */
- public static final int TYPE_EXIT = 1;
-
- /**
- * Indicates that the node instance was left because an abort operation (it is not active anymore)
- */
- public static final int TYPE_ABORTED = 2;
-
- /**
- * Indicates that the node was taking another route because a signal, timeout, escanalation.
- */
-
- public static final int TYPE_SKIPPED = 3;
-
- /**
- * Indicates that the node was left because of the workflow considered not needed to be executed
- */
-
- public static final int TYPE_OBSOLETE = 4;
-
- /**
- * indicates that the node was left because an error
- */
- public static final int TYPE_ERROR = 5;
-
- /**
- * @return process instance identifier
- */
- Long getProcessInstanceId();
-
- /**
- * @return id of the definition
- */
- String getProcessId();
-
- /**
- * @return identifier of the node instance
- */
- String getNodeInstanceId();
-
- /**
- * @return identifier of the node which usually is the unique identifier from process definition,
- * but can be unique identifier assigned by the engine when unique id is not available
- */
- String getNodeId();
-
- /**
- * @return name of the node from process definition
- */
- String getNodeName();
-
- /**
- * @return date on when this node was triggered
- */
- Date getDate();
-
- /**
- * @return identifier of work item that this node refers to, might be null if it's not work item based node
- */
- Long getWorkItemId();
-
- /**
- * Incoming or outgoing connection identifier (sequence flow) for given node.
- * Incoming or outgoing depends on the type of the node instance log entry where
- *
- * - entry type will contain incoming sequence flow
- * - exit type will contain outgoing sequence flow
- *
- * @return Incoming or outgoing connection identifier
- *
- * @see NodeInstanceLog#getType()
- */
- String getConnection();
-
- /**
- * @return external (optional) identifier associated with this process instance
- */
- String getExternalId();
-
- /**
- * @return Node type that indicates what sort of activity it was e.g. Human Task, Script Task, etc
- */
- String getNodeType();
-
- /**
- * @return Type of the node instance log entry - Entry or Exit
- * @see NodeInstanceLog#TYPE_ENTER
- * @see NodeInstanceLog#TYPE_EXIT
- */
- Integer getType();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/audit/ProcessInstanceLog.java b/kie-api/src/main/java/org/kie/api/runtime/manager/audit/ProcessInstanceLog.java
deleted file mode 100644
index e9bebcb91a4..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/audit/ProcessInstanceLog.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager.audit;
-
-import java.util.Date;
-
-/**
- * Audit view of process instance
- *
- */
-public interface ProcessInstanceLog {
-
- /**
- * Process instance identifier
- * @return the {@link Long} value
- */
- Long getProcessInstanceId();
-
- /**
- * Process id of the definition
- * @return the {@link String} value
- */
- String getProcessId();
-
- /**
- * Start date of this process instance
- * @return the {@link Date} value
- */
- Date getStart();
-
- /**
- * End date of this process instance, null if process instance is still active
- * @return the {@link Date} value
- */
- Date getEnd();
-
- /**
- * Status of the process instance and might be one of:
- *
- * - ProcessInstance.STATE_ACTIVE
- * - ProcessInstance.STATE_COMPLETED
- * - ProcessInstance.STATE_ABORTED
- * - ProcessInstance.STATE_SUSPENDED
- *
- * @return the {@link Integer} value
- */
- Integer getStatus();
-
- /**
- * Parent process instance id, will be null for top level process instance
- * @return the {@link Long} value
- */
- Long getParentProcessInstanceId();
-
- /**
- * Outcome of the process instance that is providing error information in case process
- * instance completed with an error
- * @return the {@link String} value
- */
- String getOutcome();
-
- /**
- * Amount of time (in milliseconds) that process instance took to complete.
- * Available only when process instance is completed.
- * @return the {@link String} value
- */
- Long getDuration();
-
- /**
- * Identifier of a entity (user) who initiated this process instance.
- * @return the {@link String} value
- */
- String getIdentity();
-
- /**
- * External (optional) identifier associated with this process instance
- * @return the {@link String} value
- */
- String getExternalId();
-
- /**
- * Version of the process definition
- * @return the {@link String} value
- */
- String getProcessVersion();
-
- /**
- * Name of the process definition
- * @return the {@link String} value
- */
- String getProcessName();
-
- /**
- * Description of the process instance
- * @return the {@link String} value
- */
- String getProcessInstanceDescription();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/manager/audit/VariableInstanceLog.java b/kie-api/src/main/java/org/kie/api/runtime/manager/audit/VariableInstanceLog.java
deleted file mode 100644
index da38c29c30b..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/manager/audit/VariableInstanceLog.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.manager.audit;
-
-import java.util.Date;
-
-/**
- * Audit view of variables that keeps track of all changes of variable identified by given name/id.
- * This means that variable log will contain both current and previous (if exists) value of the variable.
- *
- */
-public interface VariableInstanceLog {
-
- /**
- * @return process instance identifier
- */
- Long getProcessInstanceId();
-
- /**
- * @return process id of the definition
- */
- String getProcessId();
-
- /**
- * @return additional information in case variable is defined on composite node level to be able to distinguish
- * it between top level and embedded level variables
- */
- String getVariableInstanceId();
-
- /**
- * @return identifier of the variable aka variable name
- */
- String getVariableId();
-
- /**
- * @return current value of the variable
- */
- String getValue();
-
- /**
- * @return previous value of the variable (if any)
- */
- String getOldValue();
-
- /**
- * @return date when the variable was set (to current value)
- */
- Date getDate();
-
- /**
- * @return external (optional) identifier associated with this process instance
- */
- String getExternalId();
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/process/CaseAssignment.java b/kie-api/src/main/java/org/kie/api/runtime/process/CaseAssignment.java
deleted file mode 100644
index fb159a4c9b0..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/process/CaseAssignment.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.process;
-
-import java.util.Collection;
-
-import org.kie.api.task.model.OrganizationalEntity;
-
-/**
- * Represents case assignment which usually means named role to individuals or groups.
- *
- */
-public interface CaseAssignment {
-
- /**
- * Assigns given entity (either user or group) to given role
- * @param roleName name of the role entity should be assigned to
- * @param entity user or group to be assigned
- */
- void assign(String roleName, OrganizationalEntity entity);
-
- /**
- * Assigns given user to given role
- * @param roleName name of the role user should be assigned to
- * @param userId user to be assigned
- */
- void assignUser(String roleName, String userId);
-
- /**
- * Assigns given group to given role
- * @param roleName name of the role group should be assigned to
- * @param groupId group to be assigned
- */
- void assignGroup(String roleName, String groupId);
-
- /**
- * Removes given entity from the role
- * @param roleName name of the role that given entity should be removed from
- * @param entity use or group to be removed
- */
- void remove(String roleName, OrganizationalEntity entity);
-
- /**
- * Returns assigned entities for given role
- * @param roleName name of the role assignment should be returned for
- * @return returns all assignments for the given role
- */
- Collection getAssignments(String roleName);
-
- /**
- * Returns defined roles
- * @return returns all roles
- */
- Collection getRoles();
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/process/CaseData.java b/kie-api/src/main/java/org/kie/api/runtime/process/CaseData.java
deleted file mode 100644
index 7e5441799bc..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/process/CaseData.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.process;
-
-import java.util.Map;
-
-/**
- * Top level of Case(File)Data that holds all shared information within a case.
- *
- */
-public interface CaseData {
-
- /**
- * Returns all available case data for given case.
- * @return
- */
- Map getData();
-
- /**
- * Returns case data for given case registered under given name.
- * @return
- */
- Object getData(String name);
-
-
- /**
- * Add single data item into existing case file
- * (replaces already existing data that matches with input)
- * @param name
- * @param data
- */
- void add(String name, Object data);
-
- /**
- * Remove permanently given data from existing case file
- * @param name
- */
- void remove(String name);
-
-
- /**
- * Returns case definition id of this case file
- * @return
- */
- String getDefinitionId();
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstance.java b/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstance.java
index 52269e49948..b6c5271c6c5 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstance.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstance.java
@@ -19,6 +19,7 @@
package org.kie.api.runtime.process;
import org.kie.api.definition.process.Node;
+import org.kie.api.definition.process.WorkflowElementIdentifier;
/**
* A node instance represents the execution of one specific node
@@ -53,7 +54,7 @@ public interface NodeInstance {
*
* @return the id of the node this node instance refers to
*/
- long getNodeId();
+ WorkflowElementIdentifier getNodeId();
/**
* Return the node this node instance refers to. The node
diff --git a/kie-api/src/main/java/org/kie/api/runtime/process/ProcessContext.java b/kie-api/src/main/java/org/kie/api/runtime/process/ProcessContext.java
index 512747daf5a..4e0fa73609c 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/process/ProcessContext.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/process/ProcessContext.java
@@ -72,9 +72,5 @@ public interface ProcessContext extends KieContext {
*/
void setVariable(String variableName,
Object value);
-
- CaseAssignment getCaseAssignment();
-
- CaseData getCaseData();
}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/query/AdvancedQueryContext.java b/kie-api/src/main/java/org/kie/api/runtime/query/AdvancedQueryContext.java
deleted file mode 100644
index ca11d491569..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/query/AdvancedQueryContext.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.query;
-
-/**
- *
- * Extension class to the basic ordering and pagination queries which use QueryContext
.
- * The AdvancedQueryContext is intended for use wherever advanced query functionality provided by the
- * KIE Query Service which provides advanced search capabilities that are based on Dashbuilder DataSets.
- *
- */
-public class AdvancedQueryContext extends QueryContext {
-
- private String orderByClause;
-
- public AdvancedQueryContext() {
- super();
- }
-
- public AdvancedQueryContext(QueryContext queryContext) {
- super(queryContext);
- }
-
- public AdvancedQueryContext(QueryContext queryContext, String orderByClause) {
- super(queryContext);
- this.orderByClause = orderByClause;
- }
-
- public AdvancedQueryContext(String orderByClause) {
- this.orderByClause = orderByClause;
- }
-
- /**
- * @return the SQL Order By clause
- */
- public String getOrderByClause() {
- return orderByClause;
- }
-
- /**
- * Set the ORDER BY clause for advanced query. For instance:
- *
- * SELECT * FROM PROCESSINSTANCELOG
- * ORDER BY PROCESSID ASC, PROCESSINSTANCEID DESC
- *
- * has orderByClause of "PROCESSID ASC, PROCESSINSTANCEID DESC"
- *
- * @param orderByClause the SQL Order By clause to set
- */
- public void setOrderByClause(String orderByClause) {
- this.orderByClause = orderByClause;
- }
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/query/QueryContext.java b/kie-api/src/main/java/org/kie/api/runtime/query/QueryContext.java
deleted file mode 100644
index 77968f77a3a..00000000000
--- a/kie-api/src/main/java/org/kie/api/runtime/query/QueryContext.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.runtime.query;
-
-import java.io.Serializable;
-
-import jakarta.xml.bind.annotation.XmlAccessType;
-import jakarta.xml.bind.annotation.XmlAccessorType;
-import jakarta.xml.bind.annotation.XmlElement;
-import jakarta.xml.bind.annotation.XmlSchemaType;
-import jakarta.xml.bind.annotation.XmlType;
-
-@XmlType(name="kieQueryContext")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class QueryContext implements Serializable {
-
- private static final long serialVersionUID = -3174717972613778773L;
-
- @XmlElement
- @XmlSchemaType(name="int")
- protected Integer offset = 0;
-
- @XmlElement
- @XmlSchemaType(name="int")
- protected Integer count = 10;
-
- @XmlElement
- @XmlSchemaType(name="int")
- protected String orderBy;
-
- @XmlElement
- @XmlSchemaType(name="boolean")
- protected Boolean ascending;
-
- public QueryContext() {
- // default JAXB constructor
- }
-
- public QueryContext(QueryContext queryContext) {
- this.offset = queryContext.offset;
- this.count = queryContext.count;
- this.orderBy = queryContext.orderBy;
- this.ascending = queryContext.ascending;
- }
-
- public QueryContext(Integer offset, Integer count) {
- this.offset = offset;
- this.count = count;
- }
-
- public QueryContext(String orderBy, boolean asc) {
- this.orderBy = orderBy;
- this.ascending = asc;
- }
-
- public QueryContext(Integer offset, Integer count, String orderBy, boolean asc) {
- this.offset = offset;
- this.count = count;
- this.orderBy = orderBy;
- this.ascending = asc;
- }
-
- public Integer getOffset() {
- return offset;
- }
-
- public void setOffset( Integer offset ) {
- this.offset = offset;
- }
-
- public Integer getCount() {
- return count;
- }
-
- public void setCount( Integer count ) {
- this.count = count;
- }
-
- public String getOrderBy() {
- return orderBy;
- }
-
- public void setOrderBy( String orderBy ) {
- this.orderBy = orderBy;
- }
-
- public Boolean isAscending() {
- return ascending;
- }
-
- public void setAscending( Boolean ascending ) {
- this.ascending = ascending;
- }
-
- public void clear() {
- this.ascending = null;
- this.count = 10;
- this.offset = 0;
- this.orderBy = null;
- }
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/TaskContext.java b/kie-api/src/main/java/org/kie/api/task/TaskContext.java
deleted file mode 100644
index 49be748e893..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/TaskContext.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task;
-
-import org.kie.api.task.model.Task;
-
-public interface TaskContext {
-
- /**
- * Returns currently configured UserGroupCallback.
- * @return returns user group callback
- */
- UserGroupCallback getUserGroupCallback();
-
- /**
- * Loads task (given as argument) variables - both input and output if exists.
- * In case variables are already set they are not reread from data store.
- * @param task task which should have variables (both input and output) set
- * @return returns task with variables set
- */
- Task loadTaskVariables(Task task);
-
- /**
- * Returns user id who performs the operation
- * @return user id of the caller
- */
- String getUserId();
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/TaskEvent.java b/kie-api/src/main/java/org/kie/api/task/TaskEvent.java
deleted file mode 100644
index 24659b88291..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/TaskEvent.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task;
-
-import java.util.Date;
-import java.util.Map;
-
-import org.kie.api.task.model.Task;
-
-public interface TaskEvent {
-
- Map getMetadata();
-
- Task getTask();
-
- TaskContext getTaskContext();
-
- Date getEventDate();
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/TaskLifeCycleEventListener.java b/kie-api/src/main/java/org/kie/api/task/TaskLifeCycleEventListener.java
deleted file mode 100644
index 65276688179..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/TaskLifeCycleEventListener.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task;
-
-import java.util.EventListener;
-import java.util.List;
-import java.util.Map;
-
-import org.kie.api.task.model.OrganizationalEntity;
-
-public interface TaskLifeCycleEventListener extends EventListener {
-
- public enum AssignmentType {
- POT_OWNER,
- EXCL_OWNER,
- ADMIN;
- }
-
- public void beforeTaskActivatedEvent(TaskEvent event);
- public void beforeTaskClaimedEvent(TaskEvent event);
- public void beforeTaskSkippedEvent(TaskEvent event);
- public void beforeTaskStartedEvent(TaskEvent event);
- public void beforeTaskStoppedEvent(TaskEvent event);
- public void beforeTaskCompletedEvent(TaskEvent event);
- public void beforeTaskFailedEvent(TaskEvent event);
- public void beforeTaskAddedEvent(TaskEvent event);
- public void beforeTaskExitedEvent(TaskEvent event);
- public void beforeTaskReleasedEvent(TaskEvent event);
- public void beforeTaskResumedEvent(TaskEvent event);
- public void beforeTaskSuspendedEvent(TaskEvent event);
- public void beforeTaskForwardedEvent(TaskEvent event);
- public void beforeTaskDelegatedEvent(TaskEvent event);
- public void beforeTaskNominatedEvent(TaskEvent event);
- public default void beforeTaskUpdatedEvent(TaskEvent event){};
- public default void beforeTaskReassignedEvent(TaskEvent event){};
- public default void beforeTaskNotificationEvent(TaskEvent event){};
- public default void beforeTaskInputVariableChangedEvent(TaskEvent event, Map variables){};
- public default void beforeTaskOutputVariableChangedEvent(TaskEvent event, Map variables){};
- public default void beforeTaskAssignmentsAddedEvent(TaskEvent event, AssignmentType type, List entities){};
- public default void beforeTaskAssignmentsRemovedEvent(TaskEvent event, AssignmentType type, List entities){};
-
- public void afterTaskActivatedEvent(TaskEvent event);
- public void afterTaskClaimedEvent(TaskEvent event);
- public void afterTaskSkippedEvent(TaskEvent event);
- public void afterTaskStartedEvent(TaskEvent event);
- public void afterTaskStoppedEvent(TaskEvent event);
- public void afterTaskCompletedEvent(TaskEvent event);
- public void afterTaskFailedEvent(TaskEvent event);
- public void afterTaskAddedEvent(TaskEvent event);
- public void afterTaskExitedEvent(TaskEvent event);
- public void afterTaskReleasedEvent(TaskEvent event);
- public void afterTaskResumedEvent(TaskEvent event);
- public void afterTaskSuspendedEvent(TaskEvent event);
- public void afterTaskForwardedEvent(TaskEvent event);
- public void afterTaskDelegatedEvent(TaskEvent event);
- public void afterTaskNominatedEvent(TaskEvent event);
- public default void afterTaskReassignedEvent(TaskEvent event){};
- public default void afterTaskUpdatedEvent(TaskEvent event){};
- public default void afterTaskNotificationEvent(TaskEvent event){};
- public default void afterTaskInputVariableChangedEvent(TaskEvent event, Map variables){};
- public default void afterTaskOutputVariableChangedEvent(TaskEvent event, Map variables){};
- public default void afterTaskAssignmentsAddedEvent(TaskEvent event, AssignmentType type, List entities){};
- public default void afterTaskAssignmentsRemovedEvent(TaskEvent event, AssignmentType type, List entities){};
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/TaskService.java b/kie-api/src/main/java/org/kie/api/task/TaskService.java
deleted file mode 100644
index 6a8670ddb42..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/TaskService.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.kie.api.runtime.CommandExecutor;
-import org.kie.api.task.model.Attachment;
-import org.kie.api.task.model.Comment;
-import org.kie.api.task.model.Content;
-import org.kie.api.task.model.OrganizationalEntity;
-import org.kie.api.task.model.Status;
-import org.kie.api.task.model.Task;
-import org.kie.api.task.model.TaskSummary;
-
-/**
- * The Task Service Entry Point serves as
- * facade of all the other services, providing a single entry point
- * to access to all the services
- */
-public interface TaskService extends CommandExecutor {
-
- void activate(long taskId, String userId);
-
- void claim(long taskId, String userId);
-
- void claimNextAvailable(String userId, String language);
-
- void complete(long taskId, String userId, Map data);
-
- void delegate(long taskId, String userId, String targetUserId);
-
- void exit(long taskId, String userId);
-
- void fail(long taskId, String userId, Map faultData);
-
- void forward(long taskId, String userId, String targetEntityId);
-
- Task getTaskByWorkItemId(long workItemId);
-
- Task getTaskById(long taskId);
-
- List getTasksAssignedAsBusinessAdministrator(String userId, String language);
-
- List getTasksAssignedAsPotentialOwner(String userId, String language);
-
- @Deprecated
- List getTasksAssignedAsPotentialOwner(String userId, List groupIds, String language, int firstResult, int maxResults);
-
- List getTasksAssignedAsPotentialOwnerByStatus(String userId, List status, String language);
-
- List getTasksOwned(String userId, String language);
-
- List getTasksOwnedByStatus(String userId, List status, String language);
-
- List getTasksByStatusByProcessInstanceId(String processInstanceId, List status, String language);
-
- List getTasksAssignedAsPotentialOwnerByProcessId(String userId, String processId);
-
- List getTasksByProcessInstanceId(String processInstanceId);
-
- long addTask(Task task, Map params);
-
- void release(long taskId, String userId);
-
- void resume(long taskId, String userId);
-
- void skip(long taskId, String userId);
-
- void start(long taskId, String userId);
-
- void stop(long taskId, String userId);
-
- void suspend(long taskId, String userId);
-
- void nominate(long taskId, String userId, List potentialOwners);
-
- Content getContentById(long contentId);
-
- Attachment getAttachmentById(long attachId);
-
- Map getTaskContent(long taskId);
-
- Long addComment(long taskId, Comment comment);
-
- Long addComment(long taskId, String addedByUserId, String commentText);
-
- void deleteComment(long taskId, long commentId);
-
- List getAllCommentsByTaskId(long taskId);
-
- Comment getCommentById(long commentId);
-
- void setExpirationDate(long taskId, Date date);
-}
\ No newline at end of file
diff --git a/kie-api/src/main/java/org/kie/api/task/UserGroupCallback.java b/kie-api/src/main/java/org/kie/api/task/UserGroupCallback.java
deleted file mode 100644
index f1443f35aef..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/UserGroupCallback.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task;
-
-import java.util.List;
-
-public interface UserGroupCallback {
- /**
- * Resolves existence of user id.
- * @param userId the user id assigned to the task
- * @return true if userId exists, false otherwise.
- */
- boolean existsUser(String userId);
-
- /**
- * Resolves existence of group id.
- * @param groupId the group id assigned to the task
- * @return true if groupId exists, false otherwise.
- */
- boolean existsGroup(String groupId);
-
- /**
- * Returns list of group ids for specified user id.
- * @param userId the user id assigned to the task
- * @return List of group ids.
- */
- List getGroupsForUser(String userId);
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/UserInfo.java b/kie-api/src/main/java/org/kie/api/task/UserInfo.java
deleted file mode 100644
index 955e1b603bb..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/UserInfo.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task;
-
-import java.util.Iterator;
-
-import org.kie.api.task.model.Group;
-import org.kie.api.task.model.OrganizationalEntity;
-
-public interface UserInfo {
-
- String getDisplayName(OrganizationalEntity entity);
-
- Iterator getMembersForGroup(Group group);
-
- boolean hasEmail(Group group);
-
- String getEmailForEntity(OrganizationalEntity entity);
-
- String getLanguageForEntity(OrganizationalEntity entity);
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/Attachment.java b/kie-api/src/main/java/org/kie/api/task/model/Attachment.java
deleted file mode 100644
index 31dfdeae917..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/Attachment.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-import java.io.Externalizable;
-import java.util.Date;
-
-public interface Attachment extends Externalizable {
-
- Long getId();
-
- String getName();
-
- String getContentType();
-
- Date getAttachedAt();
-
- User getAttachedBy();
-
- int getSize();
-
- long getAttachmentContentId();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/Comment.java b/kie-api/src/main/java/org/kie/api/task/model/Comment.java
deleted file mode 100644
index f95f806954c..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/Comment.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-import java.io.Externalizable;
-import java.util.Date;
-
-
-public interface Comment extends Externalizable {
-
- Long getId();
-
- String getText();
-
- Date getAddedAt();
-
- User getAddedBy();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/Content.java b/kie-api/src/main/java/org/kie/api/task/model/Content.java
deleted file mode 100644
index ce35d6365ed..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/Content.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-import java.io.Externalizable;
-
-public interface Content extends Externalizable {
-
- Long getId();
-
- byte[] getContent();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/Email.java b/kie-api/src/main/java/org/kie/api/task/model/Email.java
deleted file mode 100644
index 09ce3cd6c74..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/Email.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-
-public interface Email extends OrganizationalEntity {
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/Group.java b/kie-api/src/main/java/org/kie/api/task/model/Group.java
deleted file mode 100644
index 8bd2d1ada6c..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/Group.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-
-public interface Group extends OrganizationalEntity {
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/I18NText.java b/kie-api/src/main/java/org/kie/api/task/model/I18NText.java
deleted file mode 100644
index a383ae73045..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/I18NText.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-import java.io.Externalizable;
-
-public interface I18NText extends Externalizable {
-
- Long getId();
-
- String getLanguage();
-
- String getText();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/OrganizationalEntity.java b/kie-api/src/main/java/org/kie/api/task/model/OrganizationalEntity.java
deleted file mode 100644
index b39e0e4c761..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/OrganizationalEntity.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-import java.io.Externalizable;
-
-public interface OrganizationalEntity extends Externalizable {
-
- String getId();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/PeopleAssignments.java b/kie-api/src/main/java/org/kie/api/task/model/PeopleAssignments.java
deleted file mode 100644
index 4f1ee657e1a..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/PeopleAssignments.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-import java.io.Externalizable;
-import java.util.List;
-
-
-public interface PeopleAssignments extends Externalizable {
-
- User getTaskInitiator();
-
- List getPotentialOwners();
-
- List getBusinessAdministrators();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/QuickTaskSummary.java b/kie-api/src/main/java/org/kie/api/task/model/QuickTaskSummary.java
deleted file mode 100644
index b00915f4925..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/QuickTaskSummary.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-import java.io.Externalizable;
-import java.util.Date;
-
-public interface QuickTaskSummary extends Externalizable {
-
- Long getId();
-
- String getName();
-
- String getStatusId();
-
- Integer getPriority();
-
- String getActualOwnerId();
-
- String getCreatedById();
-
- Date getCreatedOn();
-
- Date getActivationTime();
-
- Date getExpirationTime();
-
- String getProcessId();
-
- Long getProcessInstanceId();
-
- String getDeploymentId();
-
- Long getParentId();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/Status.java b/kie-api/src/main/java/org/kie/api/task/model/Status.java
deleted file mode 100644
index 7dc485aa7d5..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/Status.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-import jakarta.xml.bind.annotation.XmlType;
-
-
-@XmlType
-public enum Status {
- Created, Ready, Reserved, InProgress, Suspended, Completed, Failed, Error, Exited, Obsolete
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/Task.java b/kie-api/src/main/java/org/kie/api/task/model/Task.java
deleted file mode 100644
index 58e9670f782..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/Task.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-import java.io.Externalizable;
-import java.util.List;
-
-public interface Task extends Externalizable {
-
- Long getId();
-
- Integer getPriority();
-
- List getNames();
-
- List getSubjects();
-
- List getDescriptions();
-
- String getName();
-
- String getSubject();
-
- String getDescription();
-
- PeopleAssignments getPeopleAssignments();
-
- TaskData getTaskData();
-
- String getTaskType();
-
- Boolean isArchived();
-
- Integer getVersion();
-
- String getFormName();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/TaskData.java b/kie-api/src/main/java/org/kie/api/task/model/TaskData.java
deleted file mode 100644
index 3b229afa294..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/TaskData.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-import java.io.Externalizable;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-public interface TaskData extends Externalizable {
-
- Status getStatus();
-
- Status getPreviousStatus();
-
- User getActualOwner();
-
- User getCreatedBy();
-
- Date getCreatedOn();
-
- Date getActivationTime();
-
- Date getExpirationTime();
-
- boolean isSkipable();
-
- long getWorkItemId();
-
- long getProcessInstanceId();
-
- String getProcessId();
-
- String getDeploymentId();
-
- long getProcessSessionId();
-
- String getDocumentType();
-
- long getDocumentContentId();
-
- String getOutputType();
-
- Long getOutputContentId();
-
- String getFaultName();
-
- String getFaultType();
-
- long getFaultContentId();
-
- List getComments();
-
- List getAttachments();
-
- long getParentId();
-
- Map getTaskInputVariables();
-
- Map getTaskOutputVariables();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/TaskSummary.java b/kie-api/src/main/java/org/kie/api/task/model/TaskSummary.java
deleted file mode 100644
index 219c44f4858..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/TaskSummary.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-import java.util.List;
-
-public interface TaskSummary extends QuickTaskSummary {
-
- String getSubject();
-
- String getDescription();
-
- Status getStatus();
-
- Boolean isSkipable();
-
- User getActualOwner();
-
- User getCreatedBy();
-
- Long getProcessSessionId();
-
- @Deprecated // remove in 7.0 since this field is never filled
- List getPotentialOwners();
-
- Boolean isQuickTaskSummary();
-
- String getCorrelationKey();
-
- Integer getProcessType();
-
-}
diff --git a/kie-api/src/main/java/org/kie/api/task/model/User.java b/kie-api/src/main/java/org/kie/api/task/model/User.java
deleted file mode 100644
index 5082abb1d50..00000000000
--- a/kie-api/src/main/java/org/kie/api/task/model/User.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.api.task.model;
-
-public interface User extends OrganizationalEntity {
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/process/ProcessVariableIndexer.java b/kie-internal/src/main/java/org/kie/internal/process/ProcessVariableIndexer.java
deleted file mode 100644
index 2c18e9c5080..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/process/ProcessVariableIndexer.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.process;
-
-import org.kie.api.runtime.manager.audit.VariableInstanceLog;
-import org.kie.internal.utils.VariableIndexer;
-
-
-/**
- * Dedicated type for custom implementations of VariableIndexer for process variables
- *
- */
-public interface ProcessVariableIndexer extends VariableIndexer {
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/query/ExtendedParametrizedQueryBuilder.java b/kie-internal/src/main/java/org/kie/internal/query/ExtendedParametrizedQueryBuilder.java
deleted file mode 100644
index 83a7fd75a63..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/query/ExtendedParametrizedQueryBuilder.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.query;
-
-/**
- * This is the base interface for all {@link ParametrizedQueryBuilder} implementations.
- *
- * It includes the basic query functions.
- *
- * @param The type of {@link ParametrizedQueryBuilder} instance being implemented. This type
- * is here to facilitate the building of a fluent interface.
- * @param The type of the result list being returned by the generated {@link ParametrizedQuery}
- */
-public interface ExtendedParametrizedQueryBuilder extends ParametrizedQueryBuilder {
-
- /**
- * Query criteria which are added to the query after this method
- * are "AND" or "intersection" criteria. In other words, the query
- * will only return results which match all of the criteria added
- * (as opposed to returning results that match any of the
- * criteria added).
- * @return the current query builder instance
- */
- public T newGroup();
-
- /**
- * Query criteria which are added to the query after this method
- * are "AND" or "intersection" criteria. In other words, the query
- * will only return results which match all of the criteria added
- * (as opposed to returning results that match any of the
- * criteria added).
- * @return the current query builder instance
- */
- public T endGroup();
-
- /**
- * Create the {@link ParametrizedQuery} instance that can be used
- * to retrieve the results, a {@link List<TaskSummary>} instance.
- *
- * Further modifications to the {@link TaskQueryBuilder} instance
- * will not affect the query criteria used in the {@link ParametrizedQuery}
- * produced by this method.
- * @return The results of the query
- */
- public ParametrizedQuery build();
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/query/InternalQueryService.java b/kie-internal/src/main/java/org/kie/internal/query/InternalQueryService.java
deleted file mode 100644
index 7c74796c8d0..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/query/InternalQueryService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.query;
-
-import java.util.List;
-
-public interface InternalQueryService {
-
- // The query methods should not be available in any public API's
- public List query(Object queryWhere, Class queryType, Class resultType);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/query/ParametrizedQuery.java b/kie-internal/src/main/java/org/kie/internal/query/ParametrizedQuery.java
deleted file mode 100644
index dc382b53beb..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/query/ParametrizedQuery.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.query;
-
-import java.util.List;
-
-/**
- * Instances of this class can be built by various {@link ParametrizedQueryBuilder} implemetnations,
- * including those in the jbpm-audit or jbpm-human-task-core modules.
- *
- * {@link ParametrizedQueryBuilder} implementations are responsible for allowing a user
- * to dynamically (at compile-time) specify the criteria to be used in querying various
- * data sources.
- *
- * The result of the {@link ParametrizedQueryBuilder} is an instance of this class, which contains
- * the criteria specified in the {@link ParametrizedQueryBuilder} instance. When the
- * {@link ParametrizedQuery#getResultList()} method is called, the specified query will
- * be executed, returning a (possibly empty) list of the data that fulfills the query criteria.
- *
- * @param The type being queried and of the (results) list being returned.
- */
-public interface ParametrizedQuery {
-
- /**
- * Execute the query and return the list of entities found by the query.
- * @return The query result
- */
- List getResultList();
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/query/ParametrizedQueryBuilder.java b/kie-internal/src/main/java/org/kie/internal/query/ParametrizedQueryBuilder.java
deleted file mode 100644
index 285e491d01f..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/query/ParametrizedQueryBuilder.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.query;
-
-
-/**
- * This is the base interface for all {@link ParametrizedQueryBuilder} implementations.
- *
- * It includes the basic query functions.
- *
- * @param The type of {@link ParametrizedQueryBuilder} instance being implemented. This type
- * is here to facilitate the building of a fluent interface.
- */
-public interface ParametrizedQueryBuilder {
-
- /**
- * Synonym for {@link #or()}
- *
- * Query criteria which are added to the query after this method
- * are "OR" or "union" criteria.
- *
- * Since this is based on SQL, please remember that intersection operands
- * have precedence over union operands.
- *
- * In other words,
- * A or B and C == A or (B and C)
- * A and B or C == (A and B) or C
- *
- *
- * This is the default mode for all query builders.
- * @return the current query builder instance
- */
- public T union();
-
-
- /**
- * Synonym for {@link #union()}
- *
- * Query criteria which are added to the query after this method
- * are "OR" or "union" criteria.
- *
- * Since this is based on SQL, please remember that intersection operands
- * have precedence over union operands.
- *
- * In other words,
- * A or B and C == A or (B and C)
- * A and B or C == (A and B) or C
- *
- *
- * This is the default mode for all query builders.
- * @return the current query builder instance
- */
- public T or();
-
- /**
- * Synonym for {@link #and()}
- *
- * Query criteria which are added to the query after this method
- * are "AND" or "intersection" criteria.
- *
- * Since this is based on SQL, please remember that intersection operands
- * have precedence over union operands.
- *
- * In other words,
- * A or B and C == A or (B and C)
- * A and B or C == (A and B) or C
- *
- *
- * @return the current query builder instance
- */
- public T intersect();
-
- /**
- * Synonym for {@link #intersect()}
- *
- * Query criteria which are added to the query after this method
- * are "AND" or "intersection" criteria.
- *
- * Since this is based on SQL, please remember that intersection operands
- * have precedence over union operands.
- *
- * In other words,
- * A or B and C == A or (B and C)
- * A and B or C == (A and B) or C
- *
- *
- * @return the current query builder instance
- */
- public T and();
-
- /**
- * Query criteria which are added to the query after this method
- * are regular expression (a.k.a "regex") criteria. In other words,
- * the query will return results which match the regular expressions
- * specified.
- *
- * Only String criteria may be added after using this method. In order
- * to go back to adding normal or non-regex criteria, use the {@link #equals()}
- * method.
- *
- * The following characters may be used:
- * - .
- * - This character matches any single character.
- *
- * - *
- * - This character matches zero or more characters.
- *
- *
- *
- * @deprecated will be deleted in 7.0
- * @see {@code #regex()}
- * @return the current query builder instance
- */
- @Deprecated
- public T like();
-
- /**
- * Query criteria which are added to the query after this method
- * are regular expression (a.k.a "regex") criteria. In other words,
- * the query will return results which match the regular expressions
- * specified.
- *
- * Only String criteria may be added after using this method. In order
- * to go back to adding normal or non-regex criteria, use the {@link #equals()}
- * method.
- *
- * The following characters may be used:
- * - .
- * - This character matches any single character.
- *
- * - *
- * - This character matches zero or more characters.
- *
- *
- *
- * @see {@code #like()}
- * @return the current query builder instance
- */
- public T regex();
-
- /**
- * Results retrieved using query criteria added after this method
- * is used, must exactly match the criteria given.
- *
- * If the {@link #like()} method has been used, using this method
- * will ensure that criteria added after this method are literally
- * interpreted, and not seen as regular expressions.
- *
- * This is the default mode for all query builders.
- * @return the current query builder instance
- */
- public T equals();
-
- /**
- * Clear all parameters and meta-criteria
- * @return the current query builder instance
- */
- public T clear();
-
- /**
- * Limit the number of results returned by the query to the specified maximum.
- * @param maxResults The maximum number of results to return
- *
- * @return the current query builder instance
- */
- public T maxResults(int maxResults);
-
- /**
- * Limit the results returned by excluding the specified number of results (the offset),
- * from the start of the result list.
- *
- * Which results are excluded (offset) is dependent on the order of the results returned.
- * See the orderBy(enum) methods as well as {@link #ascending()} and {@link #descending()}.
- * @param offset The number of elements skipped before the first element in the result
- * @return the current query builder instance
- */
- public T offset(int offset);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/query/ParametrizedUpdate.java b/kie-internal/src/main/java/org/kie/internal/query/ParametrizedUpdate.java
deleted file mode 100644
index 88c5d2a1dc1..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/query/ParametrizedUpdate.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.query;
-
-public interface ParametrizedUpdate {
-
- int execute();
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/query/ProcessInstanceIdQueryBuilder.java b/kie-internal/src/main/java/org/kie/internal/query/ProcessInstanceIdQueryBuilder.java
deleted file mode 100644
index 80a6a11e14d..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/query/ProcessInstanceIdQueryBuilder.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.query;
-
-
-
-
-
-/**
- * This is the base interface for all {@link ParametrizedQueryBuilder} implementations.
- *
- * It includes the basic query functions.
- *
- * @param The type of {@link ParametrizedQueryBuilder} instance being implemented. This type
- * is here to facilitate the building of a fluent interface.
- * @param The type of the result list being returned by the generated {@link ParametrizedQuery}
- */
-public interface ProcessInstanceIdQueryBuilder extends ExtendedParametrizedQueryBuilder {
-
- /**
- * Specify one or more process instance ids as criteria in the query
- * @param processInstanceId one or more a process instance ids
- * @return The current query builder instance
- */
- public T processInstanceId(long... processInstanceId);
-
- /**
- * Specify an inclusive range of process instance ids to use as a criteria
- *
- * If the lower or upper end of the range is given as null,
- * then an open-ended range using the non-null range end is used
- * as the criteria
- * @param processInstanceIdMin the minimal (lower) date to use in the range
- * @param processInstanceIdMax the max (upper) date to use in the range
- * @return The current query builder instance
- */
- public T processInstanceIdRange(String processInstanceIdMin, String processInstanceIdMax);
-
-}
\ No newline at end of file
diff --git a/kie-internal/src/main/java/org/kie/internal/query/QueryContext.java b/kie-internal/src/main/java/org/kie/internal/query/QueryContext.java
deleted file mode 100644
index 125af0455ab..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/query/QueryContext.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.query;
-
-import jakarta.xml.bind.annotation.XmlAccessType;
-import jakarta.xml.bind.annotation.XmlAccessorType;
-import jakarta.xml.bind.annotation.XmlType;
-
-@XmlType
-@XmlAccessorType(XmlAccessType.FIELD)
-public class QueryContext extends org.kie.api.runtime.query.QueryContext {
-
- private static final long serialVersionUID = -3174717972613778773L;
-
- public QueryContext() {
- super();
- }
-
- public QueryContext(Integer offset, Integer count, String orderBy, boolean asc) {
- super(offset, count, orderBy, asc);
- }
-
- public QueryContext(Integer offset, Integer count) {
- super(offset, count);
- }
-
- public QueryContext(org.kie.api.runtime.query.QueryContext queryContext) {
- super(queryContext);
- }
-
- public QueryContext(String orderBy, boolean asc) {
- super(orderBy, asc);
- }
-
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/query/QueryFilter.java b/kie-internal/src/main/java/org/kie/internal/query/QueryFilter.java
deleted file mode 100644
index 5967f783934..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/query/QueryFilter.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.query;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import jakarta.xml.bind.annotation.XmlElement;
-import jakarta.xml.bind.annotation.XmlSchemaType;
-import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.kie.internal.jaxb.StringKeyObjectValueMapXmlAdapter;
-
-public class QueryFilter extends QueryContext {
-
- private static final long serialVersionUID = 2830463093685095275L;
-
- @XmlElement
- @XmlSchemaType(name="string")
- private String language ="";
-
- @XmlElement
- @XmlSchemaType(name="string")
- private String filterParams = "";
-
- @XmlElement
- @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
- private Map params = new HashMap<>();
-
- public QueryFilter() {
- // default constructor for JAXB
- }
-
- public QueryFilter(QueryFilter orig) {
- super(orig);
- this.language = orig.language;
- this.filterParams = orig.filterParams;
- params.putAll(params);
- }
-
- public QueryFilter(int offset, int count) {
- super(offset, count);
- }
-
- public QueryFilter(int offset, int count, String orderBy, boolean ascending) {
- super(offset, count, orderBy, ascending);
- }
-
- public QueryFilter(int offset, int count, String filterParams, String language, String orderBy) {
- super(offset, count);
- this.filterParams = filterParams;
- this.language = language;
- this.orderBy = orderBy;
- }
-
- public QueryFilter( String filterParams, Map params, String orderBy, boolean isAscending) {
- this.filterParams = filterParams;
- this.params = params;
- this.orderBy = orderBy;
- this.ascending = isAscending;
- }
-
- public QueryFilter( String filterParams, Map params, String orderBy, int offset, int count ) {
- super(offset, count);
- this.filterParams = filterParams;
- this.params = params;
- this.orderBy = orderBy;
- }
-
- public String getLanguage() {
- return language;
- }
-
- public void setLanguage( String language ) {
- this.language = language;
- }
-
- public String getFilterParams() {
- return filterParams;
- }
-
- public void setFilterParams( String filterParams ) {
- this.filterParams = filterParams;
- }
-
- public Map getParams() {
- return params;
- }
-
- public void setParams( Map params ) {
- this.params = params;
- }
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/query/QueryParameterIdentifiers.java b/kie-internal/src/main/java/org/kie/internal/query/QueryParameterIdentifiers.java
deleted file mode 100644
index 538d4bc1183..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/query/QueryParameterIdentifiers.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.query;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-public interface QueryParameterIdentifiers {
-
- // meta identifiers
-
- public final static String FIRST_RESULT = "firstResult";
- public final static String MAX_RESULTS = "maxResults";
- public final static String FLUSH_MODE = "flushMode";
-
- public static final String PAGE_NUMBER = "page number";
- public static final String PAGE_SIZE = "page size";
-
- public static final String FILTER = "filter";
- public static final String ORDER_BY = "orderby";
- public static final String ORDER_TYPE = "orderType";
- public static final String ASCENDING_VALUE = "ASC";
- public static final String DESCENDING_VALUE = "DESC";
-
- /**
- * *All* Query parameter identifiers MUST have the following format:
- *
- * - If a query can be executed on multiple values of the parameter ( for example, process instance id),
- * => Then the constant name should end with "_LIST".
- *
- * - If a query can only contain one value of the parameter (for example, language for task queries),
- * => Then the constant name should only be the parameter name.
- */
-
- // general identifiers
-
- static AtomicInteger idGen = new AtomicInteger(1);
-
- // general (multiple entities)
- public static final String PROCESS_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String PROCESS_INSTANCE_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String PROCESS_SESSION_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String WORK_ITEM_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String DEPLOYMENT_ID_LIST = String.valueOf(idGen.getAndIncrement());
-
- public static final String START_DATE_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String END_DATE_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String DATE_LIST = String.valueOf(idGen.getAndIncrement());
-
- public static final String ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TYPE_LIST = String.valueOf(idGen.getAndIncrement());
-
- // audit identifiers
-
- // - (process instance log)
- public static final String DURATION_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String IDENTITY_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String PROCESS_NAME_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String PROCESS_VERSION_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String PROCESS_INSTANCE_STATUS_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String OUTCOME_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String CORRELATION_KEY_LIST = String.valueOf(idGen.getAndIncrement());
-
- // - (node instance log)
- public static final String NODE_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String NODE_INSTANCE_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String NODE_NAME_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String PROCESS_INSTANCE_PARENT_ID_LIST = String.valueOf(idGen.getAndIncrement());
-
- // - (variable instance log)
- public static final String VARIABLE_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String VARIABLE_INSTANCE_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String VAR_VALUE_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String VALUE_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String OLD_VALUE_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String EXTERNAL_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String LAST_VARIABLE_LIST = String.valueOf(idGen.getAndIncrement());
-
- public static final String VAR_VAL_SEPARATOR = ":";
-
- // task identifiers
- public static final String TASK_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String BUSINESS_ADMIN_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String POTENTIAL_OWNER_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String STAKEHOLDER_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String ACTUAL_OWNER_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String EXCLUDED_OWNER_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String CREATED_BY_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_STATUS_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String LANGUAGE = String.valueOf(idGen.getAndIncrement());
- public static final String CREATED_ON_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_NAME_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_PARENT_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_ACTIVATION_TIME_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_DESCRIPTION_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_PRIORITY_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_PROCESS_SESSION_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_DUE_DATE_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String ARCHIVED = String.valueOf(idGen.getAndIncrement());
- public static final String EXPIRATION_TIME_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_FORM_NAME_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String SKIPPABLE = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_SUBJECT_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String SUB_TASKS_STRATEGY = String.valueOf(idGen.getAndIncrement());
-
- public static final String TASK_USER_ROLES_LIMIT_LIST = String.valueOf(idGen.getAndIncrement());
-
- // task audit
- public static final String TASK_EVENT_DATE_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String USER_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_EVENT_MESSAGE_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_EVENT_LOG_TIME_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String MESSAGE_LIST = String.valueOf(idGen.getAndIncrement());
-
- // executor identifiers
- public static final String EXECUTOR_STATUS_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String EXECUTOR_TIME_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String STACK_TRACE_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String COMMAND_NAME_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String EXECUTOR_EXECUTIONS_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String EXECUTOR_KEY_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String EXECUTOR_OWNER_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String EXECUTOR_RETRIES_LIST = String.valueOf(idGen.getAndIncrement());
-
- // task variable
- public static final String TASK_VARIABLE_NAME_ID_LIST = String.valueOf(idGen.getAndIncrement());
- public static final String TASK_VARIABLE_VALUE_ID_LIST = String.valueOf(idGen.getAndIncrement());
- // this is a weird one, becaues it's not used in the query builder API, but internally for a
- // pseudo-normal (but technically group) criteria
- public static final String TASK_VARIABLE_COMBINED_ID = "-" + String.valueOf(idGen.getAndIncrement());
- public static final String TASK_VARIABLE_DATE_ID_LIST = String.valueOf(idGen.getAndIncrement());
-
- public static final String CASE_FILE_DATA_LOG_LASTMODIFIED = String.valueOf(idGen.getAndIncrement());
-
- public static final String SUBQUERY_STATUS = String.valueOf(idGen.getAndIncrement());
- public static final String SUBQUERY_DEPLOYMENT = String.valueOf(idGen.getAndIncrement());
- public static final String SUBQUERY_CASE = String.valueOf(idGen.getAndIncrement());
-
-}
\ No newline at end of file
diff --git a/kie-internal/src/main/java/org/kie/internal/query/data/QueryData.java b/kie-internal/src/main/java/org/kie/internal/query/data/QueryData.java
deleted file mode 100644
index 6460e835435..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/query/data/QueryData.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.query.data;
-
-import jakarta.xml.bind.annotation.XmlAccessType;
-import jakarta.xml.bind.annotation.XmlAccessorType;
-import jakarta.xml.bind.annotation.XmlElement;
-import jakarta.xml.bind.annotation.XmlType;
-
-import org.kie.internal.query.QueryContext;
-
-@XmlType
-@XmlAccessorType(XmlAccessType.FIELD)
-public class QueryData extends QueryParameters {
-
- @XmlElement
- private QueryContext queryContext = new QueryContext();
-
- public QueryData() {
- // JAXB constructor
- }
-
- public QueryData(QueryData queryData) {
- super(queryData);
- this.queryContext = new QueryContext(queryData.getQueryContext());
- }
-
- public QueryContext getQueryContext() {
- return queryContext;
- }
-
- public void setQueryContext( QueryContext queryContext ) {
- this.queryContext = queryContext;
- }
-
- public void clear() {
- super.clear();
- this.queryContext.clear();
- }
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/query/data/QueryParameters.java b/kie-internal/src/main/java/org/kie/internal/query/data/QueryParameters.java
deleted file mode 100644
index b6d2272d679..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/query/data/QueryParameters.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.query.data;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import jakarta.xml.bind.annotation.XmlAccessType;
-import jakarta.xml.bind.annotation.XmlAccessorType;
-import jakarta.xml.bind.annotation.XmlElement;
-import jakarta.xml.bind.annotation.XmlRootElement;
-import jakarta.xml.bind.annotation.XmlTransient;
-import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.kie.internal.jaxb.StringKeyObjectValueMapXmlAdapter;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-@Deprecated // see org.jbpm.query.jpa.data.QueryWhere and org.jbpm.query.jpa.data.QueryCriteria
-public class QueryParameters {
-
- @XmlTransient
- private boolean union = true;
-
- @XmlTransient
- private boolean like = false;
-
- @XmlTransient
- private boolean range = false;
-
- @XmlElement
- @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
- private Map> unionParameters = null;
-
- @XmlElement
- @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
- private Map> intersectParameters = null;
-
- @XmlElement
- @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
- private Map> unionRegexParameters = null;
-
- @XmlElement
- @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
- private Map> intersectRegexParameters = null;
-
- @XmlElement
- @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
- private Map> unionRangeParameters = null;
-
- @XmlElement
- @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
- private Map> intersectRangeParameters = null;
-
- public QueryParameters() {
- // JAXB constructor
- }
-
- // getters
-
- public Map> getUnionParameters() {
- if( unionParameters == null ) {
- unionParameters = new HashMap<>();
- }
- return unionParameters;
- }
-
- public boolean unionParametersAreEmpty() {
- return unionParameters == null ? true : unionParameters.isEmpty();
-
- }
-
- public Map> getIntersectParameters() {
- if( intersectParameters == null ) {
- intersectParameters = new HashMap<>();
- }
- return intersectParameters;
- }
-
- public boolean intersectParametersAreEmpty() {
- return intersectParameters == null ? true : intersectParameters.isEmpty();
- }
-
- public Map> getUnionRegexParameters() {
- if( unionRegexParameters == null ) {
- unionRegexParameters = new HashMap<>();
- }
- return unionRegexParameters;
- }
-
- public boolean unionRegexParametersAreEmpty() {
- return unionRegexParameters == null ? true : unionRegexParameters.isEmpty();
- }
-
- public Map> getIntersectRegexParameters() {
- if( intersectRegexParameters == null ) {
- intersectRegexParameters = new HashMap<>();
- }
- return intersectRegexParameters;
- }
-
- public boolean intersectRegexParametersAreEmpty() {
- return intersectRegexParameters == null ? true : intersectRegexParameters.isEmpty();
- }
-
- public Map> getUnionRangeParameters() {
- if( unionRangeParameters == null ) {
- unionRangeParameters = new HashMap<>();
- }
- return unionRangeParameters;
- }
-
- public boolean unionRangeParametersAreEmpty() {
- return unionRangeParameters == null ? true : unionRangeParameters.isEmpty();
- }
-
- public Map> getIntersectRangeParameters() {
- if( intersectRangeParameters == null ) {
- intersectRangeParameters = new HashMap<>();
- }
- return intersectRangeParameters;
- }
-
- public boolean intersectRangeParametersAreEmpty() {
- return intersectRangeParameters == null ? true : intersectRangeParameters.isEmpty();
- }
-
- // other logic
-
- public void addAppropriateParam( String listId, T... param ) {
- if( param.length == 0 ) {
- return;
- }
- List listParams = getAppropriateParamList(listId, param[0], param.length);
- listParams.addAll(Arrays.asList(param));
- }
-
- public void addRangeParameter( String listId, T param, boolean start ) {
- this.range = true;
- List listParams = getAppropriateParamList(listId, param, 2);
- int index = start ? 0 : 1;
- listParams.set(index, param);
- this.range = false;
- }
-
- @SuppressWarnings("unchecked")
- public List getAppropriateParamList(String listId, T param, int size) {
- List listParams = null;
- if( like ) {
- if( ! (param instanceof String) ) {
- throw new IllegalArgumentException("Only String parameters may be used in regular expressions.");
- }
- List stringListParams = null;
- if( union ) {
- listParams = (List) getUnionRegexParameters().get(listId);
- if( listParams == null ) {
- stringListParams = new ArrayList<>(size);
- getUnionRegexParameters().put(listId, stringListParams);
- }
- } else {
- listParams = (List) getIntersectParameters().get(listId);
- if( listParams == null ) {
- stringListParams = new ArrayList<>(size);
- getIntersectRegexParameters().put(listId, stringListParams);
- }
- }
- if( listParams == null ) {
- return (List) stringListParams;
- } else {
- return listParams;
- }
- } else if( range ) {
- if( union ) {
- listParams = (List) getUnionRangeParameters().get(listId);
- if( listParams == null ) {
- listParams = Arrays.asList(null, null);
- getUnionRangeParameters().put(listId, listParams);
- }
- } else {
- listParams = (List) getIntersectRangeParameters().get(listId);
- if( listParams == null ) {
- listParams = Arrays.asList(null, null);
- getIntersectRangeParameters().put(listId, listParams);
- }
- }
- } else {
- if( union ) {
- listParams = (List) getUnionParameters().get(listId);
- if( listParams == null ) {
- listParams = new ArrayList<>(size);
- getUnionParameters().put(listId, listParams);
- }
- } else {
- listParams = (List) getIntersectParameters().get(listId);
- if( listParams == null ) {
- listParams = new ArrayList<>(size);
- getIntersectParameters().put(listId, listParams);
- }
- }
- }
- return listParams;
- }
-
- public void setToUnion() {
- this.union = true;
- }
-
- public void setToIntersection() {
- this.union = false;
- }
-
- public boolean isUnion() {
- return this.union;
- }
-
- public void setToLike() {
- this.like = true;
- }
-
- public boolean isLike() {
- return this.like;
- }
-
- public void setToEquals() {
- this.like = false;
- }
-
- public void setToRange() {
- this.range = true;
- }
-
- public void setToPrecise() {
- this.range = false;
- }
-
- public boolean isRange() {
- return this.range;
- }
-
- public void clear() {
- union = true;
- like = false;
- range = false;
-
- Map [] maps = {
- unionParameters,
- intersectParameters,
- unionRegexParameters,
- intersectRegexParameters,
- unionRangeParameters,
- intersectRangeParameters
- };
- for( Map paramMap : maps ) {
- if( paramMap != null ) {
- paramMap.clear();
- }
- }
- }
-
- public QueryParameters(QueryParameters queryParameters) {
- this.union = queryParameters.union;
- this.like = queryParameters.like;
- this.range = queryParameters.range;
- this.intersectParameters = queryParameters.intersectParameters == null ? null :
- new HashMap<>(queryParameters.intersectParameters);
- this.unionParameters = queryParameters.unionParameters == null ? null :
- new HashMap<>(queryParameters.unionParameters);
- this.intersectRangeParameters = queryParameters.intersectRangeParameters == null ? null :
- new HashMap<>(queryParameters.intersectRangeParameters);
- this.unionRangeParameters = queryParameters.unionRangeParameters == null ? null :
- new HashMap<>(queryParameters.unionRangeParameters);
- this.intersectRegexParameters = queryParameters.intersectRegexParameters == null ? null :
- new HashMap<>(queryParameters.intersectRegexParameters);
- this.unionRegexParameters = queryParameters.unionRegexParameters == null ? null :
- new HashMap<>(queryParameters.unionRegexParameters);
- }
-
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionError.java b/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionError.java
deleted file mode 100644
index b2367838a4c..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionError.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.error;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.UUID;
-
-public class ExecutionError implements Serializable {
-
- private static final long serialVersionUID = 740619427108653407L;
-
- protected String errorId;
-
- protected String type;
- protected String deploymentId;
- protected String processInstanceId;
- protected String processId;
- protected Long activityId;
- protected String activityName;
- protected Long jobId;
-
- protected String errorMessage;
- protected String error;
-
- protected Short acknowledged = 0;
- protected String acknowledgedBy;
- protected Date acknowledgedAt;
-
- protected Date errorDate;
-
- protected Long initActivityId;
-
- public ExecutionError() {
- errorId = UUID.randomUUID().toString();
- }
-
- public ExecutionError(String errorId, String type, String deploymentId, String processInstanceId, String processId, Long activityId, String activityName, Long jobId, String errorMessage,
- short acknowledged, String acknowledgedBy, Date acknowledgedAt,
- Date errorDate) {
- this(errorId, type, deploymentId, processInstanceId, processId, activityId, activityName, jobId, errorMessage, null, acknowledged, acknowledgedBy, acknowledgedAt, errorDate);
- }
-
- public ExecutionError(String errorId, String type, String deploymentId, String processInstanceId, String processId, Long activityId, String activityName, Long jobId, String errorMessage, String error,
- short acknowledged, String acknowledgedBy, Date acknowledgedAt,
- Date errorDate) {
- this.errorId = errorId;
- this.type = type;
- this.deploymentId = deploymentId;
- this.processInstanceId = processInstanceId;
- this.processId = processId;
- this.activityId = activityId;
- this.activityName = activityName;
- this.jobId = jobId;
- this.errorMessage = errorMessage;
- this.error = error;
- this.acknowledged = acknowledged;
- this.acknowledgedBy = acknowledgedBy;
- this.acknowledgedAt = acknowledgedAt;
- this.errorDate = errorDate;
- }
-
- public String getErrorId() {
- return errorId;
- }
-
- public void setErrorId(String errorId) {
- this.errorId = errorId;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getDeploymentId() {
- return deploymentId;
- }
-
- public void setDeploymentId(String deploymentId) {
- this.deploymentId = deploymentId;
- }
-
- public String getProcessInstanceId() {
- return processInstanceId;
- }
-
- public void setProcessInstanceId(String processInstanceId) {
- this.processInstanceId = processInstanceId;
- }
-
- public Long getActivityId() {
- return activityId;
- }
-
- public void setActivityId(Long activityId) {
- this.activityId = activityId;
- }
-
- public String getErrorMessage() {
- return errorMessage;
- }
-
- public void setErrorMessage(String errorMessage) {
- this.errorMessage = errorMessage;
- }
-
- public String getError() {
- return error;
- }
-
- public void setError(String error) {
- this.error = error;
- }
-
- protected Short getAcknowledged() {
- return acknowledged;
- }
-
- protected void setAcknowledged(Short acknowledged) {
- this.acknowledged = acknowledged;
- }
-
- public boolean isAcknowledged() {
- if (acknowledged == null) {
- return false;
- }
- return (acknowledged == 1) ? Boolean.TRUE : Boolean.FALSE;
- }
-
- public void setAcknowledged(boolean acknowledged) {
- setAcknowledged(acknowledged ? Short.valueOf("1") : Short.valueOf("0"));
- }
-
- public String getAcknowledgedBy() {
- return acknowledgedBy;
- }
-
- public void setAcknowledgedBy(String acknowledgedBy) {
- this.acknowledgedBy = acknowledgedBy;
- }
-
- public Date getAcknowledgedAt() {
- return acknowledgedAt;
- }
-
- public void setAcknowledgedAt(Date acknowledgedAt) {
- this.acknowledgedAt = acknowledgedAt;
- }
-
- public String getProcessId() {
- return processId;
- }
-
- public void setProcessId(String processId) {
- this.processId = processId;
- }
-
- public String getActivityName() {
- return activityName;
- }
-
- public void setActivityName(String activityName) {
- this.activityName = activityName;
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public Date getErrorDate() {
- return errorDate;
- }
-
- public void setErrorDate(Date errorDate) {
- this.errorDate = errorDate;
- }
-
- public Long getJobId() {
- return jobId;
- }
-
- public void setJobId(Long jobId) {
- this.jobId = jobId;
- }
-
- public Long getInitActivityId() {
- return initActivityId;
- }
-
-
- public void setInitActivityId(Long initActivityId) {
- this.initActivityId = initActivityId;
- }
-
- @Override
- public String toString() {
- return "ExecutionError [type=" + type + ", deploymentId=" + deploymentId + ", processInstanceId=" + processInstanceId +
- ", processId=" + processId + ", activityId=" + activityId + ", activityName=" + activityName +
- ", errorMessage=" + errorMessage + ", acknowledged=" + acknowledged + ", acknowledgedBy=" + acknowledgedBy +
- ", acknowledgedAt=" + acknowledgedAt + "]";
- }
-
-
- public static class Builder {
- private ExecutionError error = new ExecutionError();
-
- public ExecutionError build() {
- return error;
- }
-
- public Builder type(String type) {
- error.setType(type);
- return this;
- }
-
- public Builder deploymentId(String deploymentId) {
- error.setDeploymentId(deploymentId);
- return this;
- }
-
- public Builder message(String message) {
- error.setErrorMessage(message);
- return this;
- }
-
- public Builder error(String errorStr) {
- error.setError(errorStr);
- return this;
- }
-
- public Builder acknowledgedBy(String user) {
- error.setAcknowledgedBy(user);
- return this;
- }
-
- public Builder processInstanceId(String piId) {
- error.setProcessInstanceId(piId);
- return this;
- }
-
- public Builder activityId(Long activityId) {
- error.setActivityId(activityId);
- return this;
- }
-
- public Builder acknowledged(boolean acknowledged) {
- error.setAcknowledged(acknowledged ? Short.valueOf("1") : Short.valueOf("0"));
- return this;
- }
-
- public Builder acknowledgedAt(Date acknowledgedAt) {
- error.setAcknowledgedAt(acknowledgedAt);
- return this;
- }
-
- public Builder processId(String processId) {
- error.setProcessId(processId);
- return this;
- }
-
- public Builder activityName(String activityName) {
- error.setActivityName(activityName);
- return this;
- }
-
- public Builder errorDate(Date errorDate) {
- error.setErrorDate(errorDate);
- return this;
- }
-
- public Builder jobId(Long jobId) {
- error.setJobId(jobId);
- return this;
- }
-
- public Builder initActivityId(Long initActivityId) {
- error.setInitActivityId(initActivityId);
- return this;
- }
-
- }
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorContext.java b/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorContext.java
deleted file mode 100644
index ef1ecc7a5ec..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorContext.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.error;
-
-import org.kie.api.runtime.process.NodeInstance;
-import org.kie.api.task.model.Task;
-
-public class ExecutionErrorContext {
-
- private Throwable cause;
-
- private NodeInstance firstExecutedNode;
-
- private NodeInstance lastExecutedNode;
-
- private Task lastExecutedTask;
-
- public ExecutionErrorContext(Throwable cause, NodeInstance lastExecutedNode, Task lastExecutedTask, NodeInstance firstExecutedNode) {
- super();
- this.cause = cause;
- this.lastExecutedNode = lastExecutedNode;
- this.lastExecutedTask = lastExecutedTask;
- this.firstExecutedNode = firstExecutedNode;
- }
-
- public Throwable getCause() {
- return cause;
- }
-
- public NodeInstance getLastExecutedNode() {
- return lastExecutedNode;
- }
-
- public Task getLastExecutedTask() {
- return lastExecutedTask;
- }
-
- public NodeInstance getFirstExecutedNode() {
- return firstExecutedNode;
- }
-
- @Override
- public String toString() {
- return "ExecutionErrorContext [cause=" + cause + ", firstExecutedNode=" + firstExecutedNode +
- ", lastExecutedNode=" + lastExecutedNode + ", lastExecutedTask=" + lastExecutedTask + "]";
- }
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorFilter.java b/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorFilter.java
deleted file mode 100644
index 76d240ac382..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorFilter.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.error;
-
-import java.util.stream.Stream;
-
-/**
- * Responsible for implementing filter capability to decide how to deal with given error.
- * Up to concrete implementations to decide on logic how to read details from the cause.
- * It might simply check on the top level exception or it can drill down into bottom
- * of the cause.
- */
-public interface ExecutionErrorFilter {
-
- boolean accept(ExecutionErrorContext errorContext);
-
- /**
- * Based on the cause filters the actual error and produces ExecutionError instance
- * if applicable for given filter. In case filter is not finding anything relevant it shall return
- * null instead of execution error instance to allow others to process it.
- * @param cause the root cause of the error
- * @return ExecutionError instance populated with details extracted from the cause, or null of not applicable to this filter
- */
- ExecutionError filter(ExecutionErrorContext errorContext);
-
- /**
- * Returns expected priority in regards to other filters. The lower value returned the higher priority it has.
- * @return priority for processing
- */
- Integer getPriority();
-
- default boolean isCausedBy(Throwable throwable, Class>... types) {
-
- while (throwable != null) {
- final Class> throwableClass = throwable.getClass();
- boolean matched = Stream.of(types)
- .filter(clazz -> clazz != null)
- .anyMatch(clazz -> clazz.isAssignableFrom(throwableClass));
- if (matched) {
-
- return true;
- } else {
- throwable = throwable.getCause();
- }
- }
-
- return false;
- }
-
- @SuppressWarnings("unchecked")
- default T extract(Throwable throwable, Class type) {
-
- while (throwable != null) {
- if (type.isAssignableFrom(throwable.getClass())) {
-
- return (T) throwable;
- } else {
- throwable = throwable.getCause();
- }
- }
-
- return null;
- }
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorHandler.java b/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorHandler.java
deleted file mode 100644
index ebffb3790ad..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorHandler.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.error;
-
-import org.kie.api.runtime.process.NodeInstance;
-import org.kie.api.task.model.Task;
-
-public interface ExecutionErrorHandler {
-
-
- void processing(NodeInstance nodeInstance);
-
- void processing(Task task);
-
- void processed(NodeInstance nodeInstance);
-
- void processed(Task task);
-
- void handle(Throwable cause);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorListener.java b/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorListener.java
deleted file mode 100644
index 8752643fc82..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorListener.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.error;
-
-public interface ExecutionErrorListener {
-
- void onExecutionError(ExecutionError error);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorManager.java b/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorManager.java
deleted file mode 100644
index 518dbf59ecc..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorManager.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.error;
-
-
-public interface ExecutionErrorManager {
-
- ExecutionErrorHandler getHandler();
-
- ExecutionErrorStorage getStorage();
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorStorage.java b/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorStorage.java
deleted file mode 100644
index 0011ce4a078..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/error/ExecutionErrorStorage.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.error;
-
-import java.util.List;
-
-public interface ExecutionErrorStorage {
-
- ExecutionError store(ExecutionError error);
-
- ExecutionError get(String errorId);
-
- void acknowledge(String user, String... errorId);
-
- List list(Integer page, Integer pageSize);
-
- List listByProcessInstance(String processInstanceId, Integer page, Integer pageSize);
-
- List listByActivity(String activityName, Integer page, Integer pageSize);
-
- List listByDeployment(String deploymentId, Integer page, Integer pageSize);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/CacheManager.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/CacheManager.java
deleted file mode 100644
index 847f50a4fe3..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/CacheManager.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import org.kie.internal.runtime.Cacheable;
-
-/**
- * Maintains a cache of various items that are long lived or expensive to be created
- * frequently so they can benefit from being cached.
- *
- */
-public interface CacheManager {
-
- /**
- * Adds a given value into the cache under given key
- * @param key unique key for the item to be stored
- * @param value actual value to be cached
- */
- void add(String key, Object value);
-
- /**
- * Retrieves item from a cache if exists
- * @param key key for the item in the cache
- * @return actual value if found otherwise null
- */
- Object get(String key);
-
- /**
- * Removes the item from cache if exists
- * @param key key for the item in the cache
- * @return actual value if found otherwise null
- */
- Object remove(String key);
-
- /**
- * Disposes cache and cleans up/closes its stored resources of applicable
- * @see Cacheable for details
- */
- void dispose();
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/Disposable.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/Disposable.java
deleted file mode 100644
index 2806619fa87..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/Disposable.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-/**
- * Marker interface that indicates that given class is disposable - meaning shall be
- * manually or automatically disposed on close events.
- *
- */
-public interface Disposable {
-
- /**
- * Actual logic that shall be executed on dispose.
- */
- void dispose();
-
- /**
- * Allows to register listeners to be notified whenever instance is disposed so dependent
- * instances can take proper action on that occasion.
- * @param listener callback listener instance
- */
- void addDisposeListener(DisposeListener listener);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/DisposeListener.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/DisposeListener.java
deleted file mode 100644
index 35cd37f2939..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/DisposeListener.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import org.kie.api.runtime.manager.RuntimeEngine;
-
-/**
- * Callback listener interface to receive notification when Disposable
- * instances are actually disposed.
- *
- */
-public interface DisposeListener {
-
- /**
- * Invoked by instances that are going to be disposed.
- * @param runtime RuntimeEngine instance that is going to be disposed.
- */
- void onDispose(RuntimeEngine runtime);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/EventListenerProducer.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/EventListenerProducer.java
deleted file mode 100644
index d3792fedfe5..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/EventListenerProducer.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Allows do define custom producers for know EventListeners. Intention of this is that there might be several
- * implementations that might provide different listener instance based on the context they are executed in.
- *
- * It will be invoked by RegisterableItemsFactory implementation (especially InjectableRegisterableItemsFactory
- * in CDI world) for every KieSession. Recommendation is to always produce new instances to avoid unexpected
- * results.
- *
- * @param type of the event listener - ProcessEventListener, AgendaEventListener, WorkingMemoryEventListener
- */
-public interface EventListenerProducer {
-
- /**
- * Returns list of instances for given (T) type of listeners
- *
- * Parameters that might be given are as follows:
- *
- * - ksession
- * - taskService
- * - runtimeManager
- *
- * @param identifier - identifier of the owner - usually RuntimeManager that allows the producer to filter out
- * and provide valid instances for given owner
- * @param params - owner might provide some parameters, usually KieSession, TaskService, RuntimeManager instances
- * @return list of listener instances (recommendation is to always return new instances when this method is invoked)
- */
- List getEventListeners(String identifier, Map params);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/GlobalProducer.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/GlobalProducer.java
deleted file mode 100644
index 6ccca921514..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/GlobalProducer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import java.util.Map;
-
-/**
- * Allows to provide global instances for KieSession
to be registered on time when RuntimeEngine
- * is created.
- *
- * It will be invoked by RegisterableItemsFactory implementation (especially InjectableRegisterableItemsFactory
- * in CDI world) for every KieSession.
- *
- */
-public interface GlobalProducer {
-
- /**
- * Returns map of (key = global name, value global instance) of globals
- * to be registered on KieSession
- *
- * Parameters that might be given are as follows:
- *
- * - ksession
- * - taskService
- * - runtimeManager
- *
- *
- * @param identifier - identifier of the owner - usually RuntimeManager that allows the producer to filter out
- * and provide valid instances for given owner
- * @param params - owner might provide some parameters, usually KieSession, TaskService, RuntimeManager instances
- * @return map of work item handler instances (recommendation is to always return new instances when this method is invoked)
- */
- Map getGlobals(String identifier, Map params);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/InternalRuntimeEngine.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/InternalRuntimeEngine.java
deleted file mode 100644
index 6e9d81b6cd5..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/InternalRuntimeEngine.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import org.kie.api.runtime.KieSession;
-import org.kie.api.runtime.manager.RuntimeEngine;
-
-/**
- * Extension to stable API of RuntimeEngine that provides additional capabilities.
- *
- */
-public interface InternalRuntimeEngine extends RuntimeEngine {
-
- /**
- * Returns internal kie session.
- * @return kie session already created
- */
- KieSession internalGetKieSession();
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/Mapper.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/Mapper.java
deleted file mode 100644
index 81dcdc4f8c1..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/Mapper.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import org.kie.api.runtime.manager.Context;
-
-/**
- * Mapper
responsibility is to provide correlation between context
- * identifier and ksession identifier to effectively keep track of what context
- * has been mapped to given ksession.
- * Mapper covers entire life cycle of the mapping which consists of:
- *
- * - storing the mapping
- * - retrieving the mapping
- * - removing the mapping
- *
- *
- */
-public interface Mapper {
-
- /**
- * Stores context to ksession id mapping
- * @param context instance of the context to be stored
- * @param ksessionId actual identifier of ksession
- */
- void saveMapping(Context> context, Long ksessionId, String ownerId);
-
- /**
- * Finds ksession for given context
- * @param context instance of the context
- * @return ksession identifier when found otherwise null
- */
- Long findMapping(Context> context, String ownerId);
-
- /**
- * Finds context by ksession identifier
- * @param ksessionId identifier of ksession
- * @return context instance when wound otherwise null
- */
- Object findContextId(Long ksessionId, String ownerId);
-
- /**
- * Remove permanently context to ksession id mapping
- * @param context context instance that mapping shall be removed for
- */
- void removeMapping(Context> context, String ownerId);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeEnvironment.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeEnvironment.java
deleted file mode 100644
index 8084603c24f..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeEnvironment.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-
-/**
- * Extension of org.kie.api.runtime.manager.RuntimeEnvironment
that contains internal methods
- */
-public interface RuntimeEnvironment extends org.kie.api.runtime.manager.RuntimeEnvironment {
-
- /**
- * Delivers concrete implementation of Mapper
that provides access to mapping between contexts and
- * ksession identifiers for tracking purposes.
- * @return
- */
- Mapper getMapper();
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerFactory.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerFactory.java
deleted file mode 100644
index 596e1b5717c..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerFactory.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @deprecated
- * Use org.kie.api.runtime.manager.RuntimeManagerFactory
- */
-public interface RuntimeManagerFactory extends org.kie.api.runtime.manager.RuntimeManagerFactory {
-
-
- /**
- * @deprecated
- * Use org.kie.api.runtime.manager.RuntimeManagerFactory
- */
- public static class Factory {
- private static RuntimeManagerFactory INSTANCE;
- private static Logger logger = LoggerFactory.getLogger(Factory.class);
-
- static {
- try {
- final Object delegate =
- Class.forName( System.getProperty("org.jbpm.runtime.manager.class",
- "org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl") ).newInstance();
- INSTANCE = (RuntimeManagerFactory) Proxy.newProxyInstance(RuntimeManagerFactory.class.getClassLoader(),
- new Class[]{RuntimeManagerFactory.class}, new InvocationHandler() {
-
- @Override
- public Object invoke(Object proxy, Method method, Object[] arguments) throws Throwable {
-
- return method.invoke(delegate, arguments);
- }
- });
- } catch (Exception e) {
- logger.error("Unable to instance RuntimeManagerFactory due to " + e.getMessage());
- }
- }
-
- /**
- * Returns a reference to the RuntimeManagerFactory singleton
- */
- public static RuntimeManagerFactory get() {
- if (INSTANCE == null) {
- throw new RuntimeException("RuntimeManagerFactory was not initialized, see previous errors");
- }
- return INSTANCE;
- }
- }
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerIdFilter.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerIdFilter.java
deleted file mode 100644
index 515a41ce244..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerIdFilter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import java.util.Collection;
-
-/**
- * Allows to apply filtering on runtime manager identifiers to find only those matching
- *
- */
-public interface RuntimeManagerIdFilter {
-
- /**
- * Filters given identifiers
based on given pattern and return only those matching.
- * @param pattern pattern used to filter identifiers
- * @param identifiers all available identifiers
- * @return returns only matched identifiers or empty list in case of no match found
- */
- Collection filter(String pattern, Collection identifiers);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerRegistry.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerRegistry.java
deleted file mode 100644
index 6363d5a8360..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/RuntimeManagerRegistry.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.kie.api.runtime.manager.RuntimeManager;
-
-public class RuntimeManagerRegistry {
-
- private static RuntimeManagerRegistry INSTANCE = new RuntimeManagerRegistry();
-
- protected volatile ConcurrentHashMap registeredManager = new ConcurrentHashMap<>();
-
- private RuntimeManagerRegistry() {
-
- }
-
- public static RuntimeManagerRegistry get() {
- return INSTANCE;
- }
-
- public synchronized void register(RuntimeManager manager) {
- if (registeredManager.containsKey(manager.getIdentifier())) {
- throw new IllegalStateException("RuntimeManager is already registered with id " + manager.getIdentifier());
- }
- this.registeredManager.put(manager.getIdentifier(), manager);
- }
-
- public synchronized void remove(RuntimeManager manager) {
-
- this.registeredManager.remove(manager.getIdentifier());
- }
-
- public synchronized void remove(String identifier) {
-
- this.registeredManager.remove(identifier);
- }
-
- public RuntimeManager getManager(String id) {
- return this.registeredManager.get(id);
- }
-
- public boolean isRegistered(String id) {
- return this.registeredManager.containsKey(id);
- }
-
- public Collection getRegisteredIdentifiers() {
- // Using "registeredManager.keySet()" directly would result in issues when compiling with JDK 8+. The "keySet()"
- // method returns type ConcurrentHashMap$KeySetView which is only available in Java 8+. That means
- // the bytecode would contain reference to that type, which does not exist in Java 6 and Java 7 and thus
- // clients would get NoSuchMethodError at runtime. The "keys()" method is fully backwards compatible, but it
- // requires wrapping inside additional collection as "unmodifiableCollection()" does not accept Enumerations.
- return Collections.unmodifiableCollection(Collections.list(this.registeredManager.keys()));
- }
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/SessionFactory.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/SessionFactory.java
deleted file mode 100644
index b1eb034f6e5..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/SessionFactory.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import org.kie.api.runtime.KieSession;
-
-/**
- * Factory that produces KieSession
instances.
- *
- */
-public interface SessionFactory {
-
- /**
- * Produces new instance of KieSession
- * @return new instance of KieSession
- */
- KieSession newKieSession();
-
- /**
- * Loads KieSession
form data store (such as db) based on given id.
- * @param sessionId identifier of ksession
- * @return loaded instance of KieSession
- * @throws RuntimeException in case session cannot be loaded
- */
- KieSession findKieSessionById(Long sessionId);
-
- /**
- * Closes the factory and releases all resources
- */
- void close();
-
- /**
- * Invoked when runtime engine is about to be disposed
- * @param sessionId ksession id that is disposed.
- */
- void onDispose(Long sessionId);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/TaskServiceFactory.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/TaskServiceFactory.java
deleted file mode 100644
index 136b8569e52..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/TaskServiceFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import org.kie.api.task.TaskService;
-
-/**
- * Factory that produces TaskService
instances.
- *
- */
-public interface TaskServiceFactory {
-
- /**
- * Produces new instance of TaskService
- * @return new instance of TaskService
- */
- TaskService newTaskService();
-
- /**
- * Closes this factory and releases all resources
- */
- void close();
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/WorkItemHandlerProducer.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/WorkItemHandlerProducer.java
deleted file mode 100644
index 7ba623e3850..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/WorkItemHandlerProducer.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager;
-
-import java.util.Map;
-
-import org.kie.api.runtime.process.WorkItemHandler;
-
-/**
- * Allows to provide custom implementations to deliver WorkItem name and WorkItemHandler instance pairs
- * for the runtime.
- *
- * It will be invoked by RegisterableItemsFactory implementation (especially InjectableRegisterableItemsFactory
- * in CDI world) for every KieSession. Recommendation is to always produce new instances to avoid unexpected
- * results.
- *
- */
-public interface WorkItemHandlerProducer {
-
- /**
- * Returns map of (key = work item name, value work item handler instance) of work items
- * to be registered on KieSession
- *
- * Parameters that might be given are as follows:
- *
- * - ksession
- * - taskService
- * - runtimeManager
- *
- *
- * @param identifier - identifier of the owner - usually RuntimeManager that allows the producer to filter out
- * and provide valid instances for given owner
- * @param params - owner might provide some parameters, usually KieSession, TaskService, RuntimeManager instances
- * @return map of work item handler instances (recommendation is to always return new instances when this method is invoked)
- */
- Map getWorkItemHandlers(String identifier, Map params);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditDateDeleteBuilder.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditDateDeleteBuilder.java
deleted file mode 100644
index 8d648b7375c..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditDateDeleteBuilder.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.audit.query;
-
-import java.util.Date;
-
-/**
- * This interface defines methods that are used by all of the Audit delete query builder implementations.
- * @param
- *
- */
-public interface AuditDateDeleteBuilder extends AuditDeleteBuilder {
-
- /**
- * Specify one or more dates as criteria in the query
- * @param date one or more dates
- * @return The current query builder instance
- */
- T date(Date... date);
-
- /**
- * Specify the begin of a date range to be used as a criteria on the date field.
- * The date range includes the date specified.
- * @param rangeStart the start (early end) of the date range
- * @return The current query builder instance
- */
- T dateRangeStart(Date rangeStart);
-
- /**
- * Specify the end of a date range to be used as a criteria on the date field.
- * The date range includes this date.
- * @param rangeEnd the end (later end) of the date range
- * @return The current query builder instance
- */
- T dateRangeEnd(Date rangeEnd);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditDeleteBuilder.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditDeleteBuilder.java
deleted file mode 100644
index 1307953f405..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditDeleteBuilder.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.audit.query;
-
-import org.kie.internal.query.ParametrizedQueryBuilder;
-import org.kie.internal.query.ParametrizedUpdate;
-
-/**
- * This interface defines methods that are used by all of the Audit delete query builder implementations.
- * @param
- *
- */
-public interface AuditDeleteBuilder extends ParametrizedQueryBuilder {
-
- /**
- * Specify one or more process instance ids as criteria in the query
- * @param processInstanceId one or more a process instance ids
- * @return The current query builder instance
- */
- public T processInstanceId(long... processInstanceId);
-
- /**
- * Specify one or more process (definition) id's as criteria in the query
- * @param processId one or more process ids
- * @return The current query builder instance
- */
- public T processId(String... processId);
-
- /**
- * Specify one or more status that process instance should be in as criteria in the query.
- * It might be supported or not
- * @param statuses @see org.kie.api.runtime.process.ProcessInstance
- * @return The current query builder instance
- */
- T logBelongsToProcessInStatus(Integer... statuses);
-
- /**
- * Specify deployment id that process instance should be in as criteria in the query.
- * It might me supported or not
- * @param the deployment id
- * @return The current query builder instance
- */
- T logBelongsToProcessInDeployment(String deploymentId);
-
- /**
- * Specify the number of records to be included per transaction.
- * @param numRecords number of records (0 means all records will be processed into one single transaction)
- * @return The current query builder instance
- */
- T recordsPerTransaction(int numRecords);
-
- /**
- * Create the {@link ParametrizedUpdate} instance that can be used
- * to execute an update or delete of the entities that this builder is for.
- *
- * Further modifications to this builder instance
- * will not affect the query criteria used in the {@link ParametrizedUpdate}
- * produced by this method.
- *
- * @return a {@link ParametrizedUpdate} instance that can be executed.
- */
- public ParametrizedUpdate build();
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditLogQueryBuilder.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditLogQueryBuilder.java
deleted file mode 100644
index 3075c277e60..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/AuditLogQueryBuilder.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.audit.query;
-
-import org.kie.internal.query.ParametrizedQueryBuilder;
-
-/**
- * This interface defines methods that are used by all of the Audit
- * {@link ParametrizedQueryBuilder} implementations.
- *
- * @param The {@link ParametrizedQueryBuilder} implementation type
- * @param The entity type on which is being queried
- */
-public interface AuditLogQueryBuilder extends ProcessIdQueryBuilder {
-
- /**
- * Specify which field to use when ordering the results, in ascending order.
- *
- * If this method is not used, the results will be ordered in ascending order
- * by the id field.
- * @param field the field by which the query results should be ordered
- * @return The current instance of this query builder
- */
- public T ascending( OrderBy field );
-
- /**
- * Specify which field to use when ordering the results, in descending order.
- *
- * If this method is not used, the results will be ordered in ascending order
- * by the id field.
- * @param field the field by which the query results should be ordered
- * @return The current instance of this query builder
- */
- public T descending( OrderBy field );
-
- public static enum OrderBy {
- // order by process instance id
- processInstanceId,
- // order by process id
- processId,
- }
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ErrorInfoDeleteBuilder.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ErrorInfoDeleteBuilder.java
deleted file mode 100644
index 04fd6ae8d96..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ErrorInfoDeleteBuilder.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.audit.query;
-
-
-public interface ErrorInfoDeleteBuilder extends AuditDateDeleteBuilder {
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/NodeInstanceLogDeleteBuilder.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/NodeInstanceLogDeleteBuilder.java
deleted file mode 100644
index 5a86613e488..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/NodeInstanceLogDeleteBuilder.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.audit.query;
-
-
-public interface NodeInstanceLogDeleteBuilder extends AuditDateDeleteBuilder {
-
- /**
- * Specify one or more work item ids associated with a node to use as a criteria.
- * @param workItemId one or more long work item ids
- * @return The current query builder instance
- */
- public NodeInstanceLogDeleteBuilder workItemId(long... workItemId);
-
- /**
- * Specify one or more node instance ids to use as a criteria.
- * @param nodeInstanceId one or more string node instance ids
- * @return The current query builder instance
- */
- public NodeInstanceLogDeleteBuilder nodeInstanceId(String... nodeInstanceId);
-
- /**
- * Specify one or more node ids to use as a criteria.
- * @param nodeId one or more string node ids
- * @return The current query builder instance
- */
- public NodeInstanceLogDeleteBuilder nodeId(String... nodeId);
-
- /**
- * Specify one or more node names to use as a criteria.
- * @param name one or more string node names
- * @return The current query builder instance
- */
- public NodeInstanceLogDeleteBuilder nodeName(String... name);
-
- /**
- * Specify externalId to be used as criteria on the externalId field.
- * @param externalId identifier that defines custom id
- * @return The current query builder instance
- */
- public NodeInstanceLogDeleteBuilder externalId(String... externalId);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/NodeInstanceLogQueryBuilder.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/NodeInstanceLogQueryBuilder.java
deleted file mode 100644
index dafd6e16e58..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/NodeInstanceLogQueryBuilder.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.audit.query;
-
-import java.util.Date;
-
-import org.kie.api.runtime.manager.audit.NodeInstanceLog;
-
-public interface NodeInstanceLogQueryBuilder extends AuditLogQueryBuilder {
-
- /**
- * Specify one or more dates as criteria in the query.
- * @param date one or more dates
- * @return The current query builder instance
- */
- public NodeInstanceLogQueryBuilder date(Date... date);
-
- /**
- * Specify the begin of a date range to be used as a criteria on the date field.
- * The date range includes the date specified.
- * @param rangeStart the start (early end) of the date range
- * @return The current query builder instance
- */
- public NodeInstanceLogQueryBuilder dateRangeStart(Date rangeStart);
-
- /**
- * Specify the end of a date range to be used as a criteria on the date field.
- * The date range includes this date.
- * @param rangeEnd the end (later end) of the date range
- * @return The current query builder instance
- */
- public NodeInstanceLogQueryBuilder dateRangeEnd(Date rangeEnd);
-
- /**
- * Specify one or more node instance ids to use as a criteria.
- * @param nodeInstanceId one or more string node instance ids
- * @return The current query builder instance
- */
- public NodeInstanceLogQueryBuilder nodeInstanceId(String... nodeInstanceId);
-
- /**
- * Specify one or more node ids to use as a criteria.
- * @param nodeId one or more string node ids
- * @return The current query builder instance
- */
- public NodeInstanceLogQueryBuilder nodeId(String... nodeId);
-
- /**
- * Specify one or more node names to use as a criteria.
- * @param name one or more string node names
- * @return The current query builder instance
- */
- public NodeInstanceLogQueryBuilder nodeName(String... name);
-
- /**
- * Specify one or more node types to use as a criteria.
- * @param type one or more string node types
- * @return The current query builder instance
- */
- public NodeInstanceLogQueryBuilder nodeType(String... type);
-
- /**
- * Specify one or more work item ids associated with a node to use as a criteria.
- * @param workItemId one or more long work item ids
- * @return The current query builder instance
- */
- public NodeInstanceLogQueryBuilder workItemId(long... workItemId);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessIdQueryBuilder.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessIdQueryBuilder.java
deleted file mode 100644
index 70e0be89896..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessIdQueryBuilder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.audit.query;
-
-import org.kie.internal.query.ParametrizedQueryBuilder;
-import org.kie.internal.query.ProcessInstanceIdQueryBuilder;
-
-/**
- * This interface defines methods that are used by all of the Audit
- * {@link ParametrizedQueryBuilder} implementations.
- *
- * @param The {@link ParametrizedQueryBuilder} implementation type
- * @param The entity type on which is being queried
- */
-public interface ProcessIdQueryBuilder extends ProcessInstanceIdQueryBuilder {
-
- /**
- * Specify one or more process (definition) id's as criteria in the query
- * @param processId one or more process ids
- * @return The current query builder instance
- */
- public T processId(String... processId);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessInstanceLogDeleteBuilder.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessInstanceLogDeleteBuilder.java
deleted file mode 100644
index 80bc3580371..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessInstanceLogDeleteBuilder.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.audit.query;
-
-import java.util.Date;
-
-public interface ProcessInstanceLogDeleteBuilder extends AuditDeleteBuilder {
-
- /**
- * Specify one more statuses (in the form of an int) as criteria.
- * @param status one or more int statuses
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogDeleteBuilder status(int... status);
-
- /**
- * Specify one or more (process instance) outcomes as a criteria.
- * @param outcome one or more string outcomes
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogDeleteBuilder outcome(String... outcome);
-
-
- /**
- * Specify one or more identiies (who started the process instance) as a criteria
- * @param identity one or more string identities
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogDeleteBuilder identity(String... identity);
-
- /**
- * Specify one or more process versions as a criteria
- * @param version one or more string process versions
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogDeleteBuilder processVersion(String... version);
-
- /**
- * Specify one or more process names as a criteria
- * @param processName one or more string process names
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogDeleteBuilder processName(String... processName);
-
- /**
- * Specify one or more (process instance) start dates as a criteria
- * @param date one or more {@link Date} start dates
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogDeleteBuilder startDate(Date... date);
-
- /**
- * Specify the begin of a date range to be used as a criteria on the start date field.
- * The date range includes the date specified.
- * @param rangeStart the start (early end) of the date range
- * @return The current query builder instance
- */
- public ProcessInstanceLogDeleteBuilder startDateRangeStart(Date rangeStart);
-
- /**
- * Specify the end of a date range to be used as a criteria on the start date field.
- * The date range includes this date.
- * @param rangeEnd the end (later end) of the date range
- * @return The current query builder instance
- */
- public ProcessInstanceLogDeleteBuilder startDateRangeEnd(Date rangeEnd);
-
- /**
- * Specify one or more (process instance) end dates as a criteria
- * @param date one or more {@link Date} end dates
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogDeleteBuilder endDate(Date... date);
-
- /**
- * Specify the begin of a date range to be used as a criteria on the end date field.
- * The date range includes this date.
- * @param date the begin (later end) of the date range
- * @return The current query builder instance
- */
- public ProcessInstanceLogDeleteBuilder endDateRangeStart(Date rangeStart);
-
- /**
- * Specify the end of a date range to be used as a criteria on the end date field.
- * The date range includes this date.
- * @param date the end (later end) of the date range
- * @return The current query builder instance
- */
- public ProcessInstanceLogDeleteBuilder endDateRangeEnd(Date rangeEnd);
-
- /**
- * Specify externalId to be used as criteria on the externalId field.
- * @param externalId identifier that defines custom id
- * @return The current query builder instance
- */
- public ProcessInstanceLogDeleteBuilder externalId(String... externalId);
-
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessInstanceLogQueryBuilder.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessInstanceLogQueryBuilder.java
deleted file mode 100644
index 0812e3d9492..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/ProcessInstanceLogQueryBuilder.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.audit.query;
-
-import java.util.Date;
-
-import org.kie.api.runtime.manager.audit.ProcessInstanceLog;
-import org.kie.internal.process.CorrelationKey;
-
-public interface ProcessInstanceLogQueryBuilder extends AuditLogQueryBuilder {
-
- /**
- * Specify one more statuses (in the form of an int) as criteria.
- * @param status one or more int statuses
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogQueryBuilder status(int... status);
-
- /**
- * Specify one or more (process instance) outcomes as a criteria.
- * @param outcome one or more string outcomes
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogQueryBuilder outcome(String... outcome);
-
- /**
- * Specify one or more (process instance) durations as a criteria.
- *
- * This duration is in milliseconds.
- * @param duration one or more long durations
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogQueryBuilder duration(long... duration);
-
- /**
- * Specify the begin (minimum) of a range to be used as a criteria on the
- * (process instance) duration field
- * @param durationMin the begin (minimum) of the long range
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogQueryBuilder durationMin(long durationMin);
-
- /**
- * Specify the end (maximum) of a range to be used as a criteria on the
- * (process instance) duration field
- * @param durationMax the end (maximum) of the long range
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogQueryBuilder durationMax(long durationMax);
-
- /**
- * Specify one or more identiies (who started the process instance) as a criteria
- * @param identity one or more string identities
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogQueryBuilder identity(String... identity);
-
- /**
- * Specify one or more process versions as a criteria
- * @param version one or more string process versions
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogQueryBuilder processVersion(String... version);
-
- /**
- * Specify one or more process names as a criteria
- * @param processName one or more string process names
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogQueryBuilder processName(String... processName);
-
- /**
- * Specify one or more (process instance) start dates as a criteria
- * @param date one or more {@link Date} start dates
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogQueryBuilder startDate(Date... date);
-
- /**
- * Specify the begin of a date range to be used as a criteria on the start date field.
- * The date range includes the date specified.
- * @param rangeStart the start (early end) of the date range
- * @return The current query builder instance
- */
- public ProcessInstanceLogQueryBuilder startDateRangeStart(Date rangeStart);
-
- /**
- * Specify the end of a date range to be used as a criteria on the start date field.
- * The date range includes this date.
- * @param rangeEnd the end (later end) of the date range
- * @return The current query builder instance
- */
- public ProcessInstanceLogQueryBuilder startDateRangeEnd(Date rangeEnd);
-
- /**
- * Specify one or more (process instance) end dates as a criteria
- * @param date one or more {@link Date} end dates
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogQueryBuilder endDate(Date... date);
-
- /**
- * Specify the begin of a date range to be used as a criteria on the end date field.
- * The date range includes this date.
- * @param rangeStart the begin (later end) of the date range
- * @return The current query builder instance
- */
- public ProcessInstanceLogQueryBuilder endDateRangeStart(Date rangeStart);
-
- /**
- * Specify the end of a date range to be used as a criteria on the end date field.
- * The date range includes this date.
- * @param rangeEnd the end (later end) of the date range
- * @return The current query builder instance
- */
- public ProcessInstanceLogQueryBuilder endDateRangeEnd(Date rangeEnd);
-
- /**
- * Specify one or more process correlation keys as a criteria
- * @param correlationKeys one or more correlation keys
- * @return The current instance of this query builder
- */
- public ProcessInstanceLogQueryBuilder correlationKey(CorrelationKey... correlationKeys);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/VariableInstanceLogDeleteBuilder.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/VariableInstanceLogDeleteBuilder.java
deleted file mode 100644
index 29e6cb4d711..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/VariableInstanceLogDeleteBuilder.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.audit.query;
-
-
-public interface VariableInstanceLogDeleteBuilder extends AuditDateDeleteBuilder{
-
- /**
- * Specify one or more external ids to use as a criteria. In some cases,
- * the external id is the deployment unit id or runtime manager id.
- * @param externalId one or more string external ids
- * @return The current query builder instance
- */
- public VariableInstanceLogDeleteBuilder externalId(String... externalId);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/VariableInstanceLogQueryBuilder.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/VariableInstanceLogQueryBuilder.java
deleted file mode 100644
index 877f354ad9d..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/VariableInstanceLogQueryBuilder.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.audit.query;
-
-import java.util.Date;
-
-import org.kie.api.runtime.manager.audit.VariableInstanceLog;
-
-public interface VariableInstanceLogQueryBuilder extends AuditLogQueryBuilder {
-
- /**
- * Specify one or more dates as criteria in the query.
- * @param date one or more dates
- * @return The current query builder instance
- */
- public VariableInstanceLogQueryBuilder date(Date... date);
-
- /**
- * Specify the begin of a date range to be used as a criteria on the date field.
- * The date range includes the date specified.
- * @param rangeStart the start (early end) of the date range
- * @return The current query builder instance
- */
- public VariableInstanceLogQueryBuilder dateRangeStart(Date rangeStart);
-
- /**
- * Specify the end of a date range to be used as a criteria on the date field.
- * The date range includes this date.
- * @param rangeEnd the end (later end) of the date range
- * @return The current query builder instance
- */
- public VariableInstanceLogQueryBuilder dateRangeEnd(Date rangeEnd);
-
- /**
- * Specify one or more variable instance ids to use as a criteria.
- * @param variableInstanceId one or more string variable instance ids
- * @return The current query builder instance
- */
- public VariableInstanceLogQueryBuilder variableInstanceId(String... variableInstanceId);
-
- /**
- * Specify one or more variable ids to use as a criteria.
- * @param variableId one or more string variable ids
- * @return The current query builder instance
- */
- public VariableInstanceLogQueryBuilder variableId(String... variableId);
-
- /**
- * Specify one or more variable values to use as a criteria.
- * @param value one or more string values
- * @return The current query builder instance
- */
- public VariableInstanceLogQueryBuilder value(String... value);
-
- /**
- * Specify one or more old (previous) variable values to use as a criteria.
- * @param oldVvalue one or more string old values
- * @return The current query builder instance
- */
- public VariableInstanceLogQueryBuilder oldValue(String... oldVvalue);
-
- /**
- * Specify the value that variable instance logs should have
- * @param variableId the String variable id
- * @param value the String value of the variable
- * @return The current query builder instance
- */
- public VariableInstanceLogQueryBuilder variableValue(String variableId, String value);
-
- /**
- * Specify one or more external ids to use as a criteria. In some cases,
- * the external id is the deployment unit id or runtime manager id.
- * @param externalId one or more string external ids
- * @return The current query builder instance
- */
- public VariableInstanceLogQueryBuilder externalId(String... externalId);
-
- /**
- * Only retrieve the most recent ("last") variable instance logs per variable
- *
- * When using this, please make sure that this criteria intersects other criteria.
- *
- * Otherwise, this criteria will have no effect at all.
- * @return The current query builder instance
- */
- public VariableInstanceLogQueryBuilder last();
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/CaseContext.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/CaseContext.java
deleted file mode 100644
index f8e404050e3..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/CaseContext.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.context;
-
-import org.kie.api.runtime.manager.Context;
-
-/**
- * Context implementation to deliver capabilities to find proper RuntimeEngine
- * instances based on case identifier. Use by strategy:
- *
- * To obtain instances of this context use one of the following static methods:
- *
- * get(String)
to get context for case
- *
- *
- */
-public class CaseContext implements Context {
-
- private String caseIdentifier;
-
- public CaseContext(String caseIdentifier) {
- this.caseIdentifier = caseIdentifier;
- }
-
- @Override
- public String getContextId() {
-
- return caseIdentifier;
- }
-
- /**
- * Returns new instance of CaseContext
with case identifier
- * @param caseIdentifier unique case identifier
- * @return
- */
- public static CaseContext get(String caseIdentifier) {
- return new CaseContext(caseIdentifier);
- }
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/CorrelationKeyContext.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/CorrelationKeyContext.java
deleted file mode 100644
index 469c6f120c8..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/CorrelationKeyContext.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.context;
-
-import org.kie.api.runtime.manager.Context;
-import org.kie.internal.process.CorrelationKey;
-
-/**
- * Context implementation to deliver capabilities to find proper RuntimeEngine
- * instances based on correlation key instead of process instance id. Use by strategy:
- *
- * - PerProcessInstance
- *
- * To obtain instances of this context use one of the following static methods:
- *
- * get()
to get empty context when starting process instances
- * get(CorrelationKey)
to get context for specific process instance
- *
- *
- */
-public class CorrelationKeyContext implements Context {
-
- private CorrelationKey correlationKey;
-
- public CorrelationKeyContext(CorrelationKey key) {
- this.correlationKey = key;
- }
-
- @Override
- public CorrelationKey getContextId() {
-
- return correlationKey;
- }
-
- /**
- * Returns new instance of CorrelationKeyContext
without correlation key.
- * Used for starting new instances of the process.
- * @return
- */
- public static CorrelationKeyContext get() {
- return new CorrelationKeyContext(null);
- }
-
- /**
- * Returns new instance of CorrelationKeyContext
with correlation key of already existing process instance
- * @param key actual correlation key of process instance
- * @return
- */
- public static CorrelationKeyContext get(CorrelationKey key) {
- return new CorrelationKeyContext(key);
- }
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/EmptyContext.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/EmptyContext.java
deleted file mode 100644
index 7c2425143e9..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/EmptyContext.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.context;
-
-import org.kie.api.runtime.manager.Context;
-
-/**
- * Default implementation of Context
interface that does not bring any specifics
- * to the RuntimeManager and is usually used for instances of manager that does not deal with
- * contextual information:
- *
- * - Singleton
- * - PerRequest
- *
- * To obtain instances of this context use static get()
method.
- */
-public class EmptyContext implements Context {
-
- protected static final String CONTEXT_ID = "EmptyContext";
-
- protected static final Context INSTANCE = new EmptyContext();
-
- protected EmptyContext() {
-
- }
- @Override
- public String getContextId() {
-
- return CONTEXT_ID;
- }
-
- /**
- * Returns instances of the empty context.
- * @return
- */
- public static Context get() {
- return INSTANCE;
- }
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/ProcessInstanceIdContext.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/ProcessInstanceIdContext.java
deleted file mode 100644
index d9e1ca22e5b..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/context/ProcessInstanceIdContext.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.runtime.manager.context;
-
-import org.kie.api.runtime.manager.Context;
-
-/**
- * Process instance id aware implementation of the Context
interface.
- * It's main responsibility is to be the data holder between caller and runtime manager
- * to obtain proper instances of RuntimeEngine
.
- * Used by strategy:
- *
- * - PerProcessInstance
- *
- * To obtain instances of this context use one of the following static methods:
- *
- * get()
to get empty context when starting process instances
- * get(Long)
to get context for specific process instance
- *
- */
-public class ProcessInstanceIdContext implements Context {
-
- private String processInstanceId;
-
- public ProcessInstanceIdContext(String processInstanceId) {
- this.processInstanceId = processInstanceId;
- }
-
- @Override
- public String getContextId() {
- return processInstanceId;
- }
-
- public void setContextId(String id) {
- this.processInstanceId = id;
- }
-
- /**
- * Returns new instance of ProcessInstanceIdContext
without process instance id.
- * Used for starting new instances of the process.
- * @return
- */
- public static ProcessInstanceIdContext get() {
- return new ProcessInstanceIdContext(null);
- }
-
- /**
- * Returns new instance of ProcessInstanceIdContext
with id of already existing process instance
- * @param processInstanceId actual identifier of process instance
- * @return
- */
- public static ProcessInstanceIdContext get(String processInstanceId) {
- return new ProcessInstanceIdContext(processInstanceId);
- }
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/AuditTask.java b/kie-internal/src/main/java/org/kie/internal/task/api/AuditTask.java
deleted file mode 100644
index f1dd9ecad50..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/AuditTask.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.Date;
-
-public interface AuditTask {
- long getTaskId();
-
- void setTaskId(long taskId);
-
- String getStatus();
-
- void setStatus(String status);
-
- Date getActivationTime();
-
- void setActivationTime(Date activationTime);
-
- String getName();
-
- void setName(String name);
-
- String getDescription();
-
- void setDescription(String description);
-
- int getPriority();
-
- void setPriority(int priority);
-
- String getCreatedBy();
-
- void setCreatedBy(String createdBy);
-
- Date getCreatedOn();
-
- void setCreatedOn(Date createdOn);
-
- Date getDueDate();
-
- void setDueDate(Date dueDate);
-
- long getProcessInstanceId();
-
- void setProcessInstanceId(String processInstanceId);
-
- String getProcessId();
-
- void setProcessId(String processId);
-
- long getProcessSessionId();
-
- void setProcessSessionId(long processSessionId);
-
- long getParentId();
-
- void setParentId(long parentId);
-
- String getActualOwner();
-
- void setActualOwner(String actualOwner);
-
- String getDeploymentId();
-
- void setDeploymentId(String deploymentId);
-
- long getWorkItemId();
-
- void setWorkItemId(long workItemId);
-
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/ContentMarshallerContext.java b/kie-internal/src/main/java/org/kie/internal/task/api/ContentMarshallerContext.java
deleted file mode 100644
index c8d03816faf..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/ContentMarshallerContext.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import org.kie.api.runtime.Environment;
-
-public class ContentMarshallerContext {
-
- private Environment environment;
- private ClassLoader classloader;
-
- public ContentMarshallerContext() {
-
- }
-
- public ContentMarshallerContext(Environment environment, ClassLoader classloader) {
- this.environment = environment;
- this.classloader = classloader;
- }
-
- public Environment getEnvironment() {
- return environment;
- }
- public void setEnvironment(Environment environment) {
- this.environment = environment;
- }
- public ClassLoader getClassloader() {
- return classloader;
- }
- public void setClassloader(ClassLoader classloader) {
- this.classloader = classloader;
- }
-
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/EventService.java b/kie-internal/src/main/java/org/kie/internal/task/api/EventService.java
deleted file mode 100644
index c865736248c..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/EventService.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.List;
-
-public interface EventService {
-
- void registerTaskEventListener(T listener);
-
- List getTaskEventListeners();
-
- void clearTaskEventListeners();
-
- void removeTaskEventListener(T listener);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/InternalTaskService.java b/kie-internal/src/main/java/org/kie/internal/task/api/InternalTaskService.java
deleted file mode 100644
index c56dbe8442d..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/InternalTaskService.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.kie.api.task.TaskService;
-import org.kie.api.task.model.Attachment;
-import org.kie.api.task.model.Content;
-import org.kie.api.task.model.Group;
-import org.kie.api.task.model.I18NText;
-import org.kie.api.task.model.OrganizationalEntity;
-import org.kie.api.task.model.Status;
-import org.kie.api.task.model.Task;
-import org.kie.api.task.model.TaskSummary;
-import org.kie.api.task.model.User;
-import org.kie.internal.query.QueryFilter;
-import org.kie.internal.task.api.model.ContentData;
-import org.kie.internal.task.api.model.FaultData;
-import org.kie.internal.task.api.model.SubTasksStrategy;
-import org.kie.internal.task.api.model.TaskDef;
-import org.kie.internal.task.api.model.TaskEvent;
-import org.kie.internal.task.query.TaskSummaryQueryBuilder;
-
-/**
- * The Task Service Entry Point serves as
- * facade of all the other services, providing a single entry point
- * to access to all the services
- */
-public interface InternalTaskService extends TaskService {
-
- List getTasksOwned(String userId, List status, QueryFilter filter);
-
- List getTasksAssignedAsPotentialOwner(String userId, List groupIds, List status, QueryFilter filter);
-
- void addGroup(Group group);
-
- void addUser(User user);
-
- int archiveTasks(List tasks);
-
- void deleteFault(long taskId, String userId);
-
- void deleteOutput(long taskId, String userId);
-
- void deployTaskDef(TaskDef def);
-
- List getActiveTasks();
-
- List getActiveTasks(Date since);
-
- List getAllTaskDef(String filter);
-
- List getArchivedTasks();
-
- List getCompletedTasks();
-
- List getCompletedTasks(Date since);
-
- List getCompletedTasksByProcessId(Long processId);
-
- Group getGroupById(String groupId);
-
- List getGroups();
-
- List getSubTasksAssignedAsPotentialOwner(long parentId, String userId);
-
- List getSubTasksByParent(long parentId);
-
- int getPendingSubTasksByParent(long parentId);
-
- TaskDef getTaskDefById(String id);
-
- List getTasksAssignedAsPotentialOwnerByExpirationDate(String userId, List statuses, Date expirationDate);
-
- List getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId, List statuses, Date expirationDate);
-
- List getTasksOwnedByExpirationDate(String userId, List statuses, Date expirationDate);
-
- List getTasksOwnedByExpirationDateOptional(String userId, List statuses, Date expirationDate);
-
- List getTasksAssignedAsExcludedOwner(String userId);
-
- List getTasksAssignedAsPotentialOwner(String userId, List groupIds);
-
- List getTasksAssignedAsPotentialOwnerByStatusByGroup(String userId, List groupIds, List status);
-
- List getTasksAssignedAsRecipient(String userId);
-
- List getTasksAssignedAsTaskInitiator(String userId);
-
- List getTasksAssignedAsTaskStakeholder(String userId);
-
- List getTasksOwnedByExpirationDateBeforeSpecifiedDate(String userId, List status, Date date);
-
- List getTasksByStatusByProcessInstanceIdByTaskName(String processInstanceId, List status, String taskName);
-
- Map> getPotentialOwnersForTaskIds(List taskIds);
-
- User getUserById(String userId);
-
- List getUsers();
-
- long addTask(Task task, ContentData data);
-
- void remove(long taskId, String userId);
-
- void removeGroup(String groupId);
-
- int removeTasks(List tasks);
-
- void removeUser(String userId);
-
- void setFault(long taskId, String userId, FaultData fault);
-
- void setOutput(long taskId, String userId, Object outputContentData);
-
- void setPriority(long taskId, int priority);
-
- void setTaskNames(long taskId, List taskNames);
-
- void undeployTaskDef(String id);
-
- List getTaskEventsById(long taskId);
-
- UserInfo getUserInfo();
-
- void setUserInfo(UserInfo userInfo);
-
- void addUsersAndGroups(Map users, Map groups);
-
- int removeAllTasks();
-
- long addContent(long taskId, Content content);
-
- long setDocumentContentFromUser(long taskId, String userId, byte [] byteContent);
-
- long addContent(long taskId, Map params);
-
- long addOutputContentFromUser(long taskId, String userId, Map params);
-
- Content getContentByIdForUser(long contentId, String userId );
-
- Map getOutputContentMapForUser(long taskId, String userId);
-
- void deleteContent(long taskId, long contentId);
-
- List getAllContentByTaskId(long taskId);
-
- long addAttachment(long taskId, Attachment attachment, Content content);
-
- void deleteAttachment(long taskId, long attachmentId);
-
- List getAllAttachmentsByTaskId(long taskId);
-
- void removeTaskEventsById(long taskId);
-
- OrganizationalEntity getOrganizationalEntityById(String entityId);
-
- void setDescriptions(long taskId, List descriptions);
-
- void setSkipable(long taskId, boolean skipable);
-
- void setSubTaskStrategy(long taskId, SubTasksStrategy strategy);
-
- int getPriority(long taskId);
-
- Date getExpirationDate(long taskId);
-
- List getDescriptions(long taskId);
-
- boolean isSkipable(long taskId);
-
- SubTasksStrategy getSubTaskStrategy(long taskId);
-
- Task getTaskInstanceById(long taskId);
-
- int getCompletedTaskByUserId(String userId);
-
- int getPendingTaskByUserId(String userId);
-
- List getTasksAssignedByGroup(String groupId);
-
- List getTasksAssignedByGroups(List groupIds);
-
- void addMarshallerContext(String ownerId, ContentMarshallerContext context);
-
- void removeMarshallerContext(String ownerId);
-
- ContentMarshallerContext getMarshallerContext(Task task);
-
- TaskSummaryQueryBuilder taskSummaryQuery(String userId);
-
- List getTasksAssignedAsBusinessAdministratorByStatus(String userId, String language ,List statuses);
-
- void executeReminderForTask(long taskId,String fromUser);
-
- long addContentFromUser(long taskId, String userId, Map params);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskAdminService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskAdminService.java
deleted file mode 100644
index 1b1fc0b44e9..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskAdminService.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.Date;
-import java.util.List;
-
-import org.kie.api.task.model.TaskSummary;
-
-
-/**
- * The Task Admintration Service is intended to provide
- * administrative functions such as:
- * - Remove and Archive Tasks
-
- */
-public interface TaskAdminService {
-
- public List getActiveTasks();
-
- public List getActiveTasks(Date since);
-
- public List getCompletedTasks();
-
- public List getCompletedTasks(Date since);
-
- public List getCompletedTasksByProcessId(Long processId);
-
- public int archiveTasks(List tasks);
-
- public List getArchivedTasks();
-
- public int removeTasks(List tasks);
-
- public int removeAllTasks();
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskAttachmentService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskAttachmentService.java
deleted file mode 100644
index d30721014fe..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskAttachmentService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.List;
-
-import org.kie.api.task.model.Attachment;
-import org.kie.api.task.model.Content;
-
-/**
- * The Task Attachment Service will deal with all the
- * functionality related with Task Attachments. Different
- * implementations can be provided to handle the Task Attachments.
- */
-
-public interface TaskAttachmentService {
-
- long addAttachment(long taskId, Attachment attachment, Content content);
-
- void deleteAttachment(long taskId, long attachmentId);
-
- List getAllAttachmentsByTaskId(long taskId);
-
- Attachment getAttachmentById(long attachId);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskCommentService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskCommentService.java
deleted file mode 100644
index 5b46b7444be..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskCommentService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.List;
-
-import org.kie.api.task.model.Comment;
-
-/**
- * The Task Comment Service will handle all the
- * operations related with the Comments associated with
- * a Task
- */
-public interface TaskCommentService {
-
- long addComment(long taskId, Comment comment);
-
- void deleteComment(long taskId, long commentId);
-
- List getAllCommentsByTaskId(long taskId);
-
- Comment getCommentById(long commentId);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskContentService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskContentService.java
deleted file mode 100644
index 7e4840dd77a..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskContentService.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.List;
-import java.util.Map;
-
-import org.kie.api.task.model.Content;
-import org.kie.api.task.model.Task;
-
-/**
- * The Task Content Service is intended to handle
- * the information which is stored inside a Task.
- * The information inside the Task Content represents
- * the information required for the Task to be completed.
- * This information can be divided into:
- * - Task Input: The data used by the Human Actor
- * as a context to do the job
- * - Task Output: The data entered by the Human Actor
- * as the result of the work that is being done.
- */
-
-public interface TaskContentService {
-
- long setDocumentContent(long taskId, Content content);
-
- long addOutputContent(long taskId, Map params);
-
- void deleteDocumentContent(long taskId, long contentId);
-
- List getAllContentByTaskId(long taskId);
-
- Content getContentById(long contentId);
-
- void addMarshallerContext(String ownerId, ContentMarshallerContext context);
-
- void removeMarshallerContext(String ownerId);
-
- ContentMarshallerContext getMarshallerContext(Task task);
-
- Task loadTaskVariables(Task task);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskContext.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskContext.java
deleted file mode 100644
index f8ad954910a..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskContext.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import org.kie.api.runtime.Context;
-import org.kie.api.task.UserGroupCallback;
-
-public interface TaskContext extends Context, org.kie.api.task.TaskContext {
-
- TaskPersistenceContext getPersistenceContext();
-
- void setPersistenceContext(TaskPersistenceContext context);
-
- UserGroupCallback getUserGroupCallback();
-
- void setUserId(String userId);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskDeadlinesService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskDeadlinesService.java
deleted file mode 100644
index 5582791f04f..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskDeadlinesService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.kie.api.task.model.Status;
-import org.kie.internal.task.api.model.Deadline;
-
-/**
- * The Task Deadlines Service is intended to handle
- * all the Deadlines associated with a Task
- */
-public interface TaskDeadlinesService {
-
- public enum DeadlineType {
- START(Status.Created, Status.Ready, Status.Reserved),
- END(Status.Created, Status.Ready, Status.Reserved, Status.InProgress, Status.Suspended);
- private List validStatuses;
-
- private DeadlineType(Status... statuses) {
- this.validStatuses = Arrays.asList(statuses);
- }
-
- public boolean isValidStatus(Status status) {
- return this.validStatuses.contains(status);
- }
-
- }
-
- public void schedule(long taskId, long deadlineId, long delay, DeadlineType type);
-
- public void unschedule(long taskId, DeadlineType type);
-
- void unschedule(long taskId, Deadline deadline, DeadlineType type);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskDefService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskDefService.java
deleted file mode 100644
index c8182437945..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskDefService.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.List;
-
-import org.kie.internal.task.api.model.TaskDef;
-
-/**
- * Experimental:
- * The Task Definition Service is intended to keep
- * meta information about a Task. This meta information
- * can be used as a Task Template, to reuse the same
- * template in different places without redefining the
- * Task Structure
- */
-public interface TaskDefService {
-
- public void deployTaskDef(TaskDef def);
-
- public List getAllTaskDef(String filter);
-
- public TaskDef getTaskDefById(String id);
-
- public void undeployTaskDef(String id);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskEvent.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskEvent.java
deleted file mode 100644
index e7bf0130a64..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskEvent.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-
-public interface TaskEvent extends org.kie.api.task.TaskEvent {
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskEventsService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskEventsService.java
deleted file mode 100644
index 707736bf9b7..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskEventsService.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.List;
-
-import org.kie.internal.task.api.model.TaskEvent;
-
-
-/**
- * The Task Events Service is intended to
- * provide all the functionality required to handle
- * the events that are being emitted by the module
- */
-public interface TaskEventsService {
-
- List getTaskEventsById(long taskId);
-
- void removeTaskEventsById(long taskId);
-
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskIdentityService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskIdentityService.java
deleted file mode 100644
index 25692a96659..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskIdentityService.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.List;
-
-import org.kie.api.task.model.Group;
-import org.kie.api.task.model.OrganizationalEntity;
-import org.kie.api.task.model.User;
-
-/**
- * The Task Identity Service provides all the
- * functionality related with the Organizational Entities
- * that will be handled internally by jBPM. This methods
- * will allow us to create the Mappings against external
- * identity directories to the internal inforamtion required
- * by jBPM.
- */
-public interface TaskIdentityService {
-
- public void addUser(User user);
-
- public void addGroup(Group group);
-
- public void removeGroup(String groupId);
-
- public void removeUser(String userId);
-
- public List getUsers();
-
- public List getGroups();
-
- public User getUserById(String userId);
-
- public Group getGroupById(String groupId);
-
- public OrganizationalEntity getOrganizationalEntityById(String entityId);
-
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskInstanceService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskInstanceService.java
deleted file mode 100644
index c880255e827..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskInstanceService.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.kie.api.runtime.CommandExecutor;
-import org.kie.api.task.model.Content;
-import org.kie.api.task.model.I18NText;
-import org.kie.api.task.model.OrganizationalEntity;
-import org.kie.api.task.model.Task;
-import org.kie.internal.task.api.model.ContentData;
-import org.kie.internal.task.api.model.FaultData;
-import org.kie.internal.task.api.model.Operation;
-import org.kie.internal.task.api.model.SubTasksStrategy;
-
-/**
- * The Task Instance Service is in charge of
- * handling all the actions required to interact with a
- * Task Instance. All the operations described in the WS-HT specification
- * related with the Task Lifecycle are implemented here.
- */
-public interface TaskInstanceService extends CommandExecutor {
-
- /*
- * LIFECYCLE METHODS
- */
-
- default void fireEvent(Operation operation, long taskId) {}
-
- default void fireEvent(Operation operation, Task task) {}
-
- long addTask(Task task, Map params);
-
- long addTask(Task task, ContentData data);
-
- void activate(long taskId, String userId);
-
- void claim(long taskId, String userId);
-
- void claim(long taskId, String userId, List groupIds);
-
- void claimNextAvailable(String userId);
-
- void claimNextAvailable(String userId, List groupIds);
-
- void complete(long taskId, String userId, Map data);
-
- void delegate(long taskId, String userId, String targetUserId);
-
- void exit(long taskId, String userId);
-
- void fail(long taskId, String userId, Map faultData);
-
- void forward(long taskId, String userId, String targetEntityId);
-
- void release(long taskId, String userId);
-
- void remove(long taskId, String userId);
-
- void resume(long taskId, String userId);
-
- void skip(long taskId, String userId);
-
- void start(long taskId, String userId);
-
- void stop(long taskId, String userId);
-
- void suspend(long taskId, String userId);
-
- void nominate(long taskId, String userId, List potentialOwners);
-
- void setFault(long taskId, String userId, FaultData fault);
-
- void setOutput(long taskId, String userId, Object outputContentData);
-
- void deleteFault(long taskId, String userId);
-
- void deleteOutput(long taskId, String userId);
-
- void setPriority(long taskId, int priority);
-
- void setTaskNames(long taskId, List taskNames);
-
- void setExpirationDate(long taskId, Date date);
-
- public void setDescriptions(long taskId, List descriptions);
-
- public void setSkipable(long taskId, boolean skipable);
-
- void setSubTaskStrategy(long taskId, SubTasksStrategy strategy);
-
- int getPriority(long taskId);
-
- Date getExpirationDate(long taskId);
-
- List getDescriptions(long taskId);
-
- boolean isSkipable(long taskId);
-
- SubTasksStrategy getSubTaskStrategy(long taskId);
-
- void setName(long taskId, String name);
-
- void setDescription(long taskId, String description);
-
- void setSubject(long taskId, String subject);
-
- long addOutputContentFromUser(long taskId, String userId, Map params);
-
- Content getContentByIdForUser( long contentId, String userId );
-
- Map getContentMapForUser( Long taskId, String userId );
-
-
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskModelFactory.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskModelFactory.java
deleted file mode 100644
index f0536b70af3..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskModelFactory.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import org.kie.api.task.model.Attachment;
-import org.kie.api.task.model.Comment;
-import org.kie.api.task.model.Content;
-import org.kie.api.task.model.Email;
-import org.kie.api.task.model.Group;
-import org.kie.api.task.model.I18NText;
-import org.kie.api.task.model.OrganizationalEntity;
-import org.kie.api.task.model.PeopleAssignments;
-import org.kie.api.task.model.Task;
-import org.kie.api.task.model.TaskData;
-import org.kie.api.task.model.TaskSummary;
-import org.kie.api.task.model.User;
-import org.kie.internal.task.api.model.BooleanExpression;
-import org.kie.internal.task.api.model.ContentData;
-import org.kie.internal.task.api.model.Deadline;
-import org.kie.internal.task.api.model.DeadlineSummary;
-import org.kie.internal.task.api.model.Deadlines;
-import org.kie.internal.task.api.model.Delegation;
-import org.kie.internal.task.api.model.EmailNotification;
-import org.kie.internal.task.api.model.EmailNotificationHeader;
-import org.kie.internal.task.api.model.Escalation;
-import org.kie.internal.task.api.model.FaultData;
-import org.kie.internal.task.api.model.Language;
-import org.kie.internal.task.api.model.Notification;
-import org.kie.internal.task.api.model.Reassignment;
-import org.kie.internal.task.api.model.TaskDef;
-
-public interface TaskModelFactory {
-
- Attachment newAttachment();
-
- BooleanExpression newBooleanExpression();
-
- Comment newComment();
-
- ContentData newContentData();
-
- Content newContent();
-
- Deadline newDeadline();
-
- DeadlineSummary newDeadlineSummary();
-
- Deadlines newDeadlines();
-
- Delegation newDelegation();
-
- EmailNotificationHeader newEmailNotificationHeader();
-
- EmailNotification newEmialNotification();
-
- Escalation newEscalation();
-
- FaultData newFaultData();
-
- Group newGroup();
-
- Group newGroup(String id);
-
- I18NText newI18NText();
-
- Language newLanguage();
-
- Notification newNotification();
-
- OrganizationalEntity newOrgEntity();
-
- PeopleAssignments newPeopleAssignments();
-
- Reassignment newReassignment();
-
- TaskData newTaskData();
-
- TaskDef newTaskDef();
-
- Task newTask();
-
- TaskSummary newTaskSummary();
-
- User newUser();
-
- User newUser(String id);
-
- Email newEmail();
-
- Email newEmail(String id);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskModelProvider.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskModelProvider.java
deleted file mode 100644
index 84086dbbad8..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskModelProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import org.kie.api.internal.utils.KieService;
-
-public class TaskModelProvider {
-
- private static class LazyHolder {
- private static final TaskModelProviderService provider = KieService.load(TaskModelProviderService.class);
- }
-
- public static TaskModelFactory getFactory() {
- return getTaskModelProviderService().getTaskModelFactory();
- }
-
- public static TaskModelProviderService getTaskModelProviderService() {
- return LazyHolder.provider;
- }
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskModelProviderService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskModelProviderService.java
deleted file mode 100644
index d8ae06a7105..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskModelProviderService.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import org.kie.api.internal.utils.KieService;
-
-public interface TaskModelProviderService extends KieService {
-
- TaskModelFactory getTaskModelFactory();
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskPersistenceContext.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskPersistenceContext.java
deleted file mode 100644
index bd01b941ca0..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskPersistenceContext.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.kie.api.task.UserGroupCallback;
-import org.kie.api.task.model.Attachment;
-import org.kie.api.task.model.Comment;
-import org.kie.api.task.model.Content;
-import org.kie.api.task.model.Email;
-import org.kie.api.task.model.Group;
-import org.kie.api.task.model.OrganizationalEntity;
-import org.kie.api.task.model.Task;
-import org.kie.api.task.model.TaskSummary;
-import org.kie.api.task.model.User;
-import org.kie.internal.task.api.model.ContentData;
-import org.kie.internal.task.api.model.Deadline;
-import org.kie.internal.task.api.model.FaultData;
-
-public interface TaskPersistenceContext {
-
- Task findTask(Long taskId);
-
- Task persistTask(Task task);
-
- Task updateTask(Task task);
-
- Task removeTask(Task task);
-
- Group findGroup(String groupId);
-
- Group persistGroup(Group group);
-
- Group updateGroup(Group group);
-
- Group removeGroup(Group group);
-
- User findUser(String userId);
-
- User persistUser(User user);
-
- User updateUser(User user);
-
- User removeUser(User user);
-
- OrganizationalEntity findOrgEntity(String orgEntityId);
-
- OrganizationalEntity persistOrgEntity(OrganizationalEntity orgEntity);
-
- OrganizationalEntity updateOrgEntity(OrganizationalEntity orgEntity);
-
- OrganizationalEntity removeOrgEntity(OrganizationalEntity orgEntity);
-
- Content findContent(Long contentId);
-
- Content persistContent(Content content);
-
- Content updateContent(Content content);
-
- Content removeContent(Content content);
-
- Long findTaskIdByContentId(Long contentId);
-
- Attachment findAttachment(Long attachmentId);
-
- Attachment persistAttachment(Attachment attachment);
-
- Attachment updateAttachment(Attachment attachment);
-
- Attachment removeAttachment(Attachment attachment);
-
- Attachment removeAttachmentFromTask(Task task, long attachmentId);
-
- Attachment addAttachmentToTask(Attachment attachment, Task task);
-
- Comment findComment(Long commentId);
-
- Comment persistComment(Comment comment);
-
- Comment updateComment(Comment comment);
-
- Comment removeComment(Comment comment);
-
- Comment removeCommentFromTask(Comment comment, Task task);
-
- Comment addCommentToTask(Comment comment, Task task);
-
- Deadline findDeadline(Long deadlineId);
-
- Deadline persistDeadline(Deadline deadline);
-
- Deadline updateDeadline(Deadline deadline);
-
- Deadline removeDeadline(Deadline deadline);
-
- Task setDocumentToTask(Content content, ContentData contentData, Task task);
-
- Task setFaultToTask(Content content, FaultData faultData, Task task);
-
- Task setOutputToTask(Content content, ContentData contentData, Task task);
-
-
- /*
- * Query related methods
- */
-
- T queryWithParametersInTransaction(String queryName, Map params, Class clazz);
-
- T queryWithParametersInTransaction(String queryName, boolean singleResult, Map params, Class clazz);
-
- T queryAndLockWithParametersInTransaction(String queryName, Map params, boolean singleResult, Class clazz);
-
- T queryInTransaction(String queryName, Class clazz);
-
- T queryStringInTransaction(String queryString, Class clazz );
-
- T queryStringWithParametersInTransaction(String queryString, boolean singleResult, Map params, Class clazz );
-
- T queryStringWithParametersInTransaction(String queryString, Map params, Class clazz );
-
- T queryAndLockStringWithParametersInTransaction(String queryName, Map params, boolean singleResult, Class clazz);
-
- int executeUpdateString(String updateString);
-
- int executeUpdate(String queryName, Map params);
-
- HashMap addParametersToMap(Object ... parameterValues);
-
- /*
- * Following are optional methods that are more like extension to
- * default data model to allow flexible add-ons
- */
- T persist(T object);
-
- T find(Class entityClass, Object primaryKey);
-
- T remove(T entity);
-
- T merge(T entity);
-
- /*
- * life cycle methods
- */
- boolean isOpen();
-
- void joinTransaction();
-
- void close();
-
- /*
- * JPA Query methods
- */
-
- List doTaskSummaryCriteriaQuery(String userId, UserGroupCallback userGroupCallback, Object queryWhere);
-
- Email findEmail(String emailId);
-
- Email persistEmail(Email email);
-
- Email updateEmail(Email email);
-
- Email removeEmail(Email email);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskQueryService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskQueryService.java
deleted file mode 100644
index af12921562b..00000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskQueryService.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.kie.internal.task.api;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.kie.api.task.model.OrganizationalEntity;
-import org.kie.api.task.model.Status;
-import org.kie.api.task.model.Task;
-import org.kie.api.task.model.TaskSummary;
-import org.kie.internal.query.QueryFilter;
-
-
-/**
- * The Task Query Service will contain all the methods
- * to get information about the current Task Instances.
- * Most of the times these methods will be used to build
- * User Interfaces, and we should not include any method
- * related with Task Statistics here.
- */
-public interface TaskQueryService {
-
- List getTasksAssignedAsPotentialOwner(String userId, List groupIds, List status, QueryFilter filter);
-
- List getTasksOwned(String userId, List status, QueryFilter filter);
-
- List getTasksAssignedAsPotentialOwner(String userId, List groupIds);
-
- List getTasksAssignedAsBusinessAdministrator(String userId, List groupIds);
-
- List getTasksAssignedAsBusinessAdministratorByStatus(String userId, List groupIds, List status);
-
- List getTasksAssignedAsExcludedOwner(String userId);
-
- List getTasksAssignedAsPotentialOwnerByExpirationDate(String userId, List groupIds, List status, Date expirationDate);
-
- List getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId, List groupIds, List status, Date expirationDate);
-
- List getTasksAssignedAsPotentialOwnerByExpirationDate(String userId, List status, Date expirationDate);
-
- List getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId, List status, Date expirationDate);
-
- List getTasksAssignedAsPotentialOwner(String userId, List groupIds, int firstResult, int maxResults);
-
- List getTasksAssignedAsPotentialOwnerByStatus(String userId, List status);
-
- List getTasksAssignedAsPotentialOwnerByStatusByGroup(String userId, List groupIds, List status);
-
- List getTasksAssignedAsRecipient(String userId);
-
- List getTasksAssignedAsTaskInitiator(String userId);
-
- List getTasksAssignedAsTaskStakeholder(String userId);
-
- List getTasksAssignedByGroup(String groupId);
-
- List getTasksAssignedByGroups(List groupsId);
-
- List getTasksAssignedByGroupsByExpirationDate(List groupIds, Date expirationDate);
-
- List getTasksAssignedByGroupsByExpirationDateOptional(List groupIds, Date expirationDate);
-
- List