This is an automated email from the ASF dual-hosted git repository.
porcelli pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-drools.git
The following commit(s) were added to refs/heads/main by this push:
new 3dc985a3a5 [kie-issues-249] Data index improvements (#5529)
3dc985a3a5 is described below
commit 3dc985a3a5702fa6ba130c16f34cb687f50c2bc0
Author: Enrique <[email protected]>
AuthorDate: Wed Oct 18 19:26:37 2023 +0200
[kie-issues-249] Data index improvements (#5529)
---
.../org/kie/api/event/usertask/Attachment.java | 37 +++++++++++++
.../java/org/kie/api/event/usertask/Comment.java | 34 ++++++++++++
.../event/usertask/UserTaskAssignmentEvent.java | 30 +++++++++++
.../event/usertask/UserTaskAttachmentEvent.java | 28 ++++++++++
.../api/event/usertask/UserTaskCommentEvent.java | 28 ++++++++++
.../api/event/usertask/UserTaskDeadlineEvent.java | 56 +++++++++++++++++++
.../org/kie/api/event/usertask/UserTaskEvent.java | 62 ++++++++++++++++++++++
.../kie/api/event/usertask/UserTaskStateEvent.java | 26 +++++++++
.../api/event/usertask/UserTaskVariableEvent.java | 34 ++++++++++++
.../kie/api/runtime/process/ProcessInstance.java | 2 +
10 files changed, 337 insertions(+)
diff --git a/kie-api/src/main/java/org/kie/api/event/usertask/Attachment.java
b/kie-api/src/main/java/org/kie/api/event/usertask/Attachment.java
new file mode 100644
index 0000000000..ded0ce0df2
--- /dev/null
+++ b/kie-api/src/main/java/org/kie/api/event/usertask/Attachment.java
@@ -0,0 +1,37 @@
+/*
+ * 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.event.usertask;
+
+import java.net.URI;
+import java.util.Date;
+
+public interface Attachment {
+
+ String getAttachmentId();
+
+ String getAttachmentName();
+
+ URI getAttachmentURI();
+
+ String getUpdatedBy();
+
+ Date getUpdatedAt();
+
+}
diff --git a/kie-api/src/main/java/org/kie/api/event/usertask/Comment.java
b/kie-api/src/main/java/org/kie/api/event/usertask/Comment.java
new file mode 100644
index 0000000000..004d3e7d6e
--- /dev/null
+++ b/kie-api/src/main/java/org/kie/api/event/usertask/Comment.java
@@ -0,0 +1,34 @@
+/*
+ * 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.event.usertask;
+
+import java.util.Date;
+
+public interface Comment {
+
+ String getCommentId();
+
+ String getCommentContent();
+
+ String getUpdatedBy();
+
+ Date getUpdatedAt();
+
+}
diff --git
a/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskAssignmentEvent.java
b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskAssignmentEvent.java
new file mode 100644
index 0000000000..01d460e0dd
--- /dev/null
+++
b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskAssignmentEvent.java
@@ -0,0 +1,30 @@
+/*
+ * 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.event.usertask;
+
+public interface UserTaskAssignmentEvent extends UserTaskEvent {
+
+ String getAssignmentType();
+
+ String[] getNewUsersId();
+
+ String[] getOldUsersId();
+
+}
diff --git
a/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskAttachmentEvent.java
b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskAttachmentEvent.java
new file mode 100644
index 0000000000..9f82c73605
--- /dev/null
+++
b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskAttachmentEvent.java
@@ -0,0 +1,28 @@
+/*
+ * 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.event.usertask;
+
+public interface UserTaskAttachmentEvent extends UserTaskEvent {
+
+ Attachment getOldAttachment();
+
+ Attachment getNewAttachment();
+
+}
diff --git
a/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskCommentEvent.java
b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskCommentEvent.java
new file mode 100644
index 0000000000..b51eb3e6bd
--- /dev/null
+++ b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskCommentEvent.java
@@ -0,0 +1,28 @@
+/*
+ * 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.event.usertask;
+
+public interface UserTaskCommentEvent extends UserTaskEvent {
+
+ Comment getOldComment();
+
+ Comment getNewComment();
+
+}
diff --git
a/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskDeadlineEvent.java
b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskDeadlineEvent.java
new file mode 100644
index 0000000000..c1c46b7a1d
--- /dev/null
+++
b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskDeadlineEvent.java
@@ -0,0 +1,56 @@
+/*
+ * 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.event.usertask;
+
+import java.util.Map;
+
+import org.kie.api.runtime.process.WorkItem;
+
+/**
+ * An event when a dealine for task has expired
+ */
+public interface UserTaskDeadlineEvent extends UserTaskEvent {
+
+ enum DeadlineType {
+ Started,
+ Completed
+ }
+
+ /**
+ * Returns work item which timeout expires
+ *
+ * @return work item
+ */
+ WorkItem getWorkItem();
+
+ /**
+ * Returns notification data
+ *
+ * @return key-value pair list
+ */
+ Map<String, Object> getNotification();
+
+ /**
+ * Returns dealine type
+ *
+ * @return not started or not completed
+ */
+ DeadlineType getType();
+}
\ No newline at end of file
diff --git
a/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskEvent.java
b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskEvent.java
new file mode 100644
index 0000000000..8f45c48b90
--- /dev/null
+++ b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskEvent.java
@@ -0,0 +1,62 @@
+/*
+ * 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.event.usertask;
+
+import java.util.Date;
+
+import org.kie.api.event.KieRuntimeEvent;
+import org.kie.api.runtime.process.NodeInstance;
+import org.kie.api.runtime.process.ProcessInstance;
+import org.kie.api.runtime.process.WorkItem;
+
+/**
+ * A runtime event related to the execution of process instances.
+ */
+public interface UserTaskEvent
+ extends
+ KieRuntimeEvent {
+
+ /**
+ * The ProcessInstance this event relates to.
+ *
+ * @return the process instance
+ */
+ ProcessInstance getProcessInstance();
+
+ NodeInstance getNodeInstance();
+
+ WorkItem getWorkItem();
+
+ String getUserTaskId();
+
+ String getUserTaskDefinitionId();
+
+ /**
+ * Returns exact date when the event was created
+ * @return time when event was created
+ */
+ Date getEventDate();
+
+ /**
+ * @return associated identity that performed the event
+ */
+ String getEventUser();
+
+}
diff --git
a/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskStateEvent.java
b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskStateEvent.java
new file mode 100644
index 0000000000..41c2ecf021
--- /dev/null
+++ b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskStateEvent.java
@@ -0,0 +1,26 @@
+/*
+ * 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.event.usertask;
+
+public interface UserTaskStateEvent extends UserTaskEvent {
+
+
+
+}
diff --git
a/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskVariableEvent.java
b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskVariableEvent.java
new file mode 100644
index 0000000000..a7dab82d79
--- /dev/null
+++
b/kie-api/src/main/java/org/kie/api/event/usertask/UserTaskVariableEvent.java
@@ -0,0 +1,34 @@
+/*
+ * 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.event.usertask;
+
+public interface UserTaskVariableEvent extends UserTaskEvent {
+
+ enum VariableEventType {
+ INPUT, OUTPUT
+ }
+
+ String getVariableName();
+
+ Object getOldValue();
+
+ Object getNewValue();
+
+ VariableEventType getVariableType();
+}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/process/ProcessInstance.java
b/kie-api/src/main/java/org/kie/api/runtime/process/ProcessInstance.java
index 7d46c14a1b..68789b07de 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/process/ProcessInstance.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/process/ProcessInstance.java
@@ -89,4 +89,6 @@ public interface ProcessInstance
*/
String getParentProcessInstanceId();
+ String getProcessVersion();
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]