You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by eg...@apache.org on 2024/04/08 06:27:05 UTC

(incubator-kie-drools) branch main updated: [incubator-kie-issues-861] PIM for kogito workflow / remove unused kie api / kie internal api (#5685)

This is an automated email from the ASF dual-hosted git repository.

egonzalez 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 6f8b727aa4 [incubator-kie-issues-861] PIM for kogito workflow / remove unused kie api / kie internal api (#5685)
6f8b727aa4 is described below

commit 6f8b727aa4bca9422e104fbd413b578c34310969
Author: Enrique <en...@ibm.com>
AuthorDate: Mon Apr 8 08:27:00 2024 +0200

    [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
---
 .../org/drools/core/process/ProcessContext.java    |  20 --
 .../java/org/drools/core/process/WorkItem.java     |   6 +-
 .../org/drools/core/process/impl/WorkItemImpl.java |   9 +-
 .../org/drools/kiesession/ProcessContextTest.java  | 182 -------------
 .../org/kie/api/cluster/ClusterAwareService.java   |  63 -----
 .../java/org/kie/api/cluster/ClusterListener.java  |  27 --
 .../main/java/org/kie/api/cluster/ClusterNode.java |  73 -----
 .../org/kie/api/definition/process/Connection.java |   2 +-
 .../java/org/kie/api/definition/process/Node.java  |  14 +-
 .../kie/api/definition/process/NodeContainer.java  |   2 +-
 .../api/definition/process/WorkflowElement.java    |  21 +-
 .../process/WorkflowElementIdentifier.java         |  30 +-
 .../api/event/process/ProcessEventListener.java    |   5 +
 .../api/event/process/ProcessMigrationEvent.java   |  11 +-
 .../kie/api/persistence/ObjectStoringStrategy.java |  52 ----
 .../java/org/kie/api/runtime/manager/Context.java  |  36 ---
 .../runtime/manager/RegisterableItemsFactory.java  |  89 ------
 .../org/kie/api/runtime/manager/RuntimeEngine.java |  52 ----
 .../api/runtime/manager/RuntimeEnvironment.java    |  83 ------
 .../runtime/manager/RuntimeEnvironmentBuilder.java | 127 ---------
 .../manager/RuntimeEnvironmentBuilderFactory.java  | 143 ----------
 .../kie/api/runtime/manager/RuntimeManager.java    |  98 -------
 .../api/runtime/manager/RuntimeManagerFactory.java | 162 -----------
 .../api/runtime/manager/audit/AuditService.java    | 127 ---------
 .../api/runtime/manager/audit/NodeInstanceLog.java | 129 ---------
 .../runtime/manager/audit/ProcessInstanceLog.java  | 115 --------
 .../runtime/manager/audit/VariableInstanceLog.java |  70 -----
 .../kie/api/runtime/process/CaseAssignment.java    |  71 -----
 .../java/org/kie/api/runtime/process/CaseData.java |  62 -----
 .../org/kie/api/runtime/process/NodeInstance.java  |   3 +-
 .../kie/api/runtime/process/ProcessContext.java    |   4 -
 .../api/runtime/query/AdvancedQueryContext.java    |  70 -----
 .../org/kie/api/runtime/query/QueryContext.java    | 117 --------
 .../main/java/org/kie/api/task/TaskContext.java    |  44 ---
 .../src/main/java/org/kie/api/task/TaskEvent.java  |  35 ---
 .../kie/api/task/TaskLifeCycleEventListener.java   |  81 ------
 .../main/java/org/kie/api/task/TaskService.java    | 113 --------
 .../java/org/kie/api/task/UserGroupCallback.java   |  45 ---
 .../src/main/java/org/kie/api/task/UserInfo.java   |  38 ---
 .../java/org/kie/api/task/model/Attachment.java    |  40 ---
 .../main/java/org/kie/api/task/model/Comment.java  |  35 ---
 .../main/java/org/kie/api/task/model/Content.java  |  29 --
 .../main/java/org/kie/api/task/model/Email.java    |  24 --
 .../main/java/org/kie/api/task/model/Group.java    |  24 --
 .../main/java/org/kie/api/task/model/I18NText.java |  31 ---
 .../kie/api/task/model/OrganizationalEntity.java   |  27 --
 .../org/kie/api/task/model/PeopleAssignments.java  |  33 ---
 .../org/kie/api/task/model/QuickTaskSummary.java   |  52 ----
 .../main/java/org/kie/api/task/model/Status.java   |  27 --
 .../src/main/java/org/kie/api/task/model/Task.java |  54 ----
 .../main/java/org/kie/api/task/model/TaskData.java |  78 ------
 .../java/org/kie/api/task/model/TaskSummary.java   |  48 ----
 .../src/main/java/org/kie/api/task/model/User.java |  23 --
 .../internal/process/ProcessVariableIndexer.java   |  31 ---
 .../query/ExtendedParametrizedQueryBuilder.java    |  62 -----
 .../kie/internal/query/InternalQueryService.java   |  28 --
 .../org/kie/internal/query/ParametrizedQuery.java  |  46 ----
 .../internal/query/ParametrizedQueryBuilder.java   | 194 -------------
 .../org/kie/internal/query/ParametrizedUpdate.java |  24 --
 .../query/ProcessInstanceIdQueryBuilder.java       |  55 ----
 .../java/org/kie/internal/query/QueryContext.java  |  52 ----
 .../java/org/kie/internal/query/QueryFilter.java   | 111 --------
 .../internal/query/QueryParameterIdentifiers.java  | 154 -----------
 .../org/kie/internal/query/data/QueryData.java     |  57 ----
 .../kie/internal/query/data/QueryParameters.java   | 298 --------------------
 .../kie/internal/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 ---
 .../kie/internal/runtime/manager/CacheManager.java |  56 ----
 .../kie/internal/runtime/manager/Disposable.java   |  39 ---
 .../internal/runtime/manager/DisposeListener.java  |  35 ---
 .../runtime/manager/EventListenerProducer.java     |  51 ----
 .../internal/runtime/manager/GlobalProducer.java   |  50 ----
 .../runtime/manager/InternalRuntimeEngine.java     |  35 ---
 .../org/kie/internal/runtime/manager/Mapper.java   |  63 -----
 .../runtime/manager/RuntimeEnvironment.java        |  34 ---
 .../runtime/manager/RuntimeManagerFactory.java     |  72 -----
 .../runtime/manager/RuntimeManagerIdFilter.java    |  36 ---
 .../runtime/manager/RuntimeManagerRegistry.java    |  75 -----
 .../internal/runtime/manager/SessionFactory.java   |  53 ----
 .../runtime/manager/TaskServiceFactory.java        |  39 ---
 .../runtime/manager/WorkItemHandlerProducer.java   |  53 ----
 .../audit/query/AuditDateDeleteBuilder.java        |  52 ----
 .../manager/audit/query/AuditDeleteBuilder.java    |  80 ------
 .../manager/audit/query/AuditLogQueryBuilder.java  |  59 ----
 .../audit/query/ErrorInfoDeleteBuilder.java        |  24 --
 .../audit/query/NodeInstanceLogDeleteBuilder.java  |  59 ----
 .../audit/query/NodeInstanceLogQueryBuilder.java   |  85 ------
 .../manager/audit/query/ProcessIdQueryBuilder.java |  40 ---
 .../query/ProcessInstanceLogDeleteBuilder.java     | 115 --------
 .../query/ProcessInstanceLogQueryBuilder.java      | 141 ----------
 .../query/VariableInstanceLogDeleteBuilder.java    |  32 ---
 .../query/VariableInstanceLogQueryBuilder.java     | 104 -------
 .../runtime/manager/context/CaseContext.java       |  57 ----
 .../manager/context/CorrelationKeyContext.java     |  68 -----
 .../runtime/manager/context/EmptyContext.java      |  55 ----
 .../manager/context/ProcessInstanceIdContext.java  |  72 -----
 .../java/org/kie/internal/task/api/AuditTask.java  |  89 ------
 .../task/api/ContentMarshallerContext.java         |  51 ----
 .../org/kie/internal/task/api/EventService.java    |  32 ---
 .../kie/internal/task/api/InternalTaskService.java | 218 ---------------
 .../kie/internal/task/api/TaskAdminService.java    |  52 ----
 .../internal/task/api/TaskAttachmentService.java   |  41 ---
 .../kie/internal/task/api/TaskCommentService.java  |  39 ---
 .../kie/internal/task/api/TaskContentService.java  |  58 ----
 .../org/kie/internal/task/api/TaskContext.java     |  34 ---
 .../internal/task/api/TaskDeadlinesService.java    |  54 ----
 .../org/kie/internal/task/api/TaskDefService.java  |  42 ---
 .../java/org/kie/internal/task/api/TaskEvent.java  |  24 --
 .../kie/internal/task/api/TaskEventsService.java   |  38 ---
 .../kie/internal/task/api/TaskIdentityService.java |  56 ----
 .../kie/internal/task/api/TaskInstanceService.java | 135 ---------
 .../kie/internal/task/api/TaskModelFactory.java    | 107 --------
 .../kie/internal/task/api/TaskModelProvider.java   |  37 ---
 .../task/api/TaskModelProviderService.java         |  27 --
 .../internal/task/api/TaskPersistenceContext.java  | 183 -------------
 .../kie/internal/task/api/TaskQueryService.java    | 118 --------
 .../internal/task/api/TaskStatisticsService.java   |  32 ---
 .../org/kie/internal/task/api/TaskVariable.java    |  91 -------
 .../kie/internal/task/api/TaskVariableIndexer.java |  29 --
 .../kie/internal/task/api/UserGroupCallback.java   |  23 --
 .../java/org/kie/internal/task/api/UserInfo.java   |  40 ---
 .../internal/task/api/assignment/Assignment.java   |  80 ------
 .../task/api/assignment/AssignmentStrategy.java    |  59 ----
 .../kie/internal/task/api/model/AccessType.java    |  29 --
 .../internal/task/api/model/AllowedToDelegate.java |  26 --
 .../internal/task/api/model/BooleanExpression.java |  38 ---
 .../kie/internal/task/api/model/CommandName.java   | 117 --------
 .../kie/internal/task/api/model/ContentData.java   |  40 ---
 .../org/kie/internal/task/api/model/Deadline.java  |  50 ----
 .../internal/task/api/model/DeadlineSummary.java   |  36 ---
 .../org/kie/internal/task/api/model/Deadlines.java |  35 ---
 .../kie/internal/task/api/model/Delegation.java    |  37 ---
 .../internal/task/api/model/EmailNotification.java |  32 ---
 .../task/api/model/EmailNotificationHeader.java    |  52 ----
 .../kie/internal/task/api/model/Escalation.java    |  46 ----
 .../org/kie/internal/task/api/model/FaultData.java |  29 --
 .../task/api/model/InternalAttachment.java         |  49 ----
 .../internal/task/api/model/InternalComment.java   |  37 ---
 .../internal/task/api/model/InternalContent.java   |  29 --
 .../internal/task/api/model/InternalI18NText.java  |  31 ---
 .../api/model/InternalOrganizationalEntity.java    |  27 --
 .../task/api/model/InternalPeopleAssignments.java  |  48 ----
 .../kie/internal/task/api/model/InternalTask.java  |  68 -----
 .../internal/task/api/model/InternalTaskData.java  | 162 -----------
 .../task/api/model/InternalTaskSummary.java        |  71 -----
 .../org/kie/internal/task/api/model/Language.java  |  30 --
 .../kie/internal/task/api/model/Notification.java  |  63 -----
 .../internal/task/api/model/NotificationEvent.java |  67 -----
 .../internal/task/api/model/NotificationType.java  |  23 --
 .../org/kie/internal/task/api/model/Operation.java |  40 ---
 .../kie/internal/task/api/model/Reassignment.java  |  41 ---
 .../internal/task/api/model/SubTasksStrategy.java  |  26 --
 .../org/kie/internal/task/api/model/TaskDef.java   |  38 ---
 .../org/kie/internal/task/api/model/TaskEvent.java |  53 ----
 .../task/api/prediction/PredictionOutcome.java     |  85 ------
 .../task/api/prediction/PredictionService.java     |  50 ----
 .../task/query/AuditTaskDeleteBuilder.java         |  35 ---
 .../internal/task/query/AuditTaskQueryBuilder.java | 201 --------------
 .../internal/task/query/TaskAuditQueryBuilder.java |  52 ----
 .../task/query/TaskEventDeleteBuilder.java         |  28 --
 .../internal/task/query/TaskEventQueryBuilder.java | 132 ---------
 .../task/query/TaskSummaryQueryBuilder.java        | 296 --------------------
 .../task/query/TaskVariableDeleteBuilder.java      |  28 --
 .../task/query/TaskVariableQueryBuilder.java       | 133 ---------
 .../kie/internal/utils/NotificationPublisher.java  |  63 -----
 170 files changed, 54 insertions(+), 10682 deletions(-)

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 f866cd609d..da3567ed9c 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 @@ package org.drools.core.process;
 
 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 9fdef51c6d..1f65717c7f 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 @@ package org.drools.core.process;
 
 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 1a080ceeaa..c5f02fbedc 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.Iterator;
 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 class WorkItemImpl implements WorkItem, Serializable {
         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 3820ecf159..0000000000
--- 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<OrganizationalEntity> 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<String, Object> 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<String, Object> data = new HashMap<>();
-        private Map<String, OrganizationalEntity> 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<OrganizationalEntity> getAssignments(String roleName) {
-            OrganizationalEntity entity = assignment.get(roleName);
-            if (entity == null) {
-                return Collections.emptyList();
-            }
-
-            return List.of(entity);
-        }
-
-        @Override
-        public Collection<String> getRoles() {
-            return assignment.keySet();
-        }
-
-        @Override
-        public Map<String, Object> 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 e205821e59..0000000000
--- 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<ClusterNode> getActiveClusterNodes();
-
-    <T> void removeData(String key, String partition, T value);
-
-    <T> void addData(String key, String partition, T value);
-
-    <T> List<T> getData(String key);
-
-    <T> List<T> 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 ede4c5892b..0000000000
--- 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 cd68aaf4ea..0000000000
--- 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 32fd57cb1a..7c53ec6f04 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 @@ import java.util.Map;
 /**
  * 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 68e4830d04..79f9233dbd 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 @@ import java.util.Map;
  * 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 46f2f5ca3c..86405c1b99 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 32a32ba026..475eb015b2 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 72e0e16cf4..c2d7f5143f 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<WorkflowElementIdentifier> {
 
-    public SessionNotFoundException(String message, Throwable cause) {
-        super(message, cause);
-    }
+    <T> 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 085f7a34a3..6ad3c467c1 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 @@ public interface ProcessEventListener
      */
     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 f62ecca7da..b57ca5475f 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<T> {
+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 4a9cdb6379..0000000000
--- 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 ecbd53e67c..0000000000
--- 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 <code>RuntimeManager</code> that is then relying on the context to look up correct
- * instances of <code>RuntimeEngine</code>.
- *
- * @param <T> - represents the actual type of data context implements as an identifier
- */
-public interface Context<T> {
-
-    /**
-     * 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 0bfefd0447..0000000000
--- 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 <code>RuntimeManager</code> to configure <code>RuntimeEngine</code>
- * (especially KieSession) with various registerable items:
- * <ul>
- *  <li>Work item handlers</li>
- *  <li>Process event listeners</li>
- *  <li>Agenda event listeners</li>
- *  <li>Working memory event listeners</li>
- * </ul>
- * Implementations of this interface shall decide what shall be registered for given <code>RuntimeEngine</code>.
- * If there are any needs to be bound handlers or listeners to eny parts of runtime engine these can be obtained:
- * <ul>
- *  <li>KieSession</li>
- *  <li>TaskService</li>
- * </ul>
- * Although it's possible to get individual instance from runtime engine it's recommended to use <code>RuntimeEngine</code>
- * instance instead to allow most flexible behavior.
- */
-public interface RegisterableItemsFactory {
-
-    /**
-     * Returns new instances of <code>WorkItemHandler</code> that will be registered on <code>RuntimeEngine</code>
-     * @param runtime provides <code>RuntimeEngine</code> 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<String, WorkItemHandler> getWorkItemHandlers(RuntimeEngine runtime);
-
-    /**
-     * Returns new instances of <code>ProcessEventListener</code> that will be registered on <code>RuntimeEngine</code>
-     * @param runtime provides <code>RuntimeEngine</code> 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<ProcessEventListener> getProcessEventListeners(RuntimeEngine runtime);
-
-    /**
-     * Returns new instances of <code>AgendaEventListener</code> that will be registered on <code>RuntimeEngine</code>
-     * @param runtime provides <code>RuntimeEngine</code> 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<AgendaEventListener> getAgendaEventListeners(RuntimeEngine runtime);
-
-    /**
-     * Returns new instances of <code>RuleRuntimeEventListener</code> that will be registered on <code>RuntimeEngine</code>
-     * @param runtime provides <code>RuntimeEngine</code> 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<RuleRuntimeEventListener> getRuleRuntimeEventListeners(RuntimeEngine runtime);
-
-    /**
-     * Returns globals that shall be registered on <code>KieSession</code>.
-     * @param runtime provides <code>RuntimeEngine</code> 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<String, Object> getGlobals(RuntimeEngine runtime);
-
-    /**
-     * @return new instances of <code>TaskLifeCycleEventListener</code> that will be registered on <code>RuntimeEngine</code>.
-     */
-    List<TaskLifeCycleEventListener> 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 7124d7d9cc..0000000000
--- 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.<br>
- * RuntimeEngines are always produced by <code>RuntimeManager</code> and thus shall never be
- * created manually. <code>RuntimeManager</code> provides all required information to build
- * and bootstrap the <code>RuntimeEngine</code> so it is configured and ready to be used
- * regardless of when it is invoked.
- */
-public interface RuntimeEngine {
-
-    /**
-     * @return <code>KieSession</code> configured for this <code>RuntimeEngine</code>
-     */
-    KieSession getKieSession();
-
-    /**
-     * @return <code>TaskService</code> configured for this <code>RuntimeEngine</code>
-     */
-    TaskService getTaskService();
-
-    /**
-     * @return <code>AuditService</code> 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 444ea30410..0000000000
--- 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 <code>RuntimeManager</code>.
- * <code>RuntimeEnvironment</code> delivers all information to the runtime manager to be able to properly
- * configure and bootstrap the manager and then runtime engine instances.<br>
- * It shall be considered as template of the configuration used by the manager that is read only and shall
- * not be changed once <code>RuntimeManager</code> has been created.
- */
-public interface RuntimeEnvironment {
-
-    /**
-     * @return <code>KieBase</code> that shall be used by the manager
-     */
-    KieBase getKieBase();
-
-    /**
-     * @return environment that shall be used to create instances of <code>KieSession</code>
-     */
-    Environment getEnvironment();
-
-    /**
-     * @return KieSession configuration that shall be used to create instances of <code>KieSession</code>
-     */
-    KieSessionConfiguration getConfiguration();
-
-    /**
-     * @return indicates if persistence shall be used for the KieSession instances
-     */
-    boolean usePersistence();
-
-    /**
-     * @return concrete implementation of <code>RegisterableItemsFactory</code> to obtain handlers and listeners
-     * that shall be registered on instances of <code>KieSession</code>
-     */
-    RegisterableItemsFactory getRegisterableItemsFactory();
-
-    /**
-     * @return concrete implementation of <code>UserGroupCallback</code> that shall be registered on instances
-     * of <code>TaskService</code> for managing users and groups.
-     */
-    UserGroupCallback getUserGroupCallback();
-
-    /**
-     * @return concrete implementation of <code>UserInfo</code> that shall be registered on instances
-     * of <code>TaskService</code> 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 b13582730b..0000000000
--- 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 8e4502c9d1..0000000000
--- 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 <code>RuntimeEnvironmentBuilder</code> instance that allows to manually
-     * set all required components instead of relying on any defaults.
-     * @return new instance of <code>RuntimeEnvironmentBuilder</code>
-     */
-    public RuntimeEnvironmentBuilder newEmptyBuilder();
-
-    /**
-     * Provides default configuration of <code>RuntimeEnvironmentBuilder</code> that is based on:
-     * <ul>
-     *  <li>DefaultRuntimeEnvironment</li>
-     * </ul>
-     * @return new instance of <code>RuntimeEnvironmentBuilder</code> that is already preconfigured with defaults
-     *
-     * see DefaultRuntimeEnvironment
-     */
-    public RuntimeEnvironmentBuilder newDefaultBuilder();
-
-    /**
-     * Provides default configuration of <code>RuntimeEnvironmentBuilder</code> that is based on:
-     * <ul>
-     *  <li>DefaultRuntimeEnvironment</li>
-     * </ul>
-     * but it does not have persistence for process engine configured so it will only store process instances in memory
-     * @return new instance of <code>RuntimeEnvironmentBuilder</code> that is already preconfigured with defaults
-     *
-     * see DefaultRuntimeEnvironment
-     */
-    public RuntimeEnvironmentBuilder newDefaultInMemoryBuilder();
-
-    /**
-     * Provides default configuration of <code>RuntimeEnvironmentBuilder</code> that is based on:
-     * <ul>
-     *  <li>DefaultRuntimeEnvironment</li>
-     * </ul>
-     * 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 <code>RuntimeEnvironmentBuilder</code> that is already preconfigured with defaults
-     *
-     * see DefaultRuntimeEnvironment
-     */
-    public RuntimeEnvironmentBuilder newDefaultBuilder(String groupId, String artifactId, String version);
-
-    /**
-     * Provides default configuration of <code>RuntimeEnvironmentBuilder</code> that is based on:
-     * <ul>
-     *  <li>DefaultRuntimeEnvironment</li>
-     * </ul>
-     * 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 <code>RuntimeEnvironmentBuilder</code> 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 <code>RuntimeEnvironmentBuilder</code> that is based on:
-     * <ul>
-     *  <li>DefaultRuntimeEnvironment</li>
-     * </ul>
-     * This one is tailored to works smoothly with kjars as the notion of kbase and ksessions
-     * @param releaseId <code>ReleaseId</code> that described the kjar
-     * @return new instance of <code>RuntimeEnvironmentBuilder</code> that is already preconfigured with defaults
-     *
-     * see DefaultRuntimeEnvironment
-     */
-    public RuntimeEnvironmentBuilder newDefaultBuilder(ReleaseId releaseId);
-
-    /**
-     * Provides default configuration of <code>RuntimeEnvironmentBuilder</code> that is based on:
-     * <ul>
-     *  <li>DefaultRuntimeEnvironment</li>
-     * </ul>
-     * This one is tailored to works smoothly with kjars as the notion of kbase and ksessions
-     * @param releaseId <code>ReleaseId</code> 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 <code>RuntimeEnvironmentBuilder</code> that is already preconfigured with defaults
-     *
-     * see DefaultRuntimeEnvironment
-     */
-    public RuntimeEnvironmentBuilder newDefaultBuilder(ReleaseId releaseId, String kbaseName, String ksessionName);
-
-    /**
-     * Provides default configuration of <code>RuntimeEnvironmentBuilder</code> that is based on:
-     * <ul>
-     *  <li>DefaultRuntimeEnvironment</li>
-     * </ul>
-     * 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 <code>RuntimeEnvironmentBuilder</code> that is already preconfigured with defaults
-     *
-     * see DefaultRuntimeEnvironment
-     */
-    public RuntimeEnvironmentBuilder newClasspathKmoduleDefaultBuilder();
-
-    /**
-     * Provides default configuration of <code>RuntimeEnvironmentBuilder</code> that is based on:
-     * <ul>
-     *  <li>DefaultRuntimeEnvironment</li>
-     * </ul>
-     * 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 <code>RuntimeEnvironmentBuilder</code> 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 8580c5975e..0000000000
--- 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 <code>RuntimeEngine</code>s that are essentially build with
- * <code>KieSession</code> and <code>TaskService</code> to deliver executable environments for
- * processes and user tasks.<br>
- * Moreover <code>RuntimeManager</code> 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:
- * <ul>
- *  <li>timer service</li>
- *  <li>task service</li>
- *  <li>finds and initializes timer start events based processes</li>
- * </ul>
- * RuntimeManager shall always be closed whenever it's not needed any more to free up resources it allocated.<br>
- * <code>RuntimeManager</code>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. <br>
- * 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:
- * <ul>
- *  <li>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</li>
- *  <li>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.</li>
- *  <li>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.</li>
- * </ul>
- */
-public interface RuntimeManager {
-
-    /**
-     * Returns <code>RuntimeEngine</code> instance that is fully initialized:
-     * <ul>
-     *  <li>KiseSession is created or loaded depending on the strategy</li>
-     *  <li>TaskService is initialized and attached to ksession (via listener)</li>
-     *  <li>WorkItemHandlers are initialized and registered on ksession</li>
-     *  <li>EventListeners (process, agenda, working memory) are initialized and added to ksession</li>
-     * </ul>
-     * @param context the concrete implementation of the context that is supported by given <code>RuntimeManager</code>
-     * @return instance of the <code>RuntimeEngine</code>
-     */
-    RuntimeEngine getRuntimeEngine(Context<?> context);
-
-    /**
-     * @return unique identifier of this <code>RuntimeManager</code>
-     */
-    String getIdentifier();
-
-    /**
-     * Disposes <code>RuntimeEngine</code> and notifies all listeners about that fact.
-     * This method should always be used to dispose <code>RuntimeEngine</code> that is not needed
-     * anymore. <br>
-     * ksession.dispose() shall never be used with RuntimeManager as it will break the internal
-     * mechanisms of the manager responsible for clear and efficient disposal.<br>
-     * Dispose is not needed if <code>RuntimeEngine</code> 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 <code>RuntimeManager</code> 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 e5bfc516f3..0000000000
--- 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 <code>RuntimeManager</code>. It allows to produce
- * runtime managers based on predefined strategies:
- * <ul>
- *  <li>Singleton</li>
- *  <li>PerRequest</li>
- *  <li>PerProcessInstance</li>
- * </ul>
- * By default uses <code>org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl</code> as implementation
- * of the factory but can be overridden using system property <code>org.jbpm.runtime.manager.class</code>
- * that should provide fully qualified class name of the class that implements this factory.
- */
-public interface RuntimeManagerFactory {
-
-    /**
-     * Produces new instance of singleton <code>RuntimeManager</code> 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 <code>RuntimeManager</code>
-     */
-    RuntimeManager newSingletonRuntimeManager(RuntimeEnvironment environment);
-
-    /**
-     * Produces new instance of singleton <code>RuntimeManager</code> 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 <code>RuntimeManager</code>
-     */
-    RuntimeManager newSingletonRuntimeManager(RuntimeEnvironment environment, String identifier);
-
-    /**
-     * Produces new instance of per request <code>RuntimeManager</code> 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 <code>RuntimeManager</code>
-     */
-    RuntimeManager newPerRequestRuntimeManager(RuntimeEnvironment environment);
-
-    /**
-     * Produces new instance of per request <code>RuntimeManager</code> 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 <code>RuntimeManager</code>
-     */
-    RuntimeManager newPerRequestRuntimeManager(RuntimeEnvironment environment, String identifier);
-
-    /**
-     * Produces new instance of per process instance <code>RuntimeManager</code> 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 <code>RuntimeManager</code>
-     */
-    RuntimeManager newPerProcessInstanceRuntimeManager(RuntimeEnvironment environment);
-
-    /**
-     * Produces new instance of per process instance <code>RuntimeManager</code> 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 <code>RuntimeManager</code>
-     */
-    RuntimeManager newPerProcessInstanceRuntimeManager(RuntimeEnvironment environment, String identifier);
-
-    /**
-     * Produces new instance of per case <code>RuntimeManager</code> 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 <code>RuntimeManager</code>
-     */
-    public RuntimeManager newPerCaseRuntimeManager(RuntimeEnvironment environment);
-    
-    /**
-     * Produces new instance of per case <code>RuntimeManager</code> 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 <code>RuntimeManager</code>
-     */
-    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 11e5ec3449..0000000000
--- 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:
- * <ul>
- *  <li>Process instances</li>
- *  <li>Node instances</li>
- *  <li>Variable instances</li>
- * </ul>
- * there might be some limitations in various implementations thus some of the methods might throw
- * <code>UnsupportedOperationException</code>
- */
-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 <code>AuditService</code> 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 cd3e4294b6..0000000000
--- 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:
- * <ul>
- *  <li>when node instance was triggered</li>
- *  <li>when node instance was left - completed</li>
- *</ul>
- */
-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
-     * <ul>
-     *  <li>entry type will contain incoming sequence flow</li>
-     *  <li>exit type will contain outgoing sequence flow</li>
-     * </ul>
-     * @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 e9bebcb91a..0000000000
--- 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:
-     * <ul>
-     *  <li>ProcessInstance.STATE_ACTIVE</li>
-     *  <li>ProcessInstance.STATE_COMPLETED</li>
-     *  <li>ProcessInstance.STATE_ABORTED</li>
-     *  <li>ProcessInstance.STATE_SUSPENDED</li>
-     * </ul>
-     * @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 da38c29c30..0000000000
--- 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 fb159a4c9b..0000000000
--- 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<OrganizationalEntity> getAssignments(String roleName);
-    
-    /**
-     * Returns defined roles
-     * @return returns all roles
-     */
-    Collection<String> 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 7e5441799b..0000000000
--- 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<String, Object> 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 52269e4994..b6c5271c6c 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 512747daf5..4e0fa73609 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 ca11d49156..0000000000
--- 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 <code>QueryContext</code>.  
- * 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 77968f77a3..0000000000
--- 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 49be748e89..0000000000
--- 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 24659b8829..0000000000
--- 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<String, Object> 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 6527668817..0000000000
--- 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<String, Object> variables){};
-    public default void beforeTaskOutputVariableChangedEvent(TaskEvent event, Map<String, Object> variables){};
-    public default void beforeTaskAssignmentsAddedEvent(TaskEvent event, AssignmentType type, List<OrganizationalEntity> entities){};
-    public default void beforeTaskAssignmentsRemovedEvent(TaskEvent event, AssignmentType type, List<OrganizationalEntity> 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<String, Object> variables){};
-    public default void afterTaskOutputVariableChangedEvent(TaskEvent event, Map<String, Object> variables){};
-    public default void afterTaskAssignmentsAddedEvent(TaskEvent event, AssignmentType type, List<OrganizationalEntity> entities){};
-    public default void afterTaskAssignmentsRemovedEvent(TaskEvent event, AssignmentType type, List<OrganizationalEntity> 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 6a8670ddb4..0000000000
--- 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<String, Object> data);
-
-    void delegate(long taskId, String userId, String targetUserId);
-
-    void exit(long taskId, String userId);
-
-    void fail(long taskId, String userId, Map<String, Object> faultData);
-
-    void forward(long taskId, String userId, String targetEntityId);
-
-    Task getTaskByWorkItemId(long workItemId);
-
-    Task getTaskById(long taskId);
-
-    List<TaskSummary> getTasksAssignedAsBusinessAdministrator(String userId, String language);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, String language);
-
-    @Deprecated
-    List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, String language, int firstResult, int maxResults);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatus(String userId, List<Status> status, String language);
-
-    List<TaskSummary> getTasksOwned(String userId, String language);
-
-    List<TaskSummary> getTasksOwnedByStatus(String userId, List<Status> status, String language);
-
-    List<TaskSummary> getTasksByStatusByProcessInstanceId(String processInstanceId, List<Status> status, String language);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwnerByProcessId(String userId, String processId);
-
-    List<Long> getTasksByProcessInstanceId(String processInstanceId);
-
-    long addTask(Task task, Map<String, Object> 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<OrganizationalEntity> potentialOwners);
-
-    Content getContentById(long contentId);
-
-    Attachment getAttachmentById(long attachId);
-
-    Map<String, Object> getTaskContent(long taskId);
-
-    Long addComment(long taskId, Comment comment);
-
-    Long addComment(long taskId, String addedByUserId, String commentText);
-
-    void deleteComment(long taskId, long commentId);
-
-    List<Comment> 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 f1443f35ae..0000000000
--- 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<String> 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 955e1b603b..0000000000
--- 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<OrganizationalEntity> 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 31dfdeae91..0000000000
--- 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 f95f806954..0000000000
--- 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 ce35d6365e..0000000000
--- 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 09ce3cd6c7..0000000000
--- 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 8bd2d1ada6..0000000000
--- 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 a383ae7304..0000000000
--- 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 b39e0e4c76..0000000000
--- 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 4f1ee657e1..0000000000
--- 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<OrganizationalEntity> getPotentialOwners();
-
-    List<OrganizationalEntity> 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 b00915f492..0000000000
--- 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 7dc485aa7d..0000000000
--- 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 58e9670f78..0000000000
--- 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<I18NText> getNames();
-
-    List<I18NText> getSubjects();
-
-    List<I18NText> 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 3b229afa29..0000000000
--- 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<Comment> getComments();
-
-    List<Attachment> getAttachments();
-
-    long getParentId();
-
-    Map<String, Object> getTaskInputVariables();
-
-    Map<String, Object> 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 219c44f485..0000000000
--- 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<String> 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 5082abb1d5..0000000000
--- 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 2c18e9c508..0000000000
--- 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<VariableInstanceLog> {
-
-}
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 83a7fd75a6..0000000000
--- 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.
- * </p>
- * It includes the basic query functions.
- *
- * @param <T> The type of {@link ParametrizedQueryBuilder} instance being implemented. This type
- * is here to facilitate the building of a fluent interface.
- * @param <R> The type of the result list being returned by the generated {@link ParametrizedQuery}
- */
-public interface ExtendedParametrizedQueryBuilder<T,R> extends ParametrizedQueryBuilder<T> {
-
-    /**
-     * 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 <i>any</i> 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 <i>any</i> 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&lt;TaskSummary&gt;} instance.
-     * </p>
-     * Further modifications to the {@link TaskQueryBuilder} instance
-     * will <em>not</em> affect the query criteria used in the {@link ParametrizedQuery}
-     * produced by this method.
-     * @return The results of the query
-     */
-    public ParametrizedQuery<R> 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 7c74796c8d..0000000000
--- 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 <T,R> List<R> query(Object queryWhere, Class<T> queryType, Class<R> 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 dc382b53be..0000000000
--- 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.
- * </p>
- * {@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.
- * </p>
- * 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 <T> The type being queried and of the (results) list being returned.
- */
-public interface ParametrizedQuery<T> {
-
-    /**
-     * Execute the query and return the list of entities found by the query.
-     * @return The query result
-     */
-    List<T> 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 285e491d01..0000000000
--- 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.
- * </p>
- * It includes the basic query functions.
- *
- * @param <T> The type of {@link ParametrizedQueryBuilder} instance being implemented. This type
- * is here to facilitate the building of a fluent interface.
- */
-public interface ParametrizedQueryBuilder<T> {
-
-    /**
-     * Synonym for {@link #or()}
-     * </p>
-     * Query criteria which are added to the query after this method
-     * are "OR" or "union" criteria.
-     * </p>
-     * Since this is based on SQL, please remember that intersection operands
-     * have precedence over union operands.
-     * </p>
-     * In other words, <ul>
-     * <li><code>A or B and C == A or (B and C)</code></li>
-     * <li><code>A and B or C == (A and B) or C</code></li>
-     * </ul>
-     * </p>
-     * <b>This is the default mode for all query builders</b>.
-     * @return the current query builder instance
-     */
-    public T union();
-
-
-    /**
-     * Synonym for {@link #union()}
-     * </p>
-     * Query criteria which are added to the query after this method
-     * are "OR" or "union" criteria.
-     * </p>
-     * Since this is based on SQL, please remember that intersection operands
-     * have precedence over union operands.
-     * </p>
-     * In other words, <ul>
-     * <li><code>A or B and C == A or (B and C)</code></li>
-     * <li><code>A and B or C == (A and B) or C</code></li>
-     * </ul>
-     * </p>
-     * <b>This is the default mode for all query builders</b>.
-     * @return the current query builder instance
-     */
-    public T or();
-
-    /**
-     * Synonym for {@link #and()}
-     * </p>
-     * Query criteria which are added to the query after this method
-     * are "AND" or "intersection" criteria.
-     * </p>
-     * Since this is based on SQL, please remember that intersection operands
-     * have precedence over union operands.
-     * </p>
-     * In other words, <ul>
-     * <li><code>A or B and C == A or (B and C)</code></li>
-     * <li><code>A and B or C == (A and B) or C</code></li>
-     * </ul>
-     * </p>
-     * @return the current query builder instance
-     */
-    public T intersect();
-
-    /**
-     * Synonym for {@link #intersect()}
-     * </p>
-     * Query criteria which are added to the query after this method
-     * are "AND" or "intersection" criteria.
-     * </p>
-     * Since this is based on SQL, please remember that intersection operands
-     * have precedence over union operands.
-     * </p>
-     * In other words, <ul>
-     * <li><code>A or B and C == A or (B and C)</code></li>
-     * <li><code>A and B or C == (A and B) or C</code></li>
-     * </ul>
-     * </p>
-     * @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.
-     * </p>
-     * 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.
-     * </p>
-     * The following characters may be used:<ul>
-     *  <li>.<ul>
-     *    <li>This character matches any <em>single</em> character.</li>
-     *   </ul></li>
-     *   <li>*<ul>
-     *    <li>This character matches <em>zero or more</em> characters.</li>
-     *   </ul></li>
-     *   </ul>
-     *
-     * @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.
-     * </p>
-     * 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.
-     * </p>
-     * The following characters may be used:<ul>
-     *  <li>.<ul>
-     *    <li>This character matches any <em>single</em> character.</li>
-     *   </ul></li>
-     *   <li>*<ul>
-     *    <li>This character matches <em>zero or more</em> characters.</li>
-     *   </ul></li>
-     *   </ul>
-     *
-     * @see {@code #like()}
-     * @return the current query builder instance
-     */
-    public T regex();
-
-    /**
-     * Results retrieved using query criteria added after this method
-     * is used, must <em>exactly</em> match the criteria given.
-     * </p>
-     * If the {@link #like()} method has been used, using this method
-     * will ensure that criteria added after this method are literally
-     * interpreted, and <em>not</em> seen as regular expressions.
-     * </p>
-     * 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.
-     * </p>
-     * 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 88c5d2a1dc..0000000000
--- 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 80a6a11e14..0000000000
--- 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.
- * </p>
- * It includes the basic query functions.
- *
- * @param <T> The type of {@link ParametrizedQueryBuilder} instance being implemented. This type
- * is here to facilitate the building of a fluent interface.
- * @param <R> The type of the result list being returned by the generated {@link ParametrizedQuery}
- */
-public interface ProcessInstanceIdQueryBuilder<T,R> extends ExtendedParametrizedQueryBuilder<T,R> {
-
-    /**
-     * 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
-     * </p>
-     * 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 125af0455a..0000000000
--- 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 5967f78393..0000000000
--- 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<String, Object> 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<String, Object> params, String orderBy, boolean isAscending) {
-        this.filterParams = filterParams;
-        this.params = params;
-        this.orderBy = orderBy;
-        this.ascending = isAscending;
-    }
-
-    public QueryFilter( String filterParams, Map<String, Object> 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<String, Object> getParams() {
-        return params;
-    }
-
-    public void setParams( Map<String, Object> 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 538d4bc118..0000000000
--- 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 6460e83543..0000000000
--- 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 b6d2272d67..0000000000
--- 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<String, List<? extends Object>> unionParameters = null;
-
-    @XmlElement
-    @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
-    private Map<String, List<? extends Object>> intersectParameters = null;
-
-    @XmlElement
-    @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
-    private Map<String, List<String>> unionRegexParameters = null;
-
-    @XmlElement
-    @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
-    private Map<String, List<String>> intersectRegexParameters = null;
-
-    @XmlElement
-    @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
-    private Map<String, List<? extends Object>> unionRangeParameters = null;
-
-    @XmlElement
-    @XmlJavaTypeAdapter(StringKeyObjectValueMapXmlAdapter.class)
-    private Map<String, List<? extends Object>> intersectRangeParameters = null;
-
-    public QueryParameters() {
-        // JAXB constructor
-    }
-
-    // getters
-
-    public Map<String, List<? extends Object>> getUnionParameters() {
-        if( unionParameters == null ) {
-            unionParameters = new HashMap<>();
-        }
-        return unionParameters;
-    }
-
-    public boolean unionParametersAreEmpty() {
-        return unionParameters == null ? true : unionParameters.isEmpty();
-
-    }
-
-    public Map<String, List<? extends Object>> getIntersectParameters() {
-        if( intersectParameters == null ) {
-            intersectParameters = new HashMap<>();
-        }
-        return intersectParameters;
-    }
-
-    public boolean intersectParametersAreEmpty() {
-        return intersectParameters == null ? true : intersectParameters.isEmpty();
-    }
-
-    public Map<String, List<String>> getUnionRegexParameters() {
-        if( unionRegexParameters == null ) {
-           unionRegexParameters = new HashMap<>();
-        }
-        return unionRegexParameters;
-    }
-
-    public boolean unionRegexParametersAreEmpty() {
-        return unionRegexParameters == null ? true : unionRegexParameters.isEmpty();
-    }
-
-    public Map<String, List<String>> getIntersectRegexParameters() {
-        if( intersectRegexParameters == null ) {
-           intersectRegexParameters = new HashMap<>();
-        }
-        return intersectRegexParameters;
-    }
-
-    public boolean intersectRegexParametersAreEmpty() {
-        return intersectRegexParameters == null ? true : intersectRegexParameters.isEmpty();
-    }
-
-    public Map<String, List<? extends Object>> getUnionRangeParameters() {
-        if( unionRangeParameters == null ) {
-           unionRangeParameters = new HashMap<>();
-        }
-        return unionRangeParameters;
-    }
-
-    public boolean unionRangeParametersAreEmpty() {
-        return unionRangeParameters == null ? true : unionRangeParameters.isEmpty();
-    }
-
-    public Map<String, List<? extends Object>> getIntersectRangeParameters() {
-        if( intersectRangeParameters == null ) {
-           intersectRangeParameters = new HashMap<>();
-        }
-        return intersectRangeParameters;
-    }
-
-    public boolean intersectRangeParametersAreEmpty() {
-        return intersectRangeParameters == null ? true : intersectRangeParameters.isEmpty();
-    }
-
-    // other logic
-
-    public <T> void addAppropriateParam( String listId, T... param ) {
-        if( param.length == 0 ) {
-            return;
-        }
-        List<T> listParams = getAppropriateParamList(listId, param[0], param.length);
-        listParams.addAll(Arrays.asList(param));
-    }
-
-    public <T> void addRangeParameter( String listId, T param, boolean start ) {
-        this.range = true;
-        List<T> listParams = getAppropriateParamList(listId, param, 2);
-        int index = start ? 0 : 1;
-        listParams.set(index, param);
-        this.range = false;
-    }
-
-    @SuppressWarnings("unchecked")
-    public <T> List<T> getAppropriateParamList(String listId, T param, int size) {
-        List<T> listParams = null;
-        if( like ) {
-            if( ! (param instanceof String) ) {
-               throw new IllegalArgumentException("Only String parameters may be used in regular expressions.");
-            }
-            List<String> stringListParams = null;
-            if( union ) {
-                listParams = (List<T>) getUnionRegexParameters().get(listId);
-                if( listParams == null ) {
-                    stringListParams = new ArrayList<>(size);
-                    getUnionRegexParameters().put(listId, stringListParams);
-                }
-            } else {
-                listParams = (List<T>) getIntersectParameters().get(listId);
-                if( listParams == null ) {
-                    stringListParams = new ArrayList<>(size);
-                    getIntersectRegexParameters().put(listId, stringListParams);
-                }
-            }
-            if( listParams == null ) {
-               return (List<T>) stringListParams;
-            } else {
-                return listParams;
-            }
-        } else if( range ) {
-            if( union ) {
-                listParams = (List<T>) getUnionRangeParameters().get(listId);
-                if( listParams == null ) {
-                    listParams = Arrays.asList(null, null);
-                    getUnionRangeParameters().put(listId, listParams);
-                }
-            } else {
-                listParams = (List<T>) getIntersectRangeParameters().get(listId);
-                if( listParams == null ) {
-                    listParams = Arrays.asList(null, null);
-                    getIntersectRangeParameters().put(listId, listParams);
-                }
-            }
-        } else {
-            if( union ) {
-                listParams = (List<T>) getUnionParameters().get(listId);
-                if( listParams == null ) {
-                    listParams = new ArrayList<>(size);
-                    getUnionParameters().put(listId, listParams);
-                }
-            } else {
-                listParams = (List<T>) 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 b2367838a4..0000000000
--- 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 ef1ecc7a5e..0000000000
--- 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 76d240ac38..0000000000
--- 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> T extract(Throwable throwable, Class<T> 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 ebffb3790a..0000000000
--- 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 8752643fc8..0000000000
--- 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 518dbf59ec..0000000000
--- 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 0011ce4a07..0000000000
--- 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<ExecutionError> list(Integer page, Integer pageSize);
-    
-    List<ExecutionError> listByProcessInstance(String processInstanceId, Integer page, Integer pageSize);
-    
-    List<ExecutionError> listByActivity(String activityName, Integer page, Integer pageSize);
-    
-    List<ExecutionError> 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 847f50a4fe..0000000000
--- 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 2806619fa8..0000000000
--- 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 35cd37f293..0000000000
--- 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 <code>Disposable</code>
- * 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 d3792fedfe..0000000000
--- 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.
- * <br>
- * 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 <T> type of the event listener - ProcessEventListener, AgendaEventListener, WorkingMemoryEventListener
- */
-public interface EventListenerProducer<T> {
-
-    /**
-     * Returns list of instances for given (T) type of listeners
-     * <br>
-     * Parameters that might be given are as follows:
-     * <ul>
-     *  <li>ksession</li>
-     *  <li>taskService</li>
-     *  <li>runtimeManager</li>
-     * </ul>
-     * @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<T> getEventListeners(String identifier, Map<String, Object>  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 6ccca92151..0000000000
--- 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 <code>KieSession</code> to be registered on time when <code>RuntimeEngine</code>
- * is created.
- * <br>
- * 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
-     * <br>
-     * Parameters that might be given are as follows:
-     * <ul>
-     *  <li>ksession</li>
-     *  <li>taskService</li>
-     *  <li>runtimeManager</li>
-     * </ul>
-     *
-     * @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<String, Object> getGlobals(String identifier, Map<String, Object> 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 6e9d81b6cd..0000000000
--- 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 81dcdc4f8c..0000000000
--- 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;
-
-/**
- * <code>Mapper</code> responsibility is to provide correlation between context
- * identifier and ksession identifier to effectively keep track of what context
- * has been mapped to given ksession.<br>
- * Mapper covers entire life cycle of the mapping which consists of:
- * <ul>
- *  <li>storing the mapping</li>
- *  <li>retrieving the mapping</li>
- *  <li>removing the mapping</li>
- * </ul>
- *
- */
-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 8084603c24..0000000000
--- 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 <code>org.kie.api.runtime.manager.RuntimeEnvironment</code> that contains internal methods
- */
-public interface RuntimeEnvironment extends org.kie.api.runtime.manager.RuntimeEnvironment {
-
-    /**
-     * Delivers concrete implementation of <code>Mapper</code> 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 596e1b5717..0000000000
--- 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 <code>org.kie.api.runtime.manager.RuntimeManagerFactory</code>
- */
-public interface RuntimeManagerFactory extends org.kie.api.runtime.manager.RuntimeManagerFactory {
-
-
-    /**
-     * @deprecated
-     * Use <code>org.kie.api.runtime.manager.RuntimeManagerFactory</code>
-     */
-    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 515a41ce24..0000000000
--- 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 <code>identifiers</code> 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<String> filter(String pattern, Collection<String> 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 6363d5a836..0000000000
--- 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<String, RuntimeManager> 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<String> 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 b1eb034f6e..0000000000
--- 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 <code>KieSession</code> instances.
- *
- */
-public interface SessionFactory {
-
-    /**
-     * Produces new instance of <code>KieSession</code>
-     * @return new instance of <code>KieSession</code>
-     */
-    KieSession newKieSession();
-
-    /**
-     * Loads <code>KieSession</code> form data store (such as db) based on given id.
-     * @param sessionId identifier of ksession
-     * @return loaded instance of <code>KieSession</code>
-     * @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 136b8569e5..0000000000
--- 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 <code>TaskService</code> instances.
- *
- */
-public interface TaskServiceFactory {
-
-    /**
-     * Produces new instance of <code>TaskService</code>
-     * @return new instance of <code>TaskService</code>
-     */
-    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 7ba623e385..0000000000
--- 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.
- * <br>
- * 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
-     * <br>
-     * Parameters that might be given are as follows:
-     * <ul>
-     *  <li>ksession</li>
-     *  <li>taskService</li>
-     *  <li>runtimeManager</li>
-     * </ul>
-     *
-     * @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<String, WorkItemHandler> getWorkItemHandlers(String identifier, Map<String, Object> 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 8d648b7375..0000000000
--- 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 <T>
- *
- */
-public interface AuditDateDeleteBuilder<T> extends AuditDeleteBuilder<T> {
-
-    /**
-     * 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 1307953f40..0000000000
--- 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 <T>
- *
- */
-public interface AuditDeleteBuilder<T> extends ParametrizedQueryBuilder<T> {
-
-    /**
-     * 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.
-     * </p>
-     * Further modifications to this builder instance
-     * will <em>not</em> 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 3075c277e6..0000000000
--- 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 <T> The {@link ParametrizedQueryBuilder} implementation type
- * @param <R> The entity type on which is being queried
- */
-public interface AuditLogQueryBuilder<T,R> extends ProcessIdQueryBuilder<T,R> {
-
-    /**
-     * Specify which field to use when ordering the results, in ascending order.
-     * </p>
-     * 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.
-     * </p>
-     * 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 04fd6ae8d9..0000000000
--- 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<ErrorInfoDeleteBuilder> {
-
-}
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 5a86613e48..0000000000
--- 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<NodeInstanceLogDeleteBuilder> {
-
-    /**
-     * 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 dafd6e16e5..0000000000
--- 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<NodeInstanceLogQueryBuilder, NodeInstanceLog> {
-
-    /**
-     * 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 70e0be8989..0000000000
--- 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 <T> The {@link ParametrizedQueryBuilder} implementation type
- * @param <R> The entity type on which is being queried
- */
-public interface ProcessIdQueryBuilder<T,R> extends ProcessInstanceIdQueryBuilder<T,R> {
-
-    /**
-     * 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 80bc358037..0000000000
--- 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<ProcessInstanceLogDeleteBuilder> {
-
-    /**
-     * 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 0812e3d949..0000000000
--- 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<ProcessInstanceLogQueryBuilder, ProcessInstanceLog> {
-
-    /**
-     * 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.
-     * </p>
-     * 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 29e6cb4d71..0000000000
--- 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<VariableInstanceLogDeleteBuilder>{
-
-    /**
-     * 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 877f354ad9..0000000000
--- 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<VariableInstanceLogQueryBuilder, VariableInstanceLog> {
-
-    /**
-     * 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
-     * </p>
-     * When using this, please make sure that this criteria intersects other criteria.
-     * </p>
-     * 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 f8e404050e..0000000000
--- 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 <code>RuntimeEngine</code>
- * instances based on case identifier. Use by strategy:
- * <ul>
- *   <li>PerCase</li>
- * </ul>
- * To obtain instances of this context use one of the following static methods:
- * <ul>
- *   <li><code>get(String)</code> to get context for case</li>
- * </ul>
- *
- */
-public class CaseContext implements Context<String> {
-
-    private String caseIdentifier;
-
-    public CaseContext(String caseIdentifier) {
-        this.caseIdentifier = caseIdentifier;
-    }
-
-    @Override
-    public String getContextId() {
-
-        return caseIdentifier;
-    }
-
-    /**
-     * Returns new instance of <code>CaseContext</code> 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 469c6f120c..0000000000
--- 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 <code>RuntimeEngine</code>
- * instances based on correlation key instead of process instance id. Use by strategy:
- * <ul>
- *  <li>PerProcessInstance</li>
- * </ul>
- * To obtain instances of this context use one of the following static methods:
- * <ul>
- *  <li><code>get()</code> to get empty context when starting process instances</li>
- *  <li><code>get(CorrelationKey)</code> to get context for specific process instance</li>
- * </ul>
- *
- */
-public class CorrelationKeyContext implements Context<CorrelationKey> {
-
-    private CorrelationKey correlationKey;
-
-    public CorrelationKeyContext(CorrelationKey key) {
-        this.correlationKey = key;
-    }
-
-    @Override
-    public CorrelationKey getContextId() {
-
-        return correlationKey;
-    }
-
-    /**
-     * Returns new instance of <code>CorrelationKeyContext</code> without correlation key.
-     * Used for starting new instances of the process.
-     * @return
-     */
-    public static CorrelationKeyContext get() {
-        return new CorrelationKeyContext(null);
-    }
-
-    /**
-     * Returns new instance of <code>CorrelationKeyContext</code> 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 7c2425143e..0000000000
--- 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 <code>Context</code> 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:
- * <ul>
- *  <li>Singleton</li>
- *  <li>PerRequest</li>
- * </ul>
- * To obtain instances of this context use static <code>get()</code> method.
- */
-public class EmptyContext implements Context<String> {
-
-    protected static final String CONTEXT_ID = "EmptyContext";
-
-    protected static final Context<String> INSTANCE = new EmptyContext();
-
-    protected EmptyContext() {
-
-    }
-    @Override
-    public String getContextId() {
-
-        return CONTEXT_ID;
-    }
-
-    /**
-     * Returns instances of the empty context.
-     * @return
-     */
-    public static Context<String> 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 d9e1ca22e5..0000000000
--- 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 <code>Context</code> interface.
- * It's main responsibility is to be the data holder between caller and runtime manager
- * to obtain proper instances of <code>RuntimeEngine</code>.<br>
- * Used by strategy:
- * <ul>
- *  <li>PerProcessInstance</li>
- * </ul>
- * To obtain instances of this context use one of the following static methods:
- * <ul>
- *  <li><code>get()</code> to get empty context when starting process instances</li>
- *  <li><code>get(Long)</code> to get context for specific process instance</li>
- * </ul>
- */
-public class ProcessInstanceIdContext implements Context<String> {
-
-    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 <code>ProcessInstanceIdContext</code> 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 <code>ProcessInstanceIdContext</code> 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 f1dd9ecad5..0000000000
--- 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 c8d03816fa..0000000000
--- 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 c865736248..0000000000
--- 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<T> {
-
-    void registerTaskEventListener(T listener);
-
-    List<T> 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 c56dbe8442..0000000000
--- 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<TaskSummary> getTasksOwned(String userId, List<Status> status, QueryFilter filter);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, List<Status> status, QueryFilter filter);
-
-    void addGroup(Group group);
-
-    void addUser(User user);
-
-    int archiveTasks(List<TaskSummary> tasks);
-
-    void deleteFault(long taskId, String userId);
-
-    void deleteOutput(long taskId, String userId);
-
-    void deployTaskDef(TaskDef def);
-
-    List<TaskSummary> getActiveTasks();
-
-    List<TaskSummary> getActiveTasks(Date since);
-
-    List<TaskDef> getAllTaskDef(String filter);
-
-    List<TaskSummary> getArchivedTasks();
-
-    List<TaskSummary> getCompletedTasks();
-
-    List<TaskSummary> getCompletedTasks(Date since);
-
-    List<TaskSummary> getCompletedTasksByProcessId(Long processId);
-
-    Group getGroupById(String groupId);
-
-    List<Group> getGroups();
-
-    List<TaskSummary> getSubTasksAssignedAsPotentialOwner(long parentId, String userId);
-
-    List<TaskSummary> getSubTasksByParent(long parentId);
-
-    int getPendingSubTasksByParent(long parentId);
-
-    TaskDef getTaskDefById(String id);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDate(String userId, List<Status> statuses, Date expirationDate);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId, List<Status> statuses, Date expirationDate);
-
-    List<TaskSummary> getTasksOwnedByExpirationDate(String userId, List<Status> statuses, Date expirationDate);
-
-    List<TaskSummary> getTasksOwnedByExpirationDateOptional(String userId, List<Status> statuses, Date expirationDate);
-
-    List<TaskSummary> getTasksAssignedAsExcludedOwner(String userId);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatusByGroup(String userId, List<String> groupIds, List<Status> status);
-
-    List<TaskSummary> getTasksAssignedAsRecipient(String userId);
-
-    List<TaskSummary> getTasksAssignedAsTaskInitiator(String userId);
-
-    List<TaskSummary> getTasksAssignedAsTaskStakeholder(String userId);
-
-    List<TaskSummary> getTasksOwnedByExpirationDateBeforeSpecifiedDate(String userId, List<Status> status, Date date);
-
-    List<TaskSummary> getTasksByStatusByProcessInstanceIdByTaskName(String processInstanceId, List<Status> status, String taskName);
-
-    Map<Long, List<OrganizationalEntity>> getPotentialOwnersForTaskIds(List<Long> taskIds);
-
-    User getUserById(String userId);
-
-    List<User> getUsers();
-
-    long addTask(Task task, ContentData data);
-
-    void remove(long taskId, String userId);
-
-    void removeGroup(String groupId);
-
-    int removeTasks(List<TaskSummary> 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<I18NText> taskNames);
-
-    void undeployTaskDef(String id);
-
-    List<TaskEvent> getTaskEventsById(long taskId);
-
-    UserInfo getUserInfo();
-
-    void setUserInfo(UserInfo userInfo);
-
-    void addUsersAndGroups(Map<String, User> users, Map<String, Group> groups);
-
-    int removeAllTasks();
-
-    long addContent(long taskId, Content content);
-
-    long setDocumentContentFromUser(long taskId, String userId, byte [] byteContent);
-
-    long addContent(long taskId, Map<String, Object> params);
-
-    long addOutputContentFromUser(long taskId, String userId, Map<String, Object> params);
-
-    Content getContentByIdForUser(long contentId, String userId );
-
-    Map<String, Object> getOutputContentMapForUser(long taskId, String userId);
-
-    void deleteContent(long taskId, long contentId);
-
-    List<Content> getAllContentByTaskId(long taskId);
-
-    long addAttachment(long taskId, Attachment attachment, Content content);
-
-    void deleteAttachment(long taskId, long attachmentId);
-
-    List<Attachment> getAllAttachmentsByTaskId(long taskId);
-
-    void removeTaskEventsById(long taskId);
-
-    OrganizationalEntity getOrganizationalEntityById(String entityId);
-
-    void setDescriptions(long taskId, List<I18NText> descriptions);
-
-    void setSkipable(long taskId, boolean skipable);
-
-    void setSubTaskStrategy(long taskId, SubTasksStrategy strategy);
-
-    int getPriority(long taskId);
-
-    Date getExpirationDate(long taskId);
-
-    List<I18NText> getDescriptions(long taskId);
-
-    boolean isSkipable(long taskId);
-
-    SubTasksStrategy getSubTaskStrategy(long taskId);
-
-    Task getTaskInstanceById(long taskId);
-
-    int getCompletedTaskByUserId(String userId);
-
-    int getPendingTaskByUserId(String userId);
-
-    List<TaskSummary> getTasksAssignedByGroup(String groupId);
-
-    List<TaskSummary> getTasksAssignedByGroups(List<String> groupIds);
-
-    void addMarshallerContext(String ownerId, ContentMarshallerContext context);
-
-    void removeMarshallerContext(String ownerId);
-
-    ContentMarshallerContext getMarshallerContext(Task task);
-
-    TaskSummaryQueryBuilder taskSummaryQuery(String userId);
-
-    List<TaskSummary> getTasksAssignedAsBusinessAdministratorByStatus(String userId, String language ,List<Status> statuses);
-
-    void executeReminderForTask(long taskId,String fromUser);
-
-    long addContentFromUser(long taskId, String userId, Map<String, Object> 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 1b1fc0b44e..0000000000
--- 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<TaskSummary> getActiveTasks();
-
-    public List<TaskSummary> getActiveTasks(Date since);
-
-    public List<TaskSummary> getCompletedTasks();
-
-    public List<TaskSummary> getCompletedTasks(Date since);
-
-    public List<TaskSummary> getCompletedTasksByProcessId(Long processId);
-
-    public int archiveTasks(List<TaskSummary> tasks);
-
-    public List<TaskSummary> getArchivedTasks();
-
-    public int removeTasks(List<TaskSummary> 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 d30721014f..0000000000
--- 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<Attachment> 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 5b46b7444b..0000000000
--- 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<Comment> 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 7e4840dd77..0000000000
--- 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<String, Object> params);
-
-    void deleteDocumentContent(long taskId, long contentId);
-
-    List<Content> 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 f8ad954910..0000000000
--- 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 5582791f04..0000000000
--- 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<Status> 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 c818243794..0000000000
--- 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<TaskDef> 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 e7bf0130a6..0000000000
--- 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 707736bf9b..0000000000
--- 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<TaskEvent> 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 25692a9665..0000000000
--- 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<User> getUsers();
-
-    public List<Group> 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 c880255e82..0000000000
--- 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<String, Object> 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<String> groupIds);
-
-    void claimNextAvailable(String userId);
-
-    void claimNextAvailable(String userId, List<String> groupIds);
-
-    void complete(long taskId, String userId, Map<String, Object> data);
-
-    void delegate(long taskId, String userId, String targetUserId);
-
-    void exit(long taskId, String userId);
-
-    void fail(long taskId, String userId, Map<String, Object> 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<OrganizationalEntity> 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<I18NText> taskNames);
-
-    void setExpirationDate(long taskId, Date date);
-
-    public void setDescriptions(long taskId, List<I18NText> descriptions);
-
-    public void setSkipable(long taskId, boolean skipable);
-
-    void setSubTaskStrategy(long taskId, SubTasksStrategy strategy);
-
-    int getPriority(long taskId);
-
-    Date getExpirationDate(long taskId);
-
-    List<I18NText> 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<String, Object> params);
-
-    Content getContentByIdForUser( long contentId, String userId );
-
-    Map<String, Object> 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 f0536b70af..0000000000
--- 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 84086dbbad..0000000000
--- 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 d8ae06a710..0000000000
--- 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 bd01b941ca..0000000000
--- 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> T queryWithParametersInTransaction(String queryName, Map<String, Object> params, Class<T> clazz);
-
-    <T> T queryWithParametersInTransaction(String queryName, boolean singleResult, Map<String, Object> params, Class<T> clazz);
-
-    <T> T queryAndLockWithParametersInTransaction(String queryName, Map<String, Object> params, boolean singleResult, Class<T> clazz);
-
-    <T> T queryInTransaction(String queryName, Class<T> clazz);
-
-    <T> T queryStringInTransaction(String queryString, Class<T> clazz );
-
-    <T> T queryStringWithParametersInTransaction(String queryString, boolean singleResult, Map<String, Object> params, Class<T> clazz );
-
-    <T> T queryStringWithParametersInTransaction(String queryString,  Map<String, Object> params, Class<T> clazz );
-
-    <T> T queryAndLockStringWithParametersInTransaction(String queryName, Map<String, Object> params, boolean singleResult, Class<T> clazz);
-
-    int executeUpdateString(String updateString);
-
-    int executeUpdate(String queryName, Map<String, Object> params);
-
-    HashMap<String, Object> addParametersToMap(Object ... parameterValues);
-
-    /*
-     * Following are optional methods that are more like extension to
-     * default data model to allow flexible add-ons
-     */
-    <T> T persist(T object);
-
-    <T> T find(Class<T> entityClass, Object primaryKey);
-
-    <T> T remove(T entity);
-
-    <T> T merge(T entity);
-
-    /*
-     * life cycle methods
-     */
-    boolean isOpen();
-
-    void joinTransaction();
-
-    void close();
-
-    /*
-     * JPA Query methods
-     */
-
-    List<TaskSummary> 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 af12921562..0000000000
--- 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<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, List<Status> status, QueryFilter filter);
-
-    List<TaskSummary> getTasksOwned(String userId, List<Status> status, QueryFilter filter);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds);
-
-    List<TaskSummary> getTasksAssignedAsBusinessAdministrator(String userId, List<String> groupIds);
-
-    List<TaskSummary> getTasksAssignedAsBusinessAdministratorByStatus(String userId, List<String> groupIds, List<Status> status);
-
-    List<TaskSummary> getTasksAssignedAsExcludedOwner(String userId);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDate(String userId, List<String> groupIds, List<Status> status, Date expirationDate);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId, List<String> groupIds, List<Status> status, Date expirationDate);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDate(String userId, List<Status> status, Date expirationDate);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId, List<Status> status, Date expirationDate);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, int firstResult, int maxResults);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatus(String userId, List<Status> status);
-
-    List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatusByGroup(String userId, List<String> groupIds, List<Status> status);
-
-    List<TaskSummary> getTasksAssignedAsRecipient(String userId);
-
-    List<TaskSummary> getTasksAssignedAsTaskInitiator(String userId);
-
-    List<TaskSummary> getTasksAssignedAsTaskStakeholder(String userId);
-
-    List<TaskSummary> getTasksAssignedByGroup(String groupId);
-
-    List<TaskSummary> getTasksAssignedByGroups(List<String> groupsId);
-
-    List<TaskSummary> getTasksAssignedByGroupsByExpirationDate(List<String> groupIds,  Date expirationDate);
-
-    List<TaskSummary> getTasksAssignedByGroupsByExpirationDateOptional(List<String> groupIds,  Date expirationDate);
-
-    List<TaskSummary> getTasksOwned(String userId);
-
-    List<TaskSummary> getTasksOwnedByStatus(String userId, List<Status> status);
-
-    List<TaskSummary> getTasksOwnedByExpirationDate(String userId, List<Status> status, Date expirationDate);
-
-    List<TaskSummary> getTasksOwnedByExpirationDateOptional(String userId, List<Status> status, Date expirationDate);
-
-    List<TaskSummary> getTasksOwnedByExpirationDateBeforeSpecifiedDate(String userId, List<Status> status, Date date);
-
-    List<TaskSummary> getSubTasksAssignedAsPotentialOwner(long parentId, String userId);
-
-    List<TaskSummary> getSubTasksByParent(long parentId);
-
-    List<TaskSummary> getTasksByStatusByProcessInstanceId(String processInstanceId, List<Status> status);
-
-    List<TaskSummary> getTasksByStatusByProcessInstanceIdByTaskName(String processInstanceId, List<Status> status, String taskName);
-
-    int getPendingSubTasksByParent(long parentId);
-
-    Task getTaskByWorkItemId(long workItemId);
-
-    Task getTaskInstanceById(long taskId);
-
-    List<Long> getTasksByProcessInstanceId(String processInstanceId);
-
-    Map<Long, List<OrganizationalEntity>> getPotentialOwnersForTaskIds(List<Long> taskIds);
-
-    int getCompletedTaskByUserId(String userId);
-    int getPendingTaskByUserId(String userId);
-
-    /**
-     *
-     * @param queryWhere
-     * @return
-     */
-    List<TaskSummary> query( String userId, Object queryWhere );
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskStatisticsService.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskStatisticsService.java
deleted file mode 100644
index ba95d5b8b9..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskStatisticsService.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;
-
-/**
- * The Task Statistics Service provides all
- *  the methods for gathering Task Instance Statistics.
- *  The Task Statistics methods are provided separately from the
- *  Task Query Services, because they can include more complex operations than
- *  simple queries, like aggregations, averages, sums, etc.
- */
-public interface TaskStatisticsService {
-    public int getCompletedTaskByUserId(String userId);
-    public int getPendingTaskByUserId(String userId);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskVariable.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskVariable.java
deleted file mode 100644
index 2f53009972..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskVariable.java
+++ /dev/null
@@ -1,91 +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;
-
-/**
- * Represents single Task variable entity
- *
- */
-public interface TaskVariable {
-
-    public enum VariableType {
-        INPUT,
-        OUTPUT;
-    }
-
-    /**
-     * Returns task id that this variable belongs to
-     * @return
-     */
-    Long getTaskId();
-
-    /**
-     * Returns process instance id that the task this variable belongs to is owned by
-     * This might be null in case ad hoc tasks
-     * @return
-     */
-    Long getProcessInstanceId();
-
-    /**
-     * Returns process id that the task this variable belongs to is owned by
-     * This might be null in case ad hoc tasks
-     * @return
-     */
-    String getProcessId();
-
-    /**
-     * Returns name of the variable
-     * @return
-     */
-    String getName();
-
-    /**
-     * Returns value of this variable - its string representation that can be queried
-     * @return
-     */
-    String getValue();
-
-    /**
-     * Return type of the variable - either input or output
-     * @return
-     */
-    VariableType getType();
-
-    /**
-     * Returns last time this variable was modified
-     * @return
-     */
-    Date getModificationDate();
-
-    void setTaskId(Long taskId);
-
-    void setProcessInstanceId(String processInstanceId);
-
-    void setProcessId(String processId);
-
-    void setName(String name);
-
-    void setValue(String value);
-
-    void setType(VariableType type);
-
-    void setModificationDate(Date modificationDate);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/TaskVariableIndexer.java b/kie-internal/src/main/java/org/kie/internal/task/api/TaskVariableIndexer.java
deleted file mode 100644
index 412ff9fe62..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/TaskVariableIndexer.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.internal.task.api;
-
-import org.kie.internal.utils.VariableIndexer;
-
-/**
- * Dedicated type for custom implementations of VariableIndexer for tasks - user tasks
- *
- */
-public interface TaskVariableIndexer extends VariableIndexer<TaskVariable> {
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/UserGroupCallback.java b/kie-internal/src/main/java/org/kie/internal/task/api/UserGroupCallback.java
deleted file mode 100644
index dc7257d154..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/UserGroupCallback.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.internal.task.api;
-
-public interface UserGroupCallback extends org.kie.api.task.UserGroupCallback {
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/UserInfo.java b/kie-internal/src/main/java/org/kie/internal/task/api/UserInfo.java
deleted file mode 100644
index fccb74bce5..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/UserInfo.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.task.api;
-
-import java.util.Iterator;
-
-import org.kie.api.task.model.Group;
-import org.kie.api.task.model.OrganizationalEntity;
-
-public interface UserInfo extends org.kie.api.task.UserInfo {
-
-    String getDisplayName(OrganizationalEntity entity);
-
-    Iterator<OrganizationalEntity> getMembersForGroup(Group group);
-
-    boolean hasEmail(Group group);
-
-    String getEmailForEntity(OrganizationalEntity entity);
-
-    String getLanguageForEntity(OrganizationalEntity entity);
-    
-    String getEntityForEmail(String email);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/assignment/Assignment.java b/kie-internal/src/main/java/org/kie/internal/task/api/assignment/Assignment.java
deleted file mode 100644
index 82255b0320..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/assignment/Assignment.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.task.api.assignment;
-
-import java.io.Serializable;
-
-public class Assignment implements Serializable, Comparable<Assignment>{
-
-    private static final long serialVersionUID = -6569072011166557126L;
-
-    private String user;
-
-    public Assignment(String user) {
-        super();
-        this.user = user;
-    }
-
-    public String getUser(){
-        return this.user;
-    }
-
-    @Override
-    public String toString() {
-        return "Assignment [user=" + user + "]";
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((user == null) ? 0 : user.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        Assignment other = (Assignment) obj;
-        if (user == null) {
-            if (other.user != null) {
-                return false;
-            }
-        } else if (!user.equals(other.user)) {
-            return false;
-        }
-        return true;
-    }
-
-    @Override
-    public int compareTo(Assignment o) {
-        if (this.user == null) {
-            return -1;
-        }
-        return this.user.compareTo(o.getUser());
-    }
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/assignment/AssignmentStrategy.java b/kie-internal/src/main/java/org/kie/internal/task/api/assignment/AssignmentStrategy.java
deleted file mode 100644
index 12ee03c740..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/assignment/AssignmentStrategy.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.task.api.assignment;
-
-import org.kie.api.task.TaskContext;
-import org.kie.api.task.model.Task;
-
-/**
- * Task assignment strategy that defines how to select actual owner based on task properties
- * such as potential owners, task data etc. Depending on the strategy implementation
- * additional source of information might be needed e.g. people availability etc.
- * 
- * Each strategy must uniquely identify itself as it's placed in the registry for further use.
- */
-public interface AssignmentStrategy {
-    
-    /**
-     * Returns unique identifier of the strategy
-     * @return identifier to be used for further look ups
-     */
-    String getIdentifier();
-
-    /**
-     * Applies the strategy on given task based on concrete implementation details.
-     * @param task task that should be assigned
-     * @param context task context to be able to use various services including PersistenceContext
-     * @param excludedUser user that should be excluded from the assignment as it's the one who performed operation
-     * e.g. use who has been assigned to the task and released should not be reassign to it again
-     * @return returns single Assignment selected for this task or null if none was found 
-     */
-    Assignment apply(Task task, TaskContext context, String excludedUser);       
-    
-    /**
-     * Optional method that notifies the strategy about task being done (completed, exited, etc). 
-     * Mainly for strategies that do maintain state so tasks that are done are removed from 
-     * assignees' queues
-     * @param task task that has been done
-     * @param context task context to be able to use various services including PersistenceContext
-     */
-    default void taskDone(Task task, TaskContext context) {
-        
-    };
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/AccessType.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/AccessType.java
deleted file mode 100644
index 3caaedb165..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/AccessType.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.internal.task.api.model;
-
-import jakarta.xml.bind.annotation.XmlType;
-
-@XmlType
-public enum AccessType {
-    Inline, Url, Unknown
-}
\ No newline at end of file
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/AllowedToDelegate.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/AllowedToDelegate.java
deleted file mode 100644
index df54e9504c..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/AllowedToDelegate.java
+++ /dev/null
@@ -1,26 +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.model;
-
-public enum AllowedToDelegate {
-    Anybody, Nobody, PotentialOwners, Other
-}
\ No newline at end of file
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/BooleanExpression.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/BooleanExpression.java
deleted file mode 100644
index 9eb487b544..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/BooleanExpression.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.model;
-
-import java.io.Externalizable;
-
-
-public interface BooleanExpression extends Externalizable {
-
-    Long getId();
-
-    void setId(long id);
-
-    String getType();
-
-    void setType(String type);
-
-    String getExpression();
-
-    void setExpression(String expression);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/CommandName.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/CommandName.java
deleted file mode 100644
index b80716a848..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/CommandName.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.internal.task.api.model;
-
-
-public enum CommandName {
-    OperationRequest,
-    OperationResponse,
-
-    ClaimRequest,
-    ClaimResponse,
-
-    ClaimNextAvailableRequest,
-
-    StartRequest,
-    StartResponse,
-
-    StopRequest,
-    StopResponse,
-
-    ReleaseRequest,
-    ReleaseResponse,
-
-    SuspendRequest,
-    SuspendResponse,
-
-    ResumeRequest,
-    ResumeResponse,
-
-    SkipRequest,
-    SkipResponse,
-
-    DelegateRequest,
-    DelegateResponse,
-
-    ForwardRequest,
-    ForwardResponse,
-
-    CompleteRequest,
-    CompleteResponse,
-
-    FailRequest,
-    FailResponse,
-
-    GetTaskRequest,
-    GetTaskResponse,
-
-    AddTaskRequest,
-    AddTaskResponse,
-
-    AddAttachmentRequest,
-    AddAttachmentResponse,
-    DeleteAttachmentRequest,
-    DeleteAttachmentResponse,
-
-    SetDocumentContentRequest,
-    SetDocumentContentResponse,
-    GetContentRequest,
-    GetContentResponse,
-
-    AddCommentRequest,
-    AddCommentResponse,
-    DeleteCommentRequest,
-    DeleteCommentResponse,
-
-    QueryTasksOwned,
-    QueryTasksOwnedWithParticularStatus,
-    QueryTasksAssignedAsBusinessAdministrator,
-    QueryTasksAssignedAsExcludedOwner,
-    QueryTasksAssignedAsPotentialOwner,
-    QueryTasksAssignedAsPotentialOwnerWithGroup,
-    QueryTasksAssignedAsPotentialOwnerByGroup,
-    QueryTasksAssignedAsPotentialOwnerByStatus,
-    QueryTasksAssignedAsPotentialOwnerByStatusByGroup,
-    QuerySubTasksAssignedAsPotentialOwner,
-    QueryGetSubTasksByParentTaskId,
-    QueryTasksAssignedAsRecipient,
-    QueryTasksAssignedAsTaskInitiator,
-    QueryTasksAssignedAsTaskStakeholder,
-    QueryTaskSummaryResponse,
-
-    QueryTaskByWorkItemId,
-    QueryTaskByWorkItemIdResponse,
-
-    RegisterForEventRequest,
-    UnRegisterForEventRequest,
-    EventTriggerResponse,
-
-    RegisterClient,
-
-    QueryGenericRequest,
-    QueryGenericResponse,
-
-    NominateTaskRequest,
-    SetOutputRequest,
-    SetFaultRequest,
-    SetPriorityRequest,
-    DeleteOutputRequest,
-    DeleteFaultRequest
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/ContentData.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/ContentData.java
deleted file mode 100644
index d96635409a..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/ContentData.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.task.api.model;
-
-import java.io.Externalizable;
-
-public interface ContentData extends Externalizable {
-
-    AccessType getAccessType();
-
-    void setAccessType(AccessType accessType);
-
-    String getType();
-
-    void setType(String type);
-
-    byte[] getContent();
-
-    void setContent(byte[] content);
-    
-    Object getContentObject();
-    
-    void setContentObject(Object object);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/Deadline.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/Deadline.java
deleted file mode 100644
index 8478b13a46..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/Deadline.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.task.api.model;
-
-import java.io.Externalizable;
-import java.util.Date;
-import java.util.List;
-
-import org.kie.api.task.model.I18NText;
-
-
-public interface Deadline extends Externalizable {
-
-    Boolean isEscalated();
-
-    void setEscalated(Boolean escalated);
-
-    long getId();
-
-    void setId(long id);
-
-    List<I18NText> getDocumentation();
-
-    void setDocumentation(List<I18NText> documentation);
-
-    Date getDate();
-
-    void setDate(Date date);
-
-    List<Escalation> getEscalations();
-
-    void setEscalations(List<Escalation> escalations);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/DeadlineSummary.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/DeadlineSummary.java
deleted file mode 100644
index d3ddcce5de..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/DeadlineSummary.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.task.api.model;
-
-import java.util.Date;
-
-public interface DeadlineSummary {
-
-    long getTaskId();
-
-    void setTaskId(long taskId);
-
-    long getDeadlineId();
-
-    void setDeadlineId(long deadlineId);
-
-    Date getDate();
-
-    void setDate(Date date);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/Deadlines.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/Deadlines.java
deleted file mode 100644
index d9ee816b6a..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/Deadlines.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.task.api.model;
-
-import java.io.Externalizable;
-import java.util.List;
-
-
-public interface Deadlines extends Externalizable {
-
-    List<Deadline> getStartDeadlines();
-
-    void setStartDeadlines(List<Deadline> startDeadlines);
-
-    List<Deadline> getEndDeadlines();
-
-    void setEndDeadlines(List<Deadline> endDeadlines);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/Delegation.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/Delegation.java
deleted file mode 100644
index 9fb38b17d5..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/Delegation.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.model;
-
-import java.io.Externalizable;
-import java.util.List;
-
-import org.kie.api.task.model.OrganizationalEntity;
-
-
-public interface Delegation  extends Externalizable {
-
-    AllowedToDelegate getAllowed();
-
-    void setAllowed(AllowedToDelegate allowedToDelegate);
-
-    List<OrganizationalEntity> getDelegates();
-
-    void setDelegates(List<OrganizationalEntity> delegates);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/EmailNotification.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/EmailNotification.java
deleted file mode 100644
index df72cf22d5..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/EmailNotification.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.model;
-
-import java.util.Map;
-
-
-
-public interface EmailNotification extends Notification {
-
-
-    Map<? extends Language, ? extends EmailNotificationHeader> getEmailHeaders();
-
-    void setEmailHeaders(Map<? extends Language, ? extends EmailNotificationHeader> emailHeaders);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/EmailNotificationHeader.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/EmailNotificationHeader.java
deleted file mode 100644
index c3741a2e8c..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/EmailNotificationHeader.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.model;
-
-import java.io.Externalizable;
-
-public interface EmailNotificationHeader extends Externalizable {
-
-    long getId();
-
-    void setId(long id);
-
-    String getLanguage();
-
-    void setLanguage(String language);
-
-    String getSubject();
-
-    void setSubject(String subject);
-
-    String getBody();
-
-    void setBody(String body);
-
-    String getReplyTo();
-
-    void setReplyTo(String replyTo);
-
-    String getFrom();
-
-    void setFrom(String from);
-
-}
\ No newline at end of file
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/Escalation.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/Escalation.java
deleted file mode 100644
index 593db31c8f..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/Escalation.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.task.api.model;
-
-import java.io.Externalizable;
-import java.util.List;
-
-
-public interface Escalation extends Externalizable {
-
-    long getId();
-
-    void setId(long id);
-
-    String getName();
-
-    void setName(String name);
-
-    List<BooleanExpression> getConstraints();
-
-    void setConstraints(List<BooleanExpression> constraints);
-
-    List<Notification> getNotifications();
-
-    void setNotifications(List<Notification> notifications);
-
-    List<Reassignment> getReassignments();
-
-    void setReassignments(List<Reassignment> reassignments);
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/FaultData.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/FaultData.java
deleted file mode 100644
index 356eaf1073..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/FaultData.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.internal.task.api.model;
-
-
-public interface FaultData extends ContentData {
-
-    String getFaultName();
-
-    void setFaultName(String faultName);
-
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/InternalAttachment.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/InternalAttachment.java
deleted file mode 100644
index 27727644ed..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/InternalAttachment.java
+++ /dev/null
@@ -1,49 +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.model;
-
-import java.util.Date;
-
-import org.kie.api.task.model.Attachment;
-import org.kie.api.task.model.Content;
-import org.kie.api.task.model.User;
-
-public interface InternalAttachment extends Attachment {
-
-    void setId(long id);
-
-    void setName(String name);
-
-    AccessType getAccessType();
-
-    void setAccessType(AccessType accessType);
-
-    void setContentType(String contentType);
-
-    void setAttachedAt(Date attachedAt);
-
-    void setAttachedBy(User attachedBy);
-
-    void setContent(Content content);
-
-    void setSize(int size);
-
-    void setAttachmentContentId(long contentId);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/InternalComment.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/InternalComment.java
deleted file mode 100644
index 3354b8fb50..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/InternalComment.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.model;
-
-import java.util.Date;
-
-import org.kie.api.task.model.Comment;
-import org.kie.api.task.model.User;
-
-
-public interface InternalComment extends Comment {
-
-    void setId(long id);
-
-    void setText(String text);
-
-    void setAddedAt(Date addedDate);
-
-    void setAddedBy(User addedBy);
-
-}
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/InternalContent.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/InternalContent.java
deleted file mode 100644
index ab36784091..0000000000
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/InternalContent.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
... 2072 lines suppressed ...


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org