diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/authorization/UserOperationLogCategoryPermissions.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/authorization/UserOperationLogCategoryPermissions.java new file mode 100644 index 0000000000000000000000000000000000000000..47661fb09f0ae0496ecb8433cdc5d6bfb50367e9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/authorization/UserOperationLogCategoryPermissions.java @@ -0,0 +1,78 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.authorization; + +/** + * The set of built-in {@link Permission Permissions} for {@link Resources#OPERATION_LOG_CATEGORY User operation log based on categories} in Camunda Platform. + * + * @author Tobias Metzke + * + */ +public enum UserOperationLogCategoryPermissions implements Permission { + + /** The none permission means 'no action', 'doing nothing'. + * It does not mean that no permissions are granted. */ + NONE("NONE", 0), + + /** + * Indicates that all interactions are permitted. + * If ALL is revoked it means that the user is not permitted + * to do everything, which means that at least one permission + * is revoked. This does not implicate that all individual + * permissions are revoked. + * + * Example: If the UPDATE permission is revoked then the ALL + * permission is revoked as well, because the user is not authorized + * to execute all actions anymore. + */ + ALL("ALL", Integer.MAX_VALUE), + + /** Indicates that READ interactions on defined categories are permitted. */ + READ("READ", 2), + + /** Indicates that UPDATE interactions on defined categories are permitted. */ + UPDATE("UPDATE", 4), + + /** Indicates that DELETE interactions on defined categories are permitted. */ + DELETE("DELETE", 16); + + private static final Resource[] RESOURCES = new Resource[] { Resources.OPERATION_LOG_CATEGORY }; + + private String name; + private int id; + + private UserOperationLogCategoryPermissions(String name, int id) { + this.name = name; + this.id = id; + } + + @Override + public String getName() { + return name; + } + + @Override + public int getValue() { + return id; + } + + @Override + public Resource[] getTypes() { + return RESOURCES; + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/Batch.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/Batch.java new file mode 100644 index 0000000000000000000000000000000000000000..fa06a69461dc13616a555d9d06aac11ab61d3068 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/Batch.java @@ -0,0 +1,138 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.batch; + +import org.camunda.bpm.engine.ManagementService; + +import java.util.Date; + +/** + *
A batch represents a number of jobs which + * execute a number of commands asynchronously. + *
+ *
Batches have three types of jobs: + *
+ *
All three job types have independent job definitions. They can be controlled individually + * (e.g. suspension) and are independently represented in the historic job log. + */ +public interface Batch { + + String TYPE_PROCESS_INSTANCE_MIGRATION = "instance-migration"; + String TYPE_PROCESS_INSTANCE_MODIFICATION = "instance-modification"; + String TYPE_PROCESS_INSTANCE_RESTART = "instance-restart"; + String TYPE_PROCESS_INSTANCE_DELETION = "instance-deletion"; + String TYPE_PROCESS_INSTANCE_UPDATE_SUSPENSION_STATE = "instance-update-suspension-state"; + String TYPE_HISTORIC_PROCESS_INSTANCE_DELETION = "historic-instance-deletion"; + String TYPE_HISTORIC_DECISION_INSTANCE_DELETION = "historic-decision-instance-deletion"; + String TYPE_SET_JOB_RETRIES = "set-job-retries"; + String TYPE_SET_EXTERNAL_TASK_RETRIES = "set-external-task-retries"; + String TYPE_PROCESS_SET_REMOVAL_TIME = "process-set-removal-time"; + String TYPE_DECISION_SET_REMOVAL_TIME = "decision-set-removal-time"; + String TYPE_BATCH_SET_REMOVAL_TIME = "batch-set-removal-time"; + String TYPE_SET_VARIABLES = "set-variables"; + String TYPE_CORRELATE_MESSAGE = "correlate-message"; + + /** + * @return the id of the batch + */ + String getId(); + + /** + * @return the type of the batch + */ + String getType(); + + /** + * @return the number of batch execution jobs required to complete the batch + */ + int getTotalJobs(); + + /** + * @return the number of batch execution jobs already created by the seed job + */ + int getJobsCreated(); + + /** + * @return number of batch jobs created per batch seed job invocation + */ + int getBatchJobsPerSeed(); + + /** + * @return the number of invocations executed per batch job + */ + int getInvocationsPerBatchJob(); + + /** + * @return the id of the batch seed job definition + */ + String getSeedJobDefinitionId(); + + /** + * @return the id of the batch monitor job definition + */ + String getMonitorJobDefinitionId(); + + /** + * @return the id of the batch job definition + */ + String getBatchJobDefinitionId(); + + /** + * @return the batch's tenant id or null + */ + String getTenantId(); + + /** + * @return the batch creator's user id + */ + String getCreateUserId(); + + /** + *
+ * Indicates whether this batch is suspended. If a batch is suspended, + * the batch jobs will not be acquired by the job executor. + *
+ *+ *
+ * Note: It is still possible to manually suspend and activate + * jobs and job definitions using the {@link ManagementService}, which will + * not change the suspension state of the batch. + *
+ * + * @return true if this batch is currently suspended, false otherwise + * @see ManagementService#suspendBatchById(String) + * @see ManagementService#activateBatchById(String) + */ + boolean isSuspended(); + + /** + * @return the date the batch was started + */ + Date getStartTime(); + + /** + * @return the date the batch execution started + */ + Date getExecutionStartTime(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchQuery.java new file mode 100644 index 0000000000000000000000000000000000000000..5df84b70bac1774a4dafa410c5b0a3182ba4db9a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchQuery.java @@ -0,0 +1,56 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.batch; + +import org.camunda.bpm.engine.query.Query; + +/** + * Query for {@link Batch} instances. + */ +public interface BatchQuery extends Query+ * Additional statistics for a single batch. + *
+ * + *
+ * Contains the number of remaining jobs, completed and failed batch
+ * execution jobs. The following relation between these exists:
+ *
+ *
+ * batch total jobs = remaining jobs + completed jobs
+ *
+ *
+ * The number of remaining batch execution jobs. + * This does include failed batch execution jobs and + * batch execution jobs which still have to be created by the seed job. + *
+ * + *+ * See + * {@link #getTotalJobs()} for the number of all batch execution jobs, + * {@link #getCompletedJobs()} for the number of completed batch execution jobs and + * {@link #getFailedJobs()} for the number of failed batch execution jobs. + *
+ * + * @return the number of remaining batch execution jobs + */ + int getRemainingJobs(); + + /** + *+ * The number of completed batch execution jobs. + * This does include aborted/deleted batch execution jobs. + *
+ * + *+ * See + * {@link #getTotalJobs()} for the number of all batch execution jobs, + * {@link #getRemainingJobs()} ()} for the number of remaining batch execution jobs and + * {@link #getFailedJobs()} for the number of failed batch execution jobs. + *
+ * + * @return the number of completed batch execution jobs + */ + int getCompletedJobs(); + + /** + *+ * The number of failed batch execution jobs. + * This does not include aborted or deleted batch execution jobs. + *
+ * + *+ * See + * {@link #getTotalJobs()} for the number of all batch execution jobs, + * {@link #getRemainingJobs()} ()} for the number of remaining batch execution jobs and + * {@link #getCompletedJobs()} ()} for the number of completed batch execution jobs. + *
+ * + * @return the number of failed batch execution jobs + */ + int getFailedJobs(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchStatisticsQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchStatisticsQuery.java new file mode 100644 index 0000000000000000000000000000000000000000..5fe5b294a11c43159e595b2563147c4b99923c41 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchStatisticsQuery.java @@ -0,0 +1,77 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.batch; + +import org.camunda.bpm.engine.query.Query; + +import java.util.Date; + +public interface BatchStatisticsQuery extends QueryWhen a Process Engine API call is performed, the engine + * will create a Process Engine Context. The context caches database + * entities, so that multiple operations on the same entity do not + * result in multiple database queries. This also means that the changes + * to these entities are accumulated and are flushed to the database + * as soon as the Process Engine API call returns (however, the current + * transaction might be committed at a later time).
+ * + *If a Process Engine API call is nested into another call, the + * default behaviour is to reuse the existing Process Engine Context. + * This means that the nested call will have access to the same cached + * entities and the changes made to them.
+ * + *When the nested call is to be executed in a new transaction, a new Process + * Engine Context needs to be created for its execution. In this case, the + * nested call will use a new cache for the database entities, independent of + * the previous (outer) call cache. This means that, the changes in the cache of + * one call are invisible to the other call and vice versa. When the nested call + * returns, the changes are flushed to the database independently of the Process + * Engine Context of the outer call.
+ * + *The ProcessEngineContext is a utility class to declare to
+ * the Process Engine that a new Process Engine Context needs to be created
+ * in order for the database operations in a nested Process Engine API call
+ * to be separated in a new transaction.
+ * try {
+ * ProcessEngineContext.requiresNew();
+ * runtimeService.startProcessInstanceByKey("EXAMPLE_INSTANCE");
+ * } finally {
+ * ProcessEngineContext.clear();
+ * }
+ *
+ */
+public class ProcessEngineContext {
+
+ /**
+ * Declares to the Process Engine that a new, separate context,
+ * bound to the current thread, needs to be created for all subsequent
+ * Process Engine database operations. The method should always be used
+ * in a try-finally block to ensure that {@link #clear()} is called
+ * under any circumstances.
+ *
+ * Please see the {@link ProcessEngineContext} class documentation for
+ * a more detailed description on the purpose of this method.
+ */
+ public static void requiresNew() {
+ ProcessEngineContextImpl.set(true);
+ }
+
+ /**
+ * Declares to the Process Engine that the new Context created
+ * by the {@link #requiresNew()} method can be closed. Please
+ * see the {@link ProcessEngineContext} class documentation for
+ * a more detailed description on the purpose of this method.
+ */
+ public static void clear() {
+ ProcessEngineContextImpl.clear();
+ }
+
+ /**
+ * Takes a callable and executes all engine API invocations + * within that callable in a new Process Engine Context. Please + * see the {@link ProcessEngineContext} class documentation for + * a more detailed description on the purpose of this method.
+ * + * An alternative to calling: + * + *
+ * try {
+ * requiresNew();
+ * callable.call();
+ * } finally {
+ * clear();
+ * }
+ *
+ *
+ * @param callable the callable to execute
+ * @return what is defined by the callable passed to the method
+ * @throws Exception
+ */
+ public static Returns the currently executed Element in the BPMN Model. This method returns a {@link FlowElement} which may be casted + * to the concrete type of the Bpmn Model Element currently executed.
+ * + *If called from a Service {@link ExecutionListener}, the method will return the corresponding {@link FlowNode} + * for {@link ExecutionListener#EVENTNAME_START} and {@link ExecutionListener#EVENTNAME_END} and the corresponding + * {@link SequenceFlow} for {@link ExecutionListener#EVENTNAME_TAKE}.
+ * + * @return the {@link FlowElement} corresponding to the current Bpmn Model Element + */ + FlowElement getBpmnModelElementInstance(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/CaseExecutionListener.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/CaseExecutionListener.java new file mode 100644 index 0000000000000000000000000000000000000000..3cad506c09b8bb20740c529ef198486c7c072ae6 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/CaseExecutionListener.java @@ -0,0 +1,84 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.delegate; + +import org.camunda.bpm.engine.runtime.CaseExecution; +import org.camunda.bpm.engine.runtime.CaseInstance; +import org.camunda.bpm.model.cmmn.instance.Stage; +import org.camunda.bpm.model.cmmn.instance.Task; + +/** + * Listener interface implemented by user code which wants to be notified + * when a state transition happens on a {@link CaseExecution}. + * + *The following state transition are supported on a {@link CaseInstance}: + *
And on a {@link CaseExecution} which is not a {@link CaseInstance} and which + * is associated with a {@link Task} or a {@link Stage} the following state transition + * are supported: + *
A variable listener can be defined on a scope in a case model. + * Depending on its configuration, it is invoked when a variable is create/updated/deleted + * on a case execution that corresponds to that scope or to any of its descendant scopes.
+ * + *+ * Beware: If you set a variable inside a {@link VariableListener} implementation, + * this will result in new variable listener invocations. Make sure that your implementation + * allows to exit such a cascade as otherwise there will be an infinite loop. + *
+ * + * @author Thorben Lindhauer + */ +public interface CaseVariableListener extends VariableListenerReturns the currently executed Element in the Cmmn Model. This method returns a {@link CmmnElement} which may be casted + * to the concrete type of the Cmmn Model Element currently executed.
+ * + * @return the {@link CmmnElement} corresponding to the current Cmmn Model Element + */ + CmmnElement getCmmnModelElementInstance(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateCaseExecution.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateCaseExecution.java new file mode 100644 index 0000000000000000000000000000000000000000..571f913a15cab1a48634bb62d2271a32092f1735 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateCaseExecution.java @@ -0,0 +1,61 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.delegate; + +/** + * @author Roman Smirnov + * + */ +public interface DelegateCaseExecution extends BaseDelegateExecution, ProcessEngineServicesAware, CmmnModelExecutionContext { + + String getId(); + + String getCaseInstanceId(); + + String getEventName(); + + String getCaseBusinessKey(); + + String getCaseDefinitionId(); + + String getParentId(); + + String getActivityId(); + + String getActivityName(); + + String getTenantId(); + + boolean isAvailable(); + + boolean isEnabled(); + + boolean isDisabled(); + + boolean isActive(); + + boolean isSuspended(); + + boolean isTerminated(); + + boolean isCompleted(); + + boolean isFailed(); + + boolean isClosed(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateCaseVariableInstance.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateCaseVariableInstance.java new file mode 100644 index 0000000000000000000000000000000000000000..07c1a3a1d2460201131c897545a33d364e9d182f --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateCaseVariableInstance.java @@ -0,0 +1,33 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.delegate; + + +/** + * @author Thorben Lindhauer + * + */ +public interface DelegateCaseVariableInstance extends DelegateVariableInstancenull
+ * if the execution belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /**
+ * Method to store variable in a specific scope identified by activity ID.
+ *
+ * @param variableName - name of the variable
+ * @param value - value of the variable
+ * @param activityId - activity ID which is associated with destination execution,
+ * if not existing - exception will be thrown
+ * @throws ProcessEngineException if scope with specified activity ID is not found
+ */
+ void setVariable (String variableName, Object value, String activityId);
+
+ /**
+ * Create an incident associated with this execution
+ *
+ * @param incidentType the type of incident
+ * @param configuration
+ * @return a new incident
+ */
+ Incident createIncident(String incidentType, String configuration);
+
+ /**
+ * Create an incident associated with this execution
+ *
+ * @param incidentType the type of incident
+ * @param configuration
+ * @param message
+ * @return a new incident
+ */
+ Incident createIncident(String incidentType, String configuration, String message);
+
+ /**
+ * Resolve and remove an incident with given id
+ *
+ * @param incidentId
+ */
+ void resolveIncident(String incidentId);
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateListener.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateListener.java
new file mode 100644
index 0000000000000000000000000000000000000000..9c0f1ca8a9c9b67296faceaccf182fc73fccd1ce
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateListener.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.delegate;
+
+/**
+ * @author Daniel Meyer
+ * @author Roman Smirnov
+ * @author Sebastian Menski
+ *
+ */
+public interface DelegateListenernull
+ * if the task belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /** Follow-up date of the task. */
+ Date getFollowUpDate();
+
+ /** Change follow-up date of the task. */
+ void setFollowUpDate(Date followUpDate);
+
+ /**
+ * set status to complete.
+ *
+ * @throws IllegalStateException if performed on completion or deletion
+ */
+ void complete();
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateVariableInstance.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateVariableInstance.java
new file mode 100644
index 0000000000000000000000000000000000000000..0d8a6d4e5851dec11d2c99fefe664fd6f70a06e8
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateVariableInstance.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.delegate;
+
+import org.camunda.bpm.engine.runtime.VariableInstance;
+
+/**
+ * @author Thorben Lindhauer
+ *
+ */
+public interface DelegateVariableInstanceInterface providing access to the {@link ProcessEngineServices} from Java + * delegation code.
+ * + * @author Daniel Meyer + * + */ +public interface ProcessEngineServicesAware { + + /** + * Returns the {@link ProcessEngineServices} providing access to the + * public API of the process engine. + * + * @return the {@link ProcessEngineServices}. + */ + ProcessEngineServices getProcessEngineServices(); + + /** + * Returns the {@link ProcessEngine} providing access to the + * public API of the process engine. + * + * @return the {@link ProcessEngine}. + */ + ProcessEngine getProcessEngine(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/TaskListener.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/TaskListener.java new file mode 100644 index 0000000000000000000000000000000000000000..00e79a5c5d07efbbab5a3400430f09ea32f863e0 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/TaskListener.java @@ -0,0 +1,46 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.delegate; + +/** + * Listener interface implemented by user code which wants to be notified when a property of a task changes. + * + *The following Task Events are supported: + *
key and not by id.
+ */
+ DecisionEvaluationBuilder decisionDefinitionTenantId(String tenantId);
+
+ /**
+ * Specify that the decision definition belongs to no tenant. Can only be
+ * used when the definition is referenced by key and not by id.
+ */
+ DecisionEvaluationBuilder decisionDefinitionWithoutTenantId();
+
+ /**
+ * Set the version of the decision definition. If null then
+ * the latest version is taken.
+ */
+ DecisionEvaluationBuilder version(Integer version);
+
+ /**
+ * Set the input values of the decision.
+ */
+ DecisionEvaluationBuilder variables(Mapkey and not by id.
+ */
+ DecisionsEvaluationBuilder decisionDefinitionTenantId(String tenantId);
+
+ /**
+ * Specify that the decision definition belongs to no tenant. Can only be
+ * used when the definition is referenced by key and not by id.
+ */
+ DecisionsEvaluationBuilder decisionDefinitionWithoutTenantId();
+
+ /**
+ * Set the version of the decision definition. If null then
+ * the latest version is taken.
+ */
+ DecisionsEvaluationBuilder version(Integer version);
+
+ /**
+ * Set the input values of the decision.
+ */
+ DecisionsEvaluationBuilder variables(MapThis exception is thrown, if an operation is not allowed to be executed.
+ * + * @author Roman Smirnov + * + */ +public class NotAllowedException extends BadUserRequestException { + + private static final long serialVersionUID = 1L; + + public NotAllowedException() { + super(); + } + + public NotAllowedException(String message, Throwable cause) { + super(message, cause); + } + + public NotAllowedException(String message) { + super(message); + } + + public NotAllowedException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotFoundException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotFoundException.java new file mode 100644 index 0000000000000000000000000000000000000000..52887dd07257bc3968600390f742596266be57ca --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotFoundException.java @@ -0,0 +1,46 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.exception; + +import org.camunda.bpm.engine.BadUserRequestException; + +/** + *This exception is thrown, if an entity (case execution, case definition) is not found.
+ * + * @author Roman Smirnov + * + */ +public class NotFoundException extends BadUserRequestException { + + private static final long serialVersionUID = 1L; + + public NotFoundException() { + } + + public NotFoundException(String message, Throwable cause) { + super(message, cause); + } + + public NotFoundException(String message) { + super(message); + } + + public NotFoundException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotValidException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotValidException.java new file mode 100644 index 0000000000000000000000000000000000000000..7b45469b66eec5b4fa2e8c57a9d4410f35e2bfa8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotValidException.java @@ -0,0 +1,46 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.exception; + +import org.camunda.bpm.engine.BadUserRequestException; + +/** + *This exception is thrown, if a given value is not valid.
+ * + * @author Roman Smirnov + * + */ +public class NotValidException extends BadUserRequestException { + + private static final long serialVersionUID = 1L; + + public NotValidException() { + } + + public NotValidException(String message, Throwable cause) { + super(message, cause); + } + + public NotValidException(String message) { + super(message); + } + + public NotValidException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NullValueException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NullValueException.java new file mode 100644 index 0000000000000000000000000000000000000000..af8a6fbbf18986a34e4a9e4e3776665826d665eb --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NullValueException.java @@ -0,0 +1,44 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.exception; + +import org.camunda.bpm.engine.ProcessEngineException; + +/** + * @author Roman Smirnov + * + */ +public class NullValueException extends ProcessEngineException { + + private static final long serialVersionUID = 1L; + + public NullValueException() { + } + + public NullValueException(String message, Throwable cause) { + super(message, cause); + } + + public NullValueException(String message) { + super(message); + } + + public NullValueException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseDefinitionNotFoundException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseDefinitionNotFoundException.java new file mode 100644 index 0000000000000000000000000000000000000000..dab68954fa7a34a0fb1f69d4db0cbe4e2a54eb5d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseDefinitionNotFoundException.java @@ -0,0 +1,45 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.exception.cmmn; + + +/** + *This is exception is thrown when a specific case definition is not found.
+ * + * @author Roman Smirnov + * + */ +public class CaseDefinitionNotFoundException extends CaseException { + + private static final long serialVersionUID = 1L; + + public CaseDefinitionNotFoundException() { + } + + public CaseDefinitionNotFoundException(String message, Throwable cause) { + super(message, cause); + } + + public CaseDefinitionNotFoundException(String message) { + super(message); + } + + public CaseDefinitionNotFoundException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseException.java new file mode 100644 index 0000000000000000000000000000000000000000..7e329dfa6f951abb7fd038626e118c6918a7240b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseException.java @@ -0,0 +1,48 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.exception.cmmn; + +import org.camunda.bpm.engine.ProcessEngineException; + +/** + *This is exception is thrown when something happens in the execution + * of a case instance.
+ * + * @author Roman Smirnov + * + */ +public class CaseException extends ProcessEngineException { + + private static final long serialVersionUID = 1L; + + public CaseException() { + super(); + } + + public CaseException(String message, Throwable cause) { + super(message, cause); + } + + public CaseException(String message) { + super(message); + } + + public CaseException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseExecutionNotFoundException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseExecutionNotFoundException.java new file mode 100644 index 0000000000000000000000000000000000000000..a8929ae0761fab6f673efd5ef1e8d3897af9cb35 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseExecutionNotFoundException.java @@ -0,0 +1,45 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.exception.cmmn; + + +/** + *This is exception is thrown when a specific case execution is not found.
+ * + * @author Roman Smirnov + * + */ +public class CaseExecutionNotFoundException extends CaseException { + + private static final long serialVersionUID = 1L; + + public CaseExecutionNotFoundException() { + } + + public CaseExecutionNotFoundException(String message, Throwable cause) { + super(message, cause); + } + + public CaseExecutionNotFoundException(String message) { + super(message); + } + + public CaseExecutionNotFoundException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseIllegalStateTransitionException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseIllegalStateTransitionException.java new file mode 100644 index 0000000000000000000000000000000000000000..727923e97292ba9e48f623f5704e9a35287cd3ae --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseIllegalStateTransitionException.java @@ -0,0 +1,46 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.exception.cmmn; + + +/** + *This is exception is thrown when a state transition on a case execution + * is not possible. For example: an 'enabled' case execution cannot be completed.
+ * + * @author Roman Smirnov + * + */ +public class CaseIllegalStateTransitionException extends CaseException { + + private static final long serialVersionUID = 1L; + + public CaseIllegalStateTransitionException() { + } + + public CaseIllegalStateTransitionException(String message, Throwable cause) { + super(message, cause); + } + + public CaseIllegalStateTransitionException(String message) { + super(message); + } + + public CaseIllegalStateTransitionException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CmmnModelInstanceNotFoundException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CmmnModelInstanceNotFoundException.java new file mode 100644 index 0000000000000000000000000000000000000000..50a3f4d19e2a1b43db5c7b9354f66706bc72b9ed --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CmmnModelInstanceNotFoundException.java @@ -0,0 +1,48 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.exception.cmmn; + +import org.camunda.bpm.model.cmmn.CmmnModelInstance; + + +/** + *This is exception is thrown when a {@link CmmnModelInstance} is not found.
+ * + * @author Roman Smirnov + * + */ +public class CmmnModelInstanceNotFoundException extends CaseException { + + private static final long serialVersionUID = 1L; + + public CmmnModelInstanceNotFoundException() { + super(); + } + + public CmmnModelInstanceNotFoundException(String message, Throwable cause) { + super(message, cause); + } + + public CmmnModelInstanceNotFoundException(String message) { + super(message); + } + + public CmmnModelInstanceNotFoundException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DecisionDefinitionNotFoundException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DecisionDefinitionNotFoundException.java new file mode 100644 index 0000000000000000000000000000000000000000..f92138a3dca4d4698c56f5e50da3134071345766 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DecisionDefinitionNotFoundException.java @@ -0,0 +1,42 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.exception.dmn; + + +/** + *This exception is thrown when a specific decision definition is not found.
+ */ +public class DecisionDefinitionNotFoundException extends DecisionException { + + private static final long serialVersionUID = 1L; + + public DecisionDefinitionNotFoundException() { + } + + public DecisionDefinitionNotFoundException(String message, Throwable cause) { + super(message, cause); + } + + public DecisionDefinitionNotFoundException(String message) { + super(message); + } + + public DecisionDefinitionNotFoundException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DecisionException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DecisionException.java new file mode 100644 index 0000000000000000000000000000000000000000..0db8ba7ab671979d2572ac9eb0881fc40e6daa31 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DecisionException.java @@ -0,0 +1,44 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.exception.dmn; + +import org.camunda.bpm.engine.ProcessEngineException; + +/** + *This exception is thrown when something happens related to a decision.
+ */ +public class DecisionException extends ProcessEngineException { + + private static final long serialVersionUID = 1L; + + public DecisionException() { + super(); + } + + public DecisionException(String message, Throwable cause) { + super(message, cause); + } + + public DecisionException(String message) { + super(message); + } + + public DecisionException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DmnModelInstanceNotFoundException.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DmnModelInstanceNotFoundException.java new file mode 100644 index 0000000000000000000000000000000000000000..e4781eebace34c57a67d97b5f189c5e68d0bd977 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DmnModelInstanceNotFoundException.java @@ -0,0 +1,45 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.exception.dmn; + +import org.camunda.bpm.model.dmn.DmnModelInstance; + + +/** + *This exception is thrown when a {@link DmnModelInstance} is not found.
+ */ +public class DmnModelInstanceNotFoundException extends DecisionException { + + private static final long serialVersionUID = 1L; + + public DmnModelInstanceNotFoundException() { + super(); + } + + public DmnModelInstanceNotFoundException(String message, Throwable cause) { + super(message, cause); + } + + public DmnModelInstanceNotFoundException(String message) { + super(message); + } + + public DmnModelInstanceNotFoundException(Throwable cause) { + super(cause); + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTask.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTask.java new file mode 100644 index 0000000000000000000000000000000000000000..b505c94bf5c39c24f895cde84a3f3ffabbbabbb1 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTask.java @@ -0,0 +1,145 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.externaltask; + +import java.util.Date; +import java.util.Map; + +import org.camunda.bpm.engine.ExternalTaskService; + +/** + * Represents an instance of an external task that is created when + * a service-task like activity (i.e. service task, send task, ...) with + * attributecamunda:type="external" is executed.
+ *
+ * @author Thorben Lindhauer
+ */
+public interface ExternalTask {
+
+ /**
+ * @return the id of the task
+ */
+ String getId();
+
+ /**
+ * @return the name of the topic the task belongs to
+ */
+ String getTopicName();
+
+ /**
+ * @return the id of the worker that has locked the task
+ */
+ String getWorkerId();
+
+ /**
+ * @return the absolute time at which the lock expires
+ */
+ Date getLockExpirationTime();
+
+ /**
+ * @return the absolute time at which the task was created
+ * @return
+ */
+ Date getCreateTime();
+
+ /**
+ * @return the id of the process instance the task exists in
+ */
+ String getProcessInstanceId();
+
+ /**
+ * @return the id of the execution that the task is assigned to
+ */
+ String getExecutionId();
+
+ /**
+ * @return the id of the activity for which the task is created
+ */
+ String getActivityId();
+
+ /**
+ * @return the id of the activity instance in which context the task exists
+ */
+ String getActivityInstanceId();
+
+ /**
+ * @return the id of the process definition the tasks activity belongs to
+ */
+ String getProcessDefinitionId();
+
+ /**
+ * @return the key of the process definition the tasks activity belongs to
+ */
+ String getProcessDefinitionKey();
+
+ /**
+ * @return the version tag of the process definition the tasks activity belongs to
+ */
+ String getProcessDefinitionVersionTag();
+
+ /**
+ * @return the number of retries left. The number of retries is provided by
+ * a task client, therefore the initial value is null.
+ */
+ Integer getRetries();
+
+ /**
+ * @return short error message submitted with the latest reported failure executing this task;
+ * null if no failure was reported previously or if no error message
+ * was submitted
+ *
+ * @see ExternalTaskService#handleFailure(String, String,String, String, int, long)
+ *
+ * To get the full error details,
+ * use {@link ExternalTaskService#getExternalTaskErrorDetails(String)}
+ */
+ String getErrorMessage();
+
+ /**
+ * @return true if the external task is suspended; a suspended external task
+ * cannot be completed, thereby preventing process continuation
+ */
+ boolean isSuspended();
+
+ /**
+ * @return the id of the tenant the task belongs to. Can be null
+ * if the task belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /**
+ * Returns the priority of the external task.
+ *
+ * @return the priority of the external task
+ */
+ long getPriority();
+
+ /**
+ * Returns a map containing all custom extension properties of the external task.
+ *
+ * @return the properties, never null
+ */
+ Mapnull.
+ */
+ Integer getRetries();
+
+ /**
+ * @return the full error message submitted with the latest reported failure executing this task;
+ * null if no failure was reported previously or if no error message
+ * was submitted
+ *
+ * @see ExternalTaskService#handleFailure(String, String, String, int, long)
+ */
+ String getErrorMessage();
+
+ /**
+ * @return error details submitted with the latest reported failure executing this task;
+ * null if no failure was reported previously or if no error details
+ * was submitted
+ *
+ * @see ExternalTaskService#handleFailure(String, String, String, String, int, long)
+ */
+ String getErrorDetails();
+
+ /**
+ * @return a map of variables that contains an entry for every variable
+ * that was specified at fetching time, if such a variable exists in the tasks
+ * ancestor execution hierarchy.
+ */
+ VariableMap getVariables();
+
+ /**
+ * @return the id of the tenant the task belongs to. Can be null
+ * if the task belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /**
+ * Returns the priority of the locked external task.
+ * The default priority is 0.
+ * @return the priority of the external task
+ */
+ long getPriority();
+
+ /**
+ * Returns the business key of the process instance the external task belongs to
+ *
+ * @return the business key
+ */
+ String getBusinessKey();
+
+ /**
+ * Returns a map of custom extension properties if the fetch instructions
+ * indicate to include extension properties.
+ *
+ * If extension properties are included, the returned map contains any
+ * extension property that is defined in the model definition of the external
+ * task. If extension properties not included or no properties are defined for
+ * the external task, the map will be empty.
+ *
+ * @return a map with all defined custom extension properties, never
+ * null
+ */
+ Mapnull message is created.
+ * If the old value is 0 and the new value is greater than 0, an existing incident
+ * is resolved.
+ *
+ * @param retries
+ *
+ * @throws org.camunda.bpm.engine.BadUserRequestException
+ * If no external tasks are found
+ * If a external task id is set to null
+ *
+ * @throws AuthorizationException thrown if the current user does not possess any of the following permissions:
+ * queryMaxResultsLimit (default {@link Integer#MAX_VALUE}).
+ * Please use the batch operation {@link #setAsync} instead.
+ */
+ void set(int retries);
+
+ /**
+ * Sets the retries for external tasks asynchronously as batch. The returned batch
+ * can be used to track the progress.
+ *
+ * If the new value is 0, a new incident with a null message is created.
+ * If the old value is 0 and the new value is greater than 0, an existing incident
+ * is resolved.
+ *
+ * @param retries
+ *
+ * @throws org.camunda.bpm.engine.BadUserRequestException
+ * If no external tasks are found or if a external task id is set to null
+ *
+ * @throws AuthorizationException
+ * if the user has no {@link Permissions#CREATE} or
+ * {@link BatchPermissions#CREATE_BATCH_SET_EXTERNAL_TASK_RETRIES} permission on {@link Resources#BATCH}.
+ */
+ Batch setAsync(int retries);
+
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/UpdateExternalTaskRetriesSelectBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/UpdateExternalTaskRetriesSelectBuilder.java
new file mode 100644
index 0000000000000000000000000000000000000000..2c1547b3b355d4ffa30823fcb67b78cea41ada27
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/UpdateExternalTaskRetriesSelectBuilder.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.externaltask;
+
+import java.util.List;
+
+import org.camunda.bpm.engine.history.HistoricProcessInstanceQuery;
+import org.camunda.bpm.engine.runtime.ProcessInstanceQuery;
+
+public interface UpdateExternalTaskRetriesSelectBuilder {
+
+ /**
+ * Selects a list of external tasks with the given list of ids.
+ */
+ UpdateExternalTaskRetriesBuilder externalTaskIds(ListRepresents an individual field in a form.
+ * + * @author Michael Siebers + * @author Daniel Meyer + * + */ +public interface FormField { + + /** + * @return the Id of a form property. Must be unique for a given form. + * The id is used for mapping the form field to a process variable. + */ + public String getId(); + + /** + * @return the human-readable display name of a form property. + */ + public String getLabel(); + + /** + * @return the type of this form field. + */ + public FormType getType(); + + /** + * @return the name of the type of this form field + */ + public String getTypeName(); + + /** + * @return the default value for this form field. + */ + @Deprecated + public Object getDefaultValue(); + + /** + * @return the value for this form field + */ + public TypedValue getValue(); + + /** + * @return a list of {@link FormFieldValidationConstraint ValidationConstraints}. + */ + public ListRepresents a report result about duration of completed instances for a given period.
+ * + *The result must be interpreted in conjunction with the executed report.
+ * + * @author Roman Smirnov + * + */ +public interface DurationReportResult extends ReportResult { + + /** + *Returns the smallest duration of all completed instances, + * which have been started in the given period.
+ */ + long getMinimum(); + + /** + *Returns the greatest duration of all completed instances, + * which have been started in the given period.
+ */ + long getMaximum(); + + /** + *Returns the average duration of all completed instances, + * which have been started in the given period.
+ */ + long getAverage(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/ExternalTaskState.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/ExternalTaskState.java new file mode 100644 index 0000000000000000000000000000000000000000..0af4abc1de720684cf9c32240c73d55ff69dbdb8 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/ExternalTaskState.java @@ -0,0 +1,71 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + + +public interface ExternalTaskState { + + ExternalTaskState CREATED = new ExternalTaskStateImpl(0, "created"); + ExternalTaskState FAILED = new ExternalTaskStateImpl(1, "failed"); + ExternalTaskState SUCCESSFUL = new ExternalTaskStateImpl(2, "successful"); + ExternalTaskState DELETED = new ExternalTaskStateImpl(3, "deleted"); + + int getStateCode(); + + ///////////////////////////////////////////////////// default implementation + + static class ExternalTaskStateImpl implements ExternalTaskState { + + public final int stateCode; + protected final String name; + + public ExternalTaskStateImpl(int stateCode, String string) { + this.stateCode = stateCode; + this.name = string; + } + + public int getStateCode() { + return stateCode; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + stateCode; + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ExternalTaskStateImpl other = (ExternalTaskStateImpl) obj; + return stateCode == other.stateCode; + } + + @Override + public String toString() { + return name; + } + } + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityInstance.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityInstance.java new file mode 100644 index 0000000000000000000000000000000000000000..4d70f100a605cbd0566db8b94b881d5f0d111402 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityInstance.java @@ -0,0 +1,101 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + +import java.util.Date; + +/** + * Represents one execution of an activity and it's stored permanent for statistics, audit and other business intelligence purposes. + * + * @author Christian Stettler + */ +public interface HistoricActivityInstance { + + /** The unique identifier of this historic activity instance. */ + String getId(); + + /** return the id of the parent activity instance */ + String getParentActivityInstanceId(); + + /** The unique identifier of the activity in the process */ + String getActivityId(); + + /** The display name for the activity */ + String getActivityName(); + + /** + * The activity type of the activity. + * Typically the activity type correspond to the XML tag used in the BPMN 2.0 process definition file. + * + * All activity types are available in {@link org.camunda.bpm.engine.ActivityTypes} + * + * @see org.camunda.bpm.engine.ActivityTypes + */ + String getActivityType(); + + /** Process definition key reference */ + String getProcessDefinitionKey(); + + /** Process definition reference */ + String getProcessDefinitionId(); + + /** Root process instance reference */ + String getRootProcessInstanceId(); + + /** Process instance reference */ + String getProcessInstanceId(); + + /** Execution reference */ + String getExecutionId(); + + /** The corresponding task in case of task activity */ + String getTaskId(); + + /** The called process instance in case of call activity */ + String getCalledProcessInstanceId(); + + /** The called case instance in case of (case) call activity */ + String getCalledCaseInstanceId(); + + /** Assignee in case of user task activity */ + String getAssignee(); + + /** Time when the activity instance started */ + Date getStartTime(); + + /** Time when the activity instance ended */ + Date getEndTime(); + + /** Difference between {@link #getEndTime()} and {@link #getStartTime()}. */ + Long getDurationInMillis(); + + /** Did this activity instance complete a BPMN 2.0 scope */ + boolean isCompleteScope(); + + /** Was this activity instance canceled */ + boolean isCanceled(); + + /** + * The id of the tenant this historic activity instance belongs to. Can benull
+ * if the historic activity instance belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /** The time the historic activity instance will be removed. */
+ Date getRemovalTime();
+
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityInstanceQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityInstanceQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..dc9919469b38218107f62d5f763b5a07db4f9aad
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityInstanceQuery.java
@@ -0,0 +1,153 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import java.util.Date;
+
+import org.camunda.bpm.engine.query.Query;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+
+
+/**
+ * Programmatic querying for {@link HistoricActivityInstance}s.
+ *
+ * @author Tom Baeyens
+ */
+public interface HistoricActivityInstanceQuery extends QuerySort the {@link HistoricActivityInstance activity instances} in the order in which + * they occurred (ie. started) and needs to be followed by {@link #asc()} or {@link #desc()}.
+ * + *The set of all {@link HistoricActivityInstance activity instances} is a partially + * ordered set. At a BPMN level this means that instances of concurrent activities (example: + * activities on different parallel branched after a parallel gateway) cannot be compared to each other. + * Instances of activities which are part of happens-before relation at the BPMN level will be ordered + * in respect to that relation.
+ * + *Technically this means that {@link HistoricActivityInstance activity instances} + * with different {@link HistoricActivityInstance#getExecutionId() execution ids} are + * incomparable. Only {@link HistoricActivityInstance activity instances} with + * the same {@link HistoricActivityInstance#getExecutionId() execution id} can be totally + * ordered by using {@link #executionId(String)} and {@link #orderPartiallyByOccurrence()} + * which will return a result set ordered by its occurrence.
+ * + * @since 7.3 + */ + HistoricActivityInstanceQuery orderPartiallyByOccurrence(); + + /** Only select historic activity instances with one of the given tenant ids. */ + HistoricActivityInstanceQuery tenantIdIn(String... tenantIds); + + /** Only selects historic activity instances that have no tenant id. */ + HistoricActivityInstanceQuery withoutTenantId(); + + /** + * Order by tenant id (needs to be followed by {@link #asc()} or {@link #desc()}). + * Note that the ordering of historic activity instances without tenant id is database-specific. + */ + HistoricActivityInstanceQuery orderByTenantId(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityStatistics.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityStatistics.java new file mode 100644 index 0000000000000000000000000000000000000000..ab05cb86843475dbb4601e1d6a46873a41deba9d --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityStatistics.java @@ -0,0 +1,60 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + +/** + * + * @author Roman Smirnov + * + */ +public interface HistoricActivityStatistics { + + /** + * The activity id. + */ + String getId(); + + /** + * The number of all running instances of the activity. + */ + long getInstances(); + + /** + * The number of all finished instances of the activity. + */ + long getFinished(); + + /** + * The number of all canceled instances of the activity. + */ + long getCanceled(); + + /** + * The number of all instances, which complete a scope (ie. in bpmn manner: an activity + * which consumed a token and did not produced a new one), of the activity. + */ + long getCompleteScope(); + + /** The number of open incidents of the activity. */ + long getOpenIncidents(); + + /** The number of resolved incidents of the activity. */ + long getResolvedIncidents(); + + /** The number of deleted incidents of the activity. */ + long getDeletedIncidents(); +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityStatisticsQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityStatisticsQuery.java new file mode 100644 index 0000000000000000000000000000000000000000..d0ea4b725b1c8d422e33b54d7fee62bc366a8b33 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricActivityStatisticsQuery.java @@ -0,0 +1,68 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + +import java.util.Date; +import org.camunda.bpm.engine.query.Query; + +/** + * + * @author Roman Smirnov + * + */ +public interface HistoricActivityStatisticsQuery extends Querynull
+ * if the historic case activity instance belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /** The time when the case activity was created. */
+ Date getCreateTime();
+
+ /** The time when the case activity ended */
+ Date getEndTime();
+
+ /** Difference between {@link #getEndTime()} and {@link #getCreateTime()}. */
+ Long getDurationInMillis();
+
+ /** Check if the case activity is required. */
+ boolean isRequired();
+
+ /** Check if the case activity is available. */
+ boolean isAvailable();
+
+ /** Check if the case activity is enabled. */
+ boolean isEnabled();
+
+ /** Check if the case activity is disabled. */
+ boolean isDisabled();
+
+ /** Check if the case activity is active. */
+ boolean isActive();
+
+ /** Check if the case activity is completed. */
+ boolean isCompleted();
+
+ /** Check if the case activity is terminated. */
+ boolean isTerminated();
+
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricCaseActivityInstanceQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricCaseActivityInstanceQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..d18b349261c1a1bc6627f837772e8b80801ed277
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricCaseActivityInstanceQuery.java
@@ -0,0 +1,140 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import java.util.Date;
+
+import org.camunda.bpm.engine.query.Query;
+
+
+/**
+ * Programmatic querying for {@link HistoricCaseActivityInstance}s.
+ *
+ * @author Sebastian Menski
+ */
+public interface HistoricCaseActivityInstanceQuery extends Querynull
+ * if the historic case instance belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /** Check if the case is active. */
+ boolean isActive();
+
+ /** Check if the case is completed. */
+ boolean isCompleted();
+
+ /** Check if the case is terminated. */
+ boolean isTerminated();
+
+ /** Check if the case is closed. */
+ boolean isClosed();
+
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricCaseInstanceQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricCaseInstanceQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..a8a3b884c3a70f94c317029a186092656dbcf786
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricCaseInstanceQuery.java
@@ -0,0 +1,254 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+import org.camunda.bpm.engine.exception.NotValidException;
+import org.camunda.bpm.engine.query.Query;
+
+/**
+ * Allows programmatic querying of {@link HistoricCaseInstance}s.
+ *
+ * @author Tom Baeyens
+ * @author Joram Barrez
+ * @author Falko Menge
+ */
+public interface HistoricCaseInstanceQuery extends QueryOnly selects historic case instances with historic case activity instances + * in at least one of the given case activity ids.
+ */ + HistoricCaseInstanceQuery caseActivityIdIn(String... caseActivityIds); + + /** Only select historic case instances that were created before the given date. */ + HistoricCaseInstanceQuery createdBefore(Date date); + + /** Only select historic case instances that were created after the given date. */ + HistoricCaseInstanceQuery createdAfter(Date date); + + /** Only select historic case instances that were closed before the given date. */ + HistoricCaseInstanceQuery closedBefore(Date date); + + /** Only select historic case instances that were closed after the given date. */ + HistoricCaseInstanceQuery closedAfter(Date date); + + /** Only select historic case instance that are created by the given user. */ + HistoricCaseInstanceQuery createdBy(String userId); + + /** Only select historic case instances started by the given case instance. */ + HistoricCaseInstanceQuery superCaseInstanceId(String superCaseInstanceId); + + /** Only select historic case instances having a sub case instance + * with the given case instance id. + * + * Note that there will always be maximum only one + * such case instance that can be the result of this query. + */ + HistoricCaseInstanceQuery subCaseInstanceId(String subCaseInstanceId); + + /** Only select historic case instances started by the given process instance. */ + HistoricCaseInstanceQuery superProcessInstanceId(String superProcessInstanceId); + + /** Only select historic case instances having a sub process instance + * with the given process instance id. + * + * Note that there will always be maximum only one + * such case instance that can be the result of this query. + */ + HistoricCaseInstanceQuery subProcessInstanceId(String subProcessInstanceId); + + /** Only select historic case instances with one of the given tenant ids. */ + HistoricCaseInstanceQuery tenantIdIn(String... tenantIds); + + /** Only selects historic case instances which have no tenant id. */ + HistoricCaseInstanceQuery withoutTenantId(); + + /** Only select historic case instances which are active */ + HistoricCaseInstanceQuery active(); + + /** Only select historic case instances which are completed */ + HistoricCaseInstanceQuery completed(); + + /** Only select historic case instances which are terminated */ + HistoricCaseInstanceQuery terminated(); + + /** Only select historic case instances which are closed */ + HistoricCaseInstanceQuery closed(); + + /** Only select historic case instance that are not yet closed. */ + HistoricCaseInstanceQuery notClosed(); + + /** + * The query will match the names of variables in a case-insensitive way. + */ + HistoricCaseInstanceQuery matchVariableNamesIgnoreCase(); + + /** + * The query will match the values of variables in a case-insensitive way. + */ + HistoricCaseInstanceQuery matchVariableValuesIgnoreCase(); + + /** + * Only select case instances which have a global variable with the given value. + * + * @param name the name of the variable + * @param value the value of the variable + * @throws NotValidException if the name is null + */ + HistoricCaseInstanceQuery variableValueEquals(String name, Object value); + + /** + * Only select case instances which have a global variable with the given name + * but a different value. + * + * @param name the name of the variable + * @param value the value of the variable + * @throws NotValidException if the name is null + */ + HistoricCaseInstanceQuery variableValueNotEquals(String name, Object value); + + /** + * Only select case instances which had a global variable with the given name + * and a value greater than the given value when they where closed. + * + * @param name the name of the variable + * @param value the value of the variable + * @throws NotValidException if the name or value is null + */ + HistoricCaseInstanceQuery variableValueGreaterThan(String name, Object value); + + /** + * Only select case instances which have a global variable with the given name + * and a value greater or equal than the given value. + * + * @param name the name of the variable + * @param value the value of the variable + * @throws NotValidException if the name or value is null + */ + HistoricCaseInstanceQuery variableValueGreaterThanOrEqual(String name, Object value); + + /** + * Only select case instances which have a global variable with the given name + * and a value less than the given value. + * + * @param name the name of the variable + * @param value the value of the variable + * @throws NotValidException if the name or value is null + */ + HistoricCaseInstanceQuery variableValueLessThan(String name, Object value); + + /** + * Only select case instances which have a global variable with the given name + * and a value less or equal than the given value. + * + * @param name the name of the variable + * @param value the value of the variable + * @throws NotValidException if the name or value is null + */ + HistoricCaseInstanceQuery variableValueLessThanOrEqual(String name, Object value); + + /** + * Only select case instances which have a global variable with the given name + * and a value like given value. + * + * @param name the name of the variable + * @param value the value of the variable, it can include the wildcard character '%' + * to express like-strategy: starts with (string%), ends with (%string), + * contains (%string%) + * @throws NotValidException if the name or value is null + */ + HistoricCaseInstanceQuery variableValueLike(String name, String value); + + /** + * Only select case instances which have a global variable + * with the given name and not matching the given value. + * The syntax is that of SQL: for example usage: valueNotLike(%value%) + * @param name the name of the variable + * @param value the value of the variable, it can include the wildcard character '%' + * to express like-strategy: starts with (string%), ends with (%string), + * contains (%string%) + * @throws NotValidException if the name or value is null or a null-value or a boolean-value is used + */ + HistoricCaseInstanceQuery variableValueNotLike(String name, String value); + + /** Order by the case instance id (needs to be followed by {@link #asc()} or {@link #desc()}). */ + HistoricCaseInstanceQuery orderByCaseInstanceId(); + + /** Order by the case definition id (needs to be followed by {@link #asc()} or {@link #desc()}). */ + HistoricCaseInstanceQuery orderByCaseDefinitionId(); + + /** Order by the business key (needs to be followed by {@link #asc()} or {@link #desc()}). */ + HistoricCaseInstanceQuery orderByCaseInstanceBusinessKey(); + + /** Order by the create time (needs to be followed by {@link #asc()} or {@link #desc()}). */ + HistoricCaseInstanceQuery orderByCaseInstanceCreateTime(); + + /** Order by the close time (needs to be followed by {@link #asc()} or {@link #desc()}). */ + HistoricCaseInstanceQuery orderByCaseInstanceCloseTime(); + + /** Order by the duration of the case instance (needs to be followed by {@link #asc()} or {@link #desc()}). */ + HistoricCaseInstanceQuery orderByCaseInstanceDuration(); + + /** + * Order by tenant id (needs to be followed by {@link #asc()} or {@link #desc()}). + * Note that the ordering of historic case instances without tenant id is database-specific. + */ + HistoricCaseInstanceQuery orderByTenantId(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInputInstance.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInputInstance.java new file mode 100644 index 0000000000000000000000000000000000000000..11a8b5c09c9aea0c15758c81c7f913d9427d20e9 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInputInstance.java @@ -0,0 +1,80 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + +import java.util.Date; + +import org.camunda.bpm.engine.variable.value.TypedValue; + +/** + * Represents one input variable of a decision evaluation. + * + * @author Philipp Ossler + */ +public interface HistoricDecisionInputInstance { + + /** The unique identifier of this historic decision input instance. */ + String getId(); + + /** The unique identifier of the historic decision instance. */ + String getDecisionInstanceId(); + + /** The unique identifier of the clause that the value is assigned for. + * Can benull if the decision is not implemented as decision table. */
+ String getClauseId();
+
+ /** The name of the clause that the value is assigned for.
+ * Can be null if the decision is not implemented as decision table. */
+ String getClauseName();
+
+ /**
+ * Returns the type name of the variable
+ */
+ String getTypeName();
+
+ /**
+ * Returns the value of this variable instance.
+ */
+ Object getValue();
+
+ /**
+ * Returns the {@link TypedValue} for this value.
+ */
+ TypedValue getTypedValue();
+
+ /**
+ * If the variable value could not be loaded, this returns the error message.
+ *
+ * @return an error message indicating why the variable value could not be loaded.
+ */
+ String getErrorMessage();
+
+ /**
+ * Returns time when the variable was created.
+ */
+ Date getCreateTime();
+
+ /**
+ * Returns the root process instance id of the process instance
+ * on which the associated business rule task has been called.
+ */
+ String getRootProcessInstanceId();
+
+ /** The time the historic decision instance will be removed. */
+ Date getRemovalTime();
+
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstance.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstance.java
new file mode 100644
index 0000000000000000000000000000000000000000..eb58f2a82ed9a1957a76f5d7b52816cef7c86c09
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstance.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import java.util.Date;
+import java.util.List;
+
+import org.camunda.bpm.engine.ProcessEngineException;
+
+/**
+ * Represents one evaluation of a decision.
+ *
+ * @author Philipp Ossler
+ * @author Ingo Richtsmeier
+ *
+ */
+public interface HistoricDecisionInstance {
+
+ /** The unique identifier of this historic decision instance. */
+ String getId();
+
+ /** The decision definition reference. */
+ String getDecisionDefinitionId();
+
+ /** The unique identifier of the decision definition */
+ String getDecisionDefinitionKey();
+
+ /** The name of the decision definition */
+ String getDecisionDefinitionName();
+
+ /** Time when the decision was evaluated. */
+ Date getEvaluationTime();
+
+ /** Time when the historic decision instance is to be removed. */
+ Date getRemovalTime();
+
+ /** The corresponding key of the process definition in case the decision was evaluated inside a process. */
+ String getProcessDefinitionKey();
+
+ /** The corresponding id of the process definition in case the decision was evaluated inside a process. */
+ String getProcessDefinitionId();
+
+ /** The corresponding process instance in case the decision was evaluated inside a process. */
+ String getProcessInstanceId();
+
+ /** The corresponding key of the case definition in case the decision was evaluated inside a case. */
+ String getCaseDefinitionKey();
+
+ /** The corresponding id of the case definition in case the decision was evaluated inside a case. */
+ String getCaseDefinitionId();
+
+ /** The corresponding case instance in case the decision was evaluated inside a case. */
+ String getCaseInstanceId();
+
+ /** The corresponding activity in case the decision was evaluated inside a process or a case. */
+ String getActivityId();
+
+ /** The corresponding activity instance in case the decision was evaluated inside a process or a case. */
+ String getActivityInstanceId();
+
+ /**
+ * The user ID in case the decision was evaluated by an authenticated user using the decision service
+ * outside of an execution context.
+ */
+ String getUserId();
+
+ /**
+ * The input values of the evaluated decision. The fetching of the input values must be enabled on the query.
+ *
+ * @throws ProcessEngineException if the input values are not fetched.
+ *
+ * @see HistoricDecisionInstanceQuery#includeInputs()
+ */
+ Listnull if this instance is the root decision instance of the evaluation.
+ */
+ String getRootDecisionInstanceId();
+
+ /**
+ * The unique identifier of the root historic process instance of the evaluated root decision
+ * in case the decision was evaluated inside a process, otherwise null.
+ */
+ String getRootProcessInstanceId();
+
+ /**
+ * The id of the related decision requirements definition. Can be
+ * null if the decision has no relations to other decisions.
+ */
+ String getDecisionRequirementsDefinitionId();
+
+ /**
+ * The key of the related decision requirements definition. Can be
+ * null if the decision has no relations to other decisions.
+ */
+ String getDecisionRequirementsDefinitionKey();
+
+ /**
+ * The id of the tenant this historic decision instance belongs to. Can be null
+ * if the historic decision instance belongs to no single tenant.
+ */
+ String getTenantId();
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstanceQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstanceQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..633a6bab62f98fd7e0a0fcf565e6f0c48078c583
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstanceQuery.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import java.util.Date;
+
+import org.camunda.bpm.engine.query.Query;
+
+/**
+ * Allows programmatic querying of {@link HistoricDecisionInstance}s.
+ *
+ * @author Philipp Ossler
+ */
+public interface HistoricDecisionInstanceQuery extends Query The user ID is saved for decisions which are evaluated by a authenticated user without a process or
+ * case instance */
+ HistoricDecisionInstanceQuery userId(String userId);
+
+ /** Enable fetching {@link HistoricDecisionInputInstance} of evaluated decision. */
+ HistoricDecisionInstanceQuery includeInputs();
+
+ /** Enable fetching {@link HistoricDecisionOutputInstance} of evaluated decision. */
+ HistoricDecisionInstanceQuery includeOutputs();
+
+ /** Disable fetching of byte array input and output values. By default, the query will fetch the value of a byte array.
+ * By calling this method you can prevent the values of (potentially large) blob data chunks to be fetched. */
+ HistoricDecisionInstanceQuery disableBinaryFetching();
+
+ /** Disable deserialization of input and output values that are custom objects. By default, the query
+ * will attempt to deserialize the value of these variables. By calling this method you can
+ * prevent such attempts in environments where their classes are not available.
+ * Independent of this setting, variable serialized values are accessible. */
+ HistoricDecisionInstanceQuery disableCustomObjectDeserialization();
+
+ /**
+ * Only select historic decision instances with a given root historic decision
+ * instance id. This also includes the historic decision instance with the
+ * given id.
+ */
+ HistoricDecisionInstanceQuery rootDecisionInstanceId(String decisionInstanceId);
+
+ /** Only select historic decision instances that are the root decision instance of an evaluation. */
+ HistoricDecisionInstanceQuery rootDecisionInstancesOnly();
+
+ /** Only select historic decision instances that belongs to a decision requirements definition with the given id. */
+ HistoricDecisionInstanceQuery decisionRequirementsDefinitionId(String decisionRequirementsDefinitionId);
+
+ /** Only select historic decision instances that belongs to a decision requirements definition with the given key. */
+ HistoricDecisionInstanceQuery decisionRequirementsDefinitionKey(String decisionRequirementsDefinitionKey);
+
+ /** Only select historic decision instances with one of the given tenant ids. */
+ HistoricDecisionInstanceQuery tenantIdIn(String... tenantIds);
+
+ /** Only selects historic decision instances that have no tenant id. */
+ HistoricDecisionInstanceQuery withoutTenantId();
+
+ /** Order by decision instance id
+ * (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricDecisionInstanceQuery orderByDecisionInstanceId();
+
+ /** Order by the time when the decisions was evaluated
+ * (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricDecisionInstanceQuery orderByEvaluationTime();
+
+ /**
+ * Order by tenant id (needs to be followed by {@link #asc()} or {@link #desc()}).
+ * Note that the ordering of historic decision instances without tenant id is database-specific.
+ */
+ HistoricDecisionInstanceQuery orderByTenantId();
+
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstanceStatistics.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstanceStatistics.java
new file mode 100644
index 0000000000000000000000000000000000000000..69893c06bdd71660b947b844673cf523b049d6f6
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstanceStatistics.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+/**
+ * @author Askar Akhmerov
+ */
+public interface HistoricDecisionInstanceStatistics {
+
+ /**
+ * @return count of decision definition evaluations
+ */
+ int getEvaluations();
+
+ /**
+ * @return key of decision definition
+ */
+ String getDecisionDefinitionKey();
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstanceStatisticsQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstanceStatisticsQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..381368ed4bf3554230f137fd52a8c2529be03678
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDecisionInstanceStatisticsQuery.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import org.camunda.bpm.engine.query.Query;
+
+
+/**
+ * @author Askar Akhmerov
+ */
+public interface HistoricDecisionInstanceStatisticsQuery extends Query Sort the {@link HistoricDetail historic detail events} in the order in which
+ * they occurred and needs to be followed by {@link #asc()} or {@link #desc()}. The set of all {@link HistoricVariableUpdate historic variable update events} is
+ * a partially ordered set. Due to this fact {@link HistoricVariableUpdate
+ * historic variable update events} for two different {@link VariableInstance variable
+ * instances} are incomparable. So that it is not possible to sort
+ * the {@link HistoricDetail historic variable update events} for two {@link VariableInstance
+ * variable instances} in the order they occurred. Just for one {@link VariableInstance variable
+ * instance} the set of {@link HistoricVariableUpdate historic variable update events} can be
+ * totally ordered by using {@link #variableInstanceId(String)} and {@link
+ * #orderPartiallyByOccurrence()} which will return a result set ordered by its occurrence. For example: As a result there exists four {@link HistoricVariableUpdate historic variable update events}. By using {@link #variableInstanceId(String)} and {@link #orderPartiallyByOccurrence()} it
+ * is possible to sort the events in the order in which they occurred. The following query will return the following totally ordered result set Note: The {@link HistoricExternalTaskLog} is used to have a log containing
+ * information about {@link ExternalTask task} execution. The log provides
+ * details about the last lifecycle state of a {@link ExternalTask task}: Historic form fields
+ *
+ * For example: The {@link HistoricJobLog} is used to have a log containing
+ * information about {@link Job job} execution. The log provides
+ * details about the complete lifecycle of a {@link Job job}: Sort the {@link HistoricJobLog historic job logs} in the order in which
+ * they occurred and needs to be followed by {@link #asc()} or {@link #desc()}. The set of all {@link HistoricJobLog historic job logs} is a partially ordered
+ * set. Due to this fact {@link HistoricJobLog historic job logs} with different
+ * {@link HistoricJobLog#getJobId() job ids} are incomparable. Only {@link
+ * HistoricJobLog historic job logs} with the same {@link HistoricJobLog#getJobId() job id} can
+ * be totally ordered by using {@link #jobId(String)} and {@link #orderPartiallyByOccurrence()}
+ * which will return a result set ordered by its occurrence.
+ * Note that there will always be maximum only one
+ * such process instance that can be the result of this query.
+ */
+ HistoricProcessInstanceQuery subProcessInstanceId(String subProcessInstanceId);
+
+ /**
+ * Only select historic process instances started by the given case
+ * instance.
+ */
+ HistoricProcessInstanceQuery superCaseInstanceId(String superCaseInstanceId);
+
+ /**
+ * Only select historic process instances having a sub case instance
+ * with the given case instance id.
+ *
+ * Note that there will always be maximum only one
+ * such process instance that can be the result of this query.
+ */
+ HistoricProcessInstanceQuery subCaseInstanceId(String subCaseInstanceId);
+
+ /**
+ * Only select historic process instances with one of the given tenant ids.
+ */
+ HistoricProcessInstanceQuery tenantIdIn(String... tenantIds);
+
+ /**
+ * Only selects historic process instances which have no tenant id.
+ */
+ HistoricProcessInstanceQuery withoutTenantId();
+
+ /**
+ * Order by tenant id (needs to be followed by {@link #asc()} or {@link #desc()}).
+ * Note that the ordering of historic process instances without tenant id is database-specific.
+ */
+ HistoricProcessInstanceQuery orderByTenantId();
+
+ /**
+ * Only select historic process instances that were started as of the provided
+ * date. (Date will be adjusted to reflect midnight)
+ *
+ * @deprecated use {@link #startedAfter(Date)} and {@link #startedBefore(Date)} instead
+ */
+ @Deprecated
+ HistoricProcessInstanceQuery startDateBy(Date date);
+
+ /**
+ * Only select historic process instances that were started on the provided date.
+ *
+ * @deprecated use {@link #startedAfter(Date)} and {@link #startedBefore(Date)} instead
+ */
+ @Deprecated
+ HistoricProcessInstanceQuery startDateOn(Date date);
+
+ /**
+ * Only select historic process instances that were finished as of the
+ * provided date. (Date will be adjusted to reflect one second before midnight)
+ *
+ * @deprecated use {@link #startedAfter(Date)} and {@link #startedBefore(Date)} instead
+ */
+ @Deprecated
+ HistoricProcessInstanceQuery finishDateBy(Date date);
+
+ /**
+ * Only select historic process instances that were finished on provided date.
+ *
+ * @deprecated use {@link #startedAfter(Date)} and {@link #startedBefore(Date)} instead
+ */
+ @Deprecated
+ HistoricProcessInstanceQuery finishDateOn(Date date);
+
+ /**
+ * Only select historic process instances that executed an activity after the given date.
+ */
+ HistoricProcessInstanceQuery executedActivityAfter(Date date);
+
+ /**
+ * Only select historic process instances that executed an activity before the given date.
+ */
+ HistoricProcessInstanceQuery executedActivityBefore(Date date);
+
+ /**
+ * Only select historic process instances that executed activities with given ids.
+ */
+ HistoricProcessInstanceQuery executedActivityIdIn(String... ids);
+
+ /**
+ * Only select historic process instances that have active activities with given ids.
+ */
+ HistoricProcessInstanceQuery activeActivityIdIn(String... ids);
+
+ /**
+ * Only select historic process instances with an active activity with one of the given ids.
+ * In contrast to the `activeActivityIdIn` filter, it can query for async and incident activities.
+ */
+ HistoricProcessInstanceQuery activityIdIn(String... ids);
+
+ /**
+ * Only select historic process instances that executed an job after the given date.
+ */
+ HistoricProcessInstanceQuery executedJobAfter(Date date);
+
+ /**
+ * Only select historic process instances that executed an job before the given date.
+ */
+ HistoricProcessInstanceQuery executedJobBefore(Date date);
+
+ /**
+ * Only select historic process instances that are active.
+ */
+ HistoricProcessInstanceQuery active();
+
+ /**
+ * Only select historic process instances that are suspended.
+ */
+ HistoricProcessInstanceQuery suspended();
+
+ /**
+ * Only select historic process instances that are completed.
+ */
+ HistoricProcessInstanceQuery completed();
+
+ /**
+ * Only select historic process instances that are externallyTerminated.
+ */
+ HistoricProcessInstanceQuery externallyTerminated();
+
+ /**
+ * Only select historic process instances that are internallyTerminated.
+ */
+ HistoricProcessInstanceQuery internallyTerminated();
+
+ /**
+ * After calling or(), a chain of several filter criteria could follow. Each filter criterion that follows or()
+ * will be linked together with an OR expression until the OR query is terminated. To terminate the OR query right
+ * after the last filter criterion was applied, {@link #endOr()} must be invoked. endOr() terminates an OR query on which an arbitrary amount of filter criteria were applied. To terminate the
+ * OR query which has been started by invoking {@link #or()}, endOr() must be invoked. Filter criteria which are
+ * applied after calling endOr() are linked together by an AND expression. Defines a report query for {@link HistoricProcessInstance}s. After calling or(), a chain of several filter criteria could follow. Each filter criterion that follows or()
+ * will be linked together with an OR expression until the OR query is terminated. To terminate the OR query right
+ * after the last filter criterion was applied, {@link #endOr()} must be invoked. endOr() terminates an OR query on which an arbitrary amount of filter criteria were applied. To terminate the
+ * OR query which has been started by invoking {@link #or()}, endOr() must be invoked. Filter criteria which are
+ * applied after calling endOr() are linked together by an AND expression. Sets the completed after date for constraining the query to search for all tasks
+ * which are completed after a certain date. Sets the completed before date for constraining the query to search for all tasks
+ * which are completed before a certain date. Executes the task report query and returns a list of {@link HistoricTaskInstanceReportResult}s Executes the task report query and returns a list of {@link HistoricTaskInstanceReportResult}s Returns the count of the grouped items. Returns the process definition key for the selected definition key. Returns the process definition id for the selected definition key Returns the name of the task Returns the id of the tenant task Deprecated since 7.2: use {@link #getName()} instead. Returns the name of the type of this variable instance Deprecated since 7.2: use {@link #getTypeName()} instead. Returns a period which specifies a time span within a year. The returned period must be interpreted in conjunction
+ * with the returned {@link PeriodUnit} of {@link #getPeriodUnit()}.null if the decision is not implemented as decision table. */
+ String getClauseId();
+
+ /** The name of the clause that the value is assigned for.
+ * Can be null if the decision is not implemented as decision table. */
+ String getClauseName();
+
+ /** The unique identifier of the rule that is matched.
+ * Can be null if the decision is not implemented as decision table. */
+ String getRuleId();
+
+ /** The order of the rule that is matched.
+ * Can be null if the decision is not implemented as decision table. */
+ Integer getRuleOrder();
+
+ /** The name of the output variable. */
+ String getVariableName();
+
+ /**
+ * Returns the type name of the variable
+ */
+ String getTypeName();
+
+ /**
+ * Returns the value of this variable instance.
+ */
+ Object getValue();
+
+ /**
+ * Returns the {@link TypedValue} for this value.
+ */
+ TypedValue getTypedValue();
+
+ /**
+ * If the variable value could not be loaded, this returns the error message.
+ *
+ * @return an error message indicating why the variable value could not be loaded.
+ */
+ String getErrorMessage();
+
+ /**
+ * Returns time when the variable was created.
+ */
+ Date getCreateTime();
+
+ /**
+ * Returns the root process instance id of the process instance
+ * on which the associated business rule task has been called.
+ */
+ String getRootProcessInstanceId();
+
+ /** The time the historic decision instance will be removed. */
+ Date getRemovalTime();
+
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDetail.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDetail.java
new file mode 100644
index 0000000000000000000000000000000000000000..d431a5d89bb11d6250f9ac76fd121710b736b18a
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDetail.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import java.util.Date;
+
+
+
+/** Base class for all kinds of information that is related to
+ * either a {@link HistoricProcessInstance} or a {@link HistoricActivityInstance}.
+ *
+ * @author Tom Baeyens
+ */
+public interface HistoricDetail {
+
+ /** The unique DB id for this historic detail */
+ String getId();
+
+ /** The process definition key reference. */
+ String getProcessDefinitionKey();
+
+ /** The process definition reference. */
+ String getProcessDefinitionId();
+
+ /** The root process instance reference */
+ String getRootProcessInstanceId();
+
+ /** The process instance reference. */
+ String getProcessInstanceId();
+
+ /** The activity reference in case this detail is related to an activity instance. */
+ String getActivityInstanceId();
+
+ /** The identifier for the path of execution. */
+ String getExecutionId();
+
+ /** The case definition key reference. */
+ String getCaseDefinitionKey();
+
+ /** The case definition reference. */
+ String getCaseDefinitionId();
+
+ /** The case instance reference. */
+ String getCaseInstanceId();
+
+ /** The case execution reference. */
+ String getCaseExecutionId();
+
+ /** The identifier for the task. */
+ String getTaskId();
+
+ /** The time when this detail occurred */
+ Date getTime();
+
+ /**
+ * The id of the tenant this historic detail belongs to. Can be null
+ * if the historic detail belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /**
+ * The id of operation. Helps to link records in different historic tables.
+ * References operationId of user operation log entry.
+ */
+ String getUserOperationId();
+
+ /** The time the historic detail will be removed. */
+ Date getRemovalTime();
+
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDetailQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDetailQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..c20eacb39c4d807c0696caf3a17a7bb65d371ab0
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricDetailQuery.java
@@ -0,0 +1,210 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import java.util.Date;
+import org.camunda.bpm.engine.query.Query;
+import org.camunda.bpm.engine.runtime.CaseExecution;
+import org.camunda.bpm.engine.runtime.CaseInstance;
+import org.camunda.bpm.engine.runtime.Execution;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.runtime.VariableInstance;
+
+/**
+ * Programmatic querying for {@link HistoricDetail}s.
+ *
+ * @author Tom Baeyens
+ */
+public interface HistoricDetailQuery extends Query
+ * An execution variable myVariable will be updated multiple times:
+ * runtimeService.setVariable("anExecutionId", "myVariable", 1000);
+ *
+ *
+ * execution.setVariable("myVariable", 5000);
+ * runtimeService.setVariable("anExecutionId", "myVariable", 2500);
+ * runtimeService.removeVariable("anExecutionId", "myVariable");
+ *
+ * historyService.createHistoricDetailQuery()
+ *
+ *
+ * .variableInstanceId("myVariableInstId")
+ * .orderPartiallyByOccurrence()
+ * .asc()
+ * .list()
+ *
+ * [
+ *
+ *
+ * HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: 1000],
+ * HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: 5000],
+ * HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: 2500]
+ * HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: null]
+ * ]
+ *
+ * Please note that a {@link HistoricFormField historic form field event} can occur only once.this historic external task log.
+ */
+ String getId();
+
+ /**
+ * Returns the time when this log occurred.
+ */
+ Date getTimestamp();
+
+ /**
+ * Returns the id of the associated external task.
+ */
+ String getExternalTaskId();
+
+ /**
+ * Returns the retries of the associated external task before the associated external task has
+ * been executed and when this log occurred.
+ */
+ Integer getRetries();
+
+ /**
+ * Returns the priority of the associated external task when this log entry was created.
+ */
+ long getPriority();
+
+ /**
+ * Returns the topic name of the associated external task.
+ */
+ String getTopicName();
+
+ /**
+ * Returns the id of the worker that fetched the external task most recently.
+ */
+ String getWorkerId();
+
+ /**
+ * Returns the message of the error that occurred by executing the associated external task.
+ *
+ * To get the full error details,
+ * use {@link HistoryService#getHistoricExternalTaskLogErrorDetails(String)}
+ */
+ String getErrorMessage();
+
+ /**
+ * Returns the id of the activity which the external task associated with.
+ */
+ String getActivityId();
+
+ /**
+ * Returns the id of the activity instance on which the associated external task was created.
+ */
+ String getActivityInstanceId();
+
+ /**
+ * Returns the specific execution id on which the associated external task was created.
+ */
+ String getExecutionId();
+
+ /**
+ * Returns the specific root process instance id of the process instance
+ * on which the associated external task was created.
+ */
+ String getRootProcessInstanceId();
+
+ /**
+ * Returns the specific process instance id on which the associated external task was created.
+ */
+ String getProcessInstanceId();
+
+ /**
+ * Returns the specific process definition id on which the associated external task was created.
+ */
+ String getProcessDefinitionId();
+
+ /**
+ * Returns the specific process definition key on which the associated external task was created.
+ */
+ String getProcessDefinitionKey();
+
+ /**
+ * Returns the id of the tenant this external task log entry belongs to. Can be null
+ * if the external task log entry belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /**
+ * Returns true when this log represents
+ * the creation of the associated external task.
+ */
+ boolean isCreationLog();
+
+ /**
+ * Returns true when this log represents
+ * the failed execution of the associated external task.
+ */
+ boolean isFailureLog();
+
+ /**
+ * Returns true when this log represents
+ * the successful execution of the associated external task.
+ */
+ boolean isSuccessLog();
+
+ /**
+ * Returns true when this log represents
+ * the deletion of the associated external task.
+ */
+ boolean isDeletionLog();
+
+ /** The time the historic external task log will be removed. */
+ Date getRemovalTime();
+
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricExternalTaskLogQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricExternalTaskLogQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..0803852bf219369c9658fb02c1afaffe63345fa5
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricExternalTaskLogQuery.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import org.camunda.bpm.engine.query.Query;
+
+public interface HistoricExternalTaskLogQuery extends QueryfailedJobs will be returned
+ * in the case of an incident, which identify failed job
+ * during the execution of a process instance.
+ */
+ String getIncidentType();
+
+ /**
+ * Returns the incident message.
+ */
+ String getIncidentMessage();
+
+ /**
+ * Returns the specific execution on which this
+ * incident has happened.
+ */
+ String getExecutionId();
+
+ /**
+ * Returns the id of the activity of the process instance
+ * on which this incident has happened.
+ */
+ String getActivityId();
+
+ /**
+ * Returns the specific root process instance id of the process instance
+ * on which this incident has happened.
+ */
+ String getRootProcessInstanceId();
+
+ /**
+ * Returns the specific process instance on which this
+ * incident has happened.
+ */
+ String getProcessInstanceId();
+
+ /**
+ * Returns the id of the process definition of this
+ * process instance on which the incident has happened.
+ */
+ String getProcessDefinitionId();
+
+ /**
+ * Returns the key of the process definition of this
+ * process instance on which the incident has happened.
+ */
+ String getProcessDefinitionKey();
+
+ /**
+ * Returns the id of the incident on which this incident
+ * has been triggered.
+ */
+ String getCauseIncidentId();
+
+ /**
+ * Returns the id of the root incident on which
+ * this transitive incident has been triggered.
+ */
+ String getRootCauseIncidentId();
+
+ /**
+ * Returns the payload of this incident.
+ */
+ String getConfiguration();
+
+ /**
+ * Returns the history payload of this incident.
+ */
+ String getHistoryConfiguration();
+
+ /**
+ * Returns true, iff the corresponding incident
+ * has not been deleted or resolved.
+ */
+ boolean isOpen();
+
+ /**
+ * Returns true, iff the corresponding incident
+ * has been deleted.
+ */
+ boolean isDeleted();
+
+ /**
+ * Returns true, iff the corresponding incident
+ * has been resolved.
+ */
+ boolean isResolved();
+
+ /**
+ * Returns the id of the tenant this incident belongs to. Can be null
+ * if the incident belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /**
+ * Returns the id of the job definition the incident belongs to. Can be null
+ * if the incident belongs to no job definition.
+ */
+ String getJobDefinitionId();
+
+ /** The time the historic incident will be removed. */
+ Date getRemovalTime();
+
+ /**
+ * Returns the id of the activity on which the last exception occurred.
+ */
+ String getFailedActivityId();
+
+ /**
+ * Returns the annotation of this incident
+ */
+ String getAnnotation();
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricIncidentQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricIncidentQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..2dab52750429f65280c8d0fa1a6137303d9d198e
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricIncidentQuery.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import org.camunda.bpm.engine.query.Query;
+
+import java.util.Date;
+
+/**
+ * @author Roman Smirnov
+ *
+ */
+public interface HistoricIncidentQuery extends Query
+ *
+ *
+ * An instance of {@link HistoricJobLog} represents a state in
+ * the lifecycle of a {@link Job job}.
+ *
+ * @author Roman Smirnov
+ *
+ * @since 7.3
+ */
+public interface HistoricJobLog {
+
+ /**
+ * Returns the unique identifier for this historic job log.
+ */
+ String getId();
+
+ /**
+ * Returns the time when this log occurred.
+ */
+ Date getTimestamp();
+
+ /**
+ * Returns the id of the associated job.
+ */
+ String getJobId();
+
+ /**
+ * Returns the due date of the associated job when this log occurred.
+ */
+ Date getJobDueDate();
+
+ /**
+ * Returns the retries of the associated job before the associated job has
+ * been executed and when this log occurred.
+ */
+ int getJobRetries();
+
+ /**
+ * Returns the priority of the associated job when this log entry was created.
+ *
+ * @since 7.4
+ */
+ long getJobPriority();
+
+ /**
+ * Returns the message of the exception that occurred by executing the associated job.
+ *
+ * To get the full exception stacktrace,
+ * use {@link HistoryService#getHistoricJobLogExceptionStacktrace(String)}
+ */
+ String getJobExceptionMessage();
+
+ /**
+ * Returns the id of the job definition on which the associated job was created.
+ */
+ String getJobDefinitionId();
+
+ /**
+ * Returns the job definition type of the associated job.
+ */
+ String getJobDefinitionType();
+
+ /**
+ * Returns the job definition configuration type of the associated job.
+ */
+ String getJobDefinitionConfiguration();
+
+ /**
+ * Returns the id of the activity on which the associated job was created.
+ */
+ String getActivityId();
+
+ /**
+ * Returns the id of the activity on which the last exception occurred.
+ */
+ String getFailedActivityId();
+
+ /**
+ * Returns the specific execution id on which the associated job was created.
+ */
+ String getExecutionId();
+
+ /**
+ * Returns the specific root process instance id of the process instance
+ * on which the associated job was created.
+ */
+ String getRootProcessInstanceId();
+
+ /**
+ * Returns the specific process instance id on which the associated job was created.
+ */
+ String getProcessInstanceId();
+
+ /**
+ * Returns the specific process definition id on which the associated job was created.
+ */
+ String getProcessDefinitionId();
+
+ /**
+ * Returns the specific process definition key on which the associated job was created.
+ */
+ String getProcessDefinitionKey();
+
+ /**
+ * Returns the specific deployment id on which the associated job was created.
+ */
+ String getDeploymentId();
+
+ /**
+ * Returns the id of the tenant this job log entry belongs to. Can be null
+ * if the job log entry belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /**
+ * Returns the name of the host where the Process Engine that added this job log runs.
+ */
+ String getHostname();
+
+ /**
+ * Returns true when this log represents
+ * the creation of the associated job.
+ */
+ boolean isCreationLog();
+
+ /**
+ * Returns true when this log represents
+ * the failed execution of the associated job.
+ */
+ boolean isFailureLog();
+
+ /**
+ * Returns true when this log represents
+ * the successful execution of the associated job.
+ */
+ boolean isSuccessLog();
+
+ /**
+ * Returns true when this log represents
+ * the deletion of the associated job.
+ */
+ boolean isDeletionLog();
+
+ /** The time the historic job log will be removed. */
+ Date getRemovalTime();
+
+ /**
+ * Returns the ID of the batch associated with the job or {@code null} if no batch is associated with the job.
+ * @return the ID of the batch associated with the job
+ */
+ String getBatchId();
+
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricJobLogQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricJobLogQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..cad7ee9beb08df30aadfe94a3d1a04dfbcdec522
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricJobLogQuery.java
@@ -0,0 +1,174 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import org.camunda.bpm.engine.query.Query;
+
+/**
+ * @author Roman Smirnov
+ *
+ */
+public interface HistoricJobLogQuery extends Querysuccessful executed job.
+ */
+ HistoricJobLogQuery successLog();
+
+ /** Only select deleted historic job log entries. */
+ HistoricJobLogQuery deletionLog();
+
+ /** Order by timestamp (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricJobLogQuery orderByTimestamp();
+
+ /** Order by job id (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricJobLogQuery orderByJobId();
+
+ /** Order by job due date (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricJobLogQuery orderByJobDueDate();
+
+ /** Order by job retries (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricJobLogQuery orderByJobRetries();
+
+ /**
+ * Order by job priority (needs to be followed by {@link #asc()} or {@link #desc()}).
+ *
+ * @since 7.4
+ */
+ HistoricJobLogQuery orderByJobPriority();
+
+ /** Order by job definition id (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricJobLogQuery orderByJobDefinitionId();
+
+ /** Order by activity id (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricJobLogQuery orderByActivityId();
+
+ /** Order by execution id (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricJobLogQuery orderByExecutionId();
+
+ /** Order by process instance id (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricJobLogQuery orderByProcessInstanceId();
+
+ /** Order by process definition id (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricJobLogQuery orderByProcessDefinitionId();
+
+ /** Order by process definition key (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricJobLogQuery orderByProcessDefinitionKey();
+
+ /** Order by deployment id (needs to be followed by {@link #asc()} or {@link #desc()}). */
+ HistoricJobLogQuery orderByDeploymentId();
+
+
+ /**
+ * null
+ * if the historic process instance belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /**
+ * Return current state of HistoricProcessInstance, following values are recognized during process engine operations:
+ *
+ * STATE_ACTIVE - running process instance
+ * STATE_SUSPENDED - suspended process instances
+ * STATE_COMPLETED - completed through normal end event
+ * STATE_EXTERNALLY_TERMINATED - terminated externally, for instance through REST API
+ * STATE_INTERNALLY_TERMINATED - terminated internally, for instance by terminating boundary event
+ */
+ String getState();
+
+ /**
+ * The id of the original process instance which was restarted.
+ */
+ String getRestartedProcessInstanceId();
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricProcessInstanceQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricProcessInstanceQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..2d0d7edca7ab6b595b148ffcc27a6d9a5765364f
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricProcessInstanceQuery.java
@@ -0,0 +1,526 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.ProcessEngineException;
+import org.camunda.bpm.engine.query.Query;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.runtime.ProcessInstanceQuery;
+
+/**
+ * Allows programmatic querying of {@link HistoricProcessInstance}s.
+ *
+ * @author Tom Baeyens
+ * @author Joram Barrez
+ * @author Falko Menge
+ */
+public interface HistoricProcessInstanceQuery extends Querynull
+ * if the historic task instance belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /** The time the historic task instance will be removed. */
+ Date getRemovalTime();
+
+ /**
+ * Task State also referred as lifeCycleState
+ */
+ String getTaskState();
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricTaskInstanceQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricTaskInstanceQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..4202c63f6b5fceb3e90211e866742f505e00c988
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricTaskInstanceQuery.java
@@ -0,0 +1,477 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import org.camunda.bpm.engine.ProcessEngineException;
+import org.camunda.bpm.engine.query.Query;
+import org.camunda.bpm.engine.task.Task;
+
+
+/**
+ * Allows programmatic querying for {@link HistoricTaskInstance}s.
+ *
+ * @author Tom Baeyens
+ */
+public interface HistoricTaskInstanceQuery extends Querynull
+ * if the variable belongs to no single tenant.
+ */
+ String getTenantId();
+
+ /**
+ * The current state of the variable. Can be 'CREATED' or 'DELETED'
+ */
+ String getState();
+
+ /**
+ * The time when the variable was created.
+ */
+ Date getCreateTime();
+
+ /** The time when the historic variable instance will be removed. */
+ Date getRemovalTime();
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricVariableInstanceQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricVariableInstanceQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..722676bd6397c21ccda236827a7c1247eeba0a22
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/HistoricVariableInstanceQuery.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import java.util.Date;
+import org.camunda.bpm.engine.query.Query;
+
+
+/**
+ * Programmatic querying for {@link HistoricVariableInstance}s.
+ *
+ * @author Christian Lipphardt (camunda)
+ */
+public interface HistoricVariableInstanceQuery extends Query
3
+ * The returned period 3 must be interpreted as
+ * the third month of the year (i.e. it represents
+ * the month March).
If the {@link #getPeriodUnit()} returns {@link PeriodUnit#QUARTER},
+ * then the returned period 3 must be interpreted as the third
+ * quarter of the year.
Returns the unit of the period.
+ * + * @return a {@link PeriodUnit} + * + * @see #getPeriod() + */ + PeriodUnit getPeriodUnit(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeSelectModeForHistoricBatchesBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeSelectModeForHistoricBatchesBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..b3ad045250955249e240e8b0189b2294cf46a49e --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeSelectModeForHistoricBatchesBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + +import java.util.Date; + +/** + * Fluent builder to select the mode to set the removal time for historic batches. + * + * @author Tassilo Weidner + */ +public interface SetRemovalTimeSelectModeForHistoricBatchesBuilder extends SetRemovalTimeToHistoricBatchesBuilder { + + /** + * Sets the removal time to an absolute date. + * + * @param removalTime supposed to be set to historic entities. + * @return the builder. + */ + SetRemovalTimeToHistoricBatchesBuilder absoluteRemovalTime(Date removalTime); + + /** + * Calculates the removal time dynamically based on the time to + * live of the respective batch and the engine's removal time strategy. + * + * @return the builder. + */ + SetRemovalTimeToHistoricBatchesBuilder calculatedRemovalTime(); + + /** + *Sets the removal time to {@code null}. + * + * @return the builder. + */ + SetRemovalTimeToHistoricBatchesBuilder clearedRemovalTime(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeSelectModeForHistoricDecisionInstancesBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeSelectModeForHistoricDecisionInstancesBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..4b02d4520bac2f24815d29ad6177059efbd83737 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeSelectModeForHistoricDecisionInstancesBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + +import java.util.Date; + +/** + * Fluent builder to select the mode to set the removal time for historic decision instances. + * + * @author Tassilo Weidner + */ +public interface SetRemovalTimeSelectModeForHistoricDecisionInstancesBuilder extends SetRemovalTimeToHistoricDecisionInstancesBuilder { + + /** + * Sets the removal time to an absolute date. + * + * @param removalTime supposed to be set to historic entities. + * @return the builder. + */ + SetRemovalTimeToHistoricDecisionInstancesBuilder absoluteRemovalTime(Date removalTime); + + /** + *
Calculates the removal time dynamically based on the respective decision definition time to + * live and the engine's removal time strategy. + * + *
In case {@link SetRemovalTimeToHistoricDecisionInstancesBuilder#hierarchical()} is enabled, the removal time is being calculated + * based on the base time and time to live of the historic root decision instance. + * + * @return the builder. + */ + SetRemovalTimeToHistoricDecisionInstancesBuilder calculatedRemovalTime(); + + /** + *
Sets the removal time to {@code null}. + * + * @return the builder. + */ + SetRemovalTimeToHistoricDecisionInstancesBuilder clearedRemovalTime(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..a0e61973b0639952db7176a1c9c269c12bbd138a --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + +import java.util.Date; + +/** + * Fluent builder to select the mode to set the removal time for historic process instances. + * + * @author Tassilo Weidner + */ +public interface SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder extends SetRemovalTimeToHistoricProcessInstancesBuilder { + + /** + * Sets the removal time to an absolute date. + * + * @param removalTime supposed to be set to historic entities. + * @return the builder. + */ + SetRemovalTimeToHistoricProcessInstancesBuilder absoluteRemovalTime(Date removalTime); + + /** + *
Calculates the removal time dynamically based on the respective process definition time to + * live and the process engine's removal time strategy. + * + *
In case {@link #hierarchical()} is enabled, the removal time is being calculated + * based on the base time and time to live of the historic root process instance. + * + * @return the builder. + */ + SetRemovalTimeToHistoricProcessInstancesBuilder calculatedRemovalTime(); + + /** + *
Sets the removal time to {@code null}. + * + * @return the builder. + */ + SetRemovalTimeToHistoricProcessInstancesBuilder clearedRemovalTime(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeToHistoricBatchesBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeToHistoricBatchesBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..278c9ee504416c3d3a2b714b1adf54ed047d5a3b --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeToHistoricBatchesBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + +import org.camunda.bpm.engine.AuthorizationException; +import org.camunda.bpm.engine.BadUserRequestException; +import org.camunda.bpm.engine.authorization.BatchPermissions; +import org.camunda.bpm.engine.authorization.Permissions; +import org.camunda.bpm.engine.authorization.Resources; +import org.camunda.bpm.engine.batch.Batch; +import org.camunda.bpm.engine.batch.history.HistoricBatchQuery; + +/** + * Fluent builder to set the removal time to historic batches and + * all associated historic entities. + * + * @author Tassilo Weidner + */ +public interface SetRemovalTimeToHistoricBatchesBuilder { + + /** + * Selects historic batches by the given query. + * + * @param historicBatchQuery to be evaluated. + * @return the builder. + */ + SetRemovalTimeToHistoricBatchesBuilder byQuery(HistoricBatchQuery historicBatchQuery); + + /** + * Selects historic batches by the given ids. + * + * @param historicBatchIds supposed to be affected. + * @return the builder. + */ + SetRemovalTimeToHistoricBatchesBuilder byIds(String... historicBatchIds); + + /** + * Sets the removal time asynchronously as batch. The returned batch can be used to + * track the progress of setting a removal time. + * + * @throws BadUserRequestException when no historic batches could be found. + * @throws AuthorizationException + * when no {@link BatchPermissions#CREATE_BATCH_SET_REMOVAL_TIME CREATE_BATCH_SET_REMOVAL_TIME} + * or no permission {@link Permissions#CREATE CREATE} permission is granted on {@link Resources#BATCH}. + * + * @return the batch which sets the removal time asynchronously. + */ + Batch executeAsync(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeToHistoricDecisionInstancesBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeToHistoricDecisionInstancesBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..1c50dca8fbba18058310dcd2a6330bf1ab8ea062 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeToHistoricDecisionInstancesBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + +import org.camunda.bpm.engine.AuthorizationException; +import org.camunda.bpm.engine.BadUserRequestException; +import org.camunda.bpm.engine.authorization.BatchPermissions; +import org.camunda.bpm.engine.authorization.Permissions; +import org.camunda.bpm.engine.authorization.Resources; +import org.camunda.bpm.engine.batch.Batch; + +/** + * Fluent builder to set the removal time to historic decision instances and + * all associated historic entities. + * + * @author Tassilo Weidner + */ +public interface SetRemovalTimeToHistoricDecisionInstancesBuilder { + + /** + * Selects historic decision instances by the given query. + * + * @param historicDecisionInstanceQuery to be evaluated. + * @return the builder. + */ + SetRemovalTimeToHistoricDecisionInstancesBuilder byQuery(HistoricDecisionInstanceQuery historicDecisionInstanceQuery); + + /** + * Selects historic process instances by the given ids. + * + * @param historicProcessInstanceIds supposed to be affected. + * @return the builder. + */ + SetRemovalTimeToHistoricDecisionInstancesBuilder byIds(String... historicProcessInstanceIds); + + /** + * Takes additionally historic decision instances into account that are part of + * the hierarchy of the given historic decision instances. + * + * If the root decision instance id of the given historic decision instance is {@code null}, + * the hierarchy is ignored. This is the case for instances that were started with a version + * prior 7.10. + * + * @return the builder. + */ + SetRemovalTimeToHistoricDecisionInstancesBuilder hierarchical(); + + /** + * Sets the removal time asynchronously as batch. The returned batch can be used to + * track the progress of setting a removal time. + * + * @throws BadUserRequestException when no historic decision instances could be found. + * @throws AuthorizationException + * when no {@link BatchPermissions#CREATE_BATCH_SET_REMOVAL_TIME CREATE_BATCH_SET_REMOVAL_TIME} + * or no permission {@link Permissions#CREATE CREATE} permission is granted on {@link Resources#BATCH}. + * + * @return the batch which sets the removal time asynchronously. + */ + Batch executeAsync(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeToHistoricProcessInstancesBuilder.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeToHistoricProcessInstancesBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..1148b3c8d95dce832191ae1d200eb4f58a2b7cad --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/SetRemovalTimeToHistoricProcessInstancesBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + +import org.camunda.bpm.engine.AuthorizationException; +import org.camunda.bpm.engine.BadUserRequestException; +import org.camunda.bpm.engine.authorization.BatchPermissions; +import org.camunda.bpm.engine.authorization.Permissions; +import org.camunda.bpm.engine.authorization.Resources; +import org.camunda.bpm.engine.batch.Batch; +import org.camunda.bpm.engine.impl.batch.removaltime.ProcessSetRemovalTimeJobHandler; + +/** + * Fluent builder to set the removal time to historic process instances and + * all associated historic entities. + * + * @author Tassilo Weidner + */ +public interface SetRemovalTimeToHistoricProcessInstancesBuilder { + + /** + * Selects historic process instances by the given query. + * + * @param historicProcessInstanceQuery to be evaluated. + * @return the builder. + */ + SetRemovalTimeToHistoricProcessInstancesBuilder byQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery); + + /** + * Selects historic decision instances by the given ids. + * + * @param historicProcessInstanceIds supposed to be affected. + * @return the builder. + */ + SetRemovalTimeToHistoricProcessInstancesBuilder byIds(String... historicProcessInstanceIds); + + /** + * Takes additionally those historic process instances into account that are part of + * the hierarchy of the given historic process instance. + * + * If the root process instance id of the given historic process instance is {@code null}, + * the hierarchy is ignored. This is the case for instances that were started with a version + * prior 7.10. + * + * @return the builder. + */ + SetRemovalTimeToHistoricProcessInstancesBuilder hierarchical(); + + /** + * Handles removal time updates in chunks, taking into account the defined + * size in {@code removalTimeUpdateChunkSize} in the process engine + * configuration. The size of the chunks can also be overridden per call with + * the {@link #chunkSize(int)} option. Enabling this option can lead to + * multiple executions of the resulting jobs, preventing the database + * transaction from timing out by limiting the number of rows to update. + * + * @since 7.20 + * + * @return the builder. + */ + SetRemovalTimeToHistoricProcessInstancesBuilder updateInChunks(); + + /** + * Defines the size of the chunks in which removal time updates are processed. + * The value must be a positive integer value that doesn't exceed the + * {@link ProcessSetRemovalTimeJobHandler#MAX_CHUNK_SIZE}. + * + * Only has an effect if {@link #updateInChunks()} is invoked as well. + * + * If undefined, the operation uses the `removalTimeUpdateChunkSize` defined + * in the process engine configuration. + * + * @since 7.20 + * + * @return the builder. + */ + SetRemovalTimeToHistoricProcessInstancesBuilder chunkSize(int chunkSize); + + /** + * Sets the removal time asynchronously as batch. The returned batch can be used to + * track the progress of setting a removal time. + * + * @throws BadUserRequestException when no historic process instances could be found. + * @throws AuthorizationException + * when no {@link BatchPermissions#CREATE_BATCH_SET_REMOVAL_TIME CREATE_BATCH_SET_REMOVAL_TIME} + * or no permission {@link Permissions#CREATE CREATE} permission is granted on {@link Resources#BATCH}. + * + * @return the batch which sets the removal time asynchronously. + */ + Batch executeAsync(); + +} diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/UserOperationLogEntry.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/UserOperationLogEntry.java new file mode 100644 index 0000000000000000000000000000000000000000..5f4f425ca5bd67a24dfac1e218f14051408de772 --- /dev/null +++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/UserOperationLogEntry.java @@ -0,0 +1,245 @@ +/* + * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH + * under one or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information regarding copyright + * ownership. Camunda licenses this file to you under the Apache License, + * Version 2.0; 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.camunda.bpm.engine.history; + +import java.util.Date; +import org.camunda.bpm.engine.EntityTypes; + + +/** + * Log entry about an operation performed by a user. This is used for logging + * actions such as creating a new task, completing a task, + * canceling a process instance, ... + * + *
The type of the operation which has been performed. A user may create a new task, + * complete a task, delegate a tasks, etc... Check this class for a list of built-in + * operation type constants.
+ * + *The type of the entity on which the operation was performed. Operations may be + * performed on tasks, attachments, ...
+ * + *
+ * The methods that reference other entities (except users), such as {@link #getProcessInstanceId()}
+ * or {@link #getProcessDefinitionId()}, describe which entities were affected
+ * by the operation and represent restriction criteria.
+ * A null return value of any of those methods means that regarding
+ * this criterion, any entity was affected.
+ *
+ * For example, if an operation suspends all process instances that belong to a certain
+ * process definition id, one operation log entry is created.
+ * Its return value for the method {@link #getProcessInstanceId()} is null,
+ * while {@link #getProcessDefinitionId()} returns an id. Thus, the return values
+ * of these methods can be understood as selection criteria of instances of the entity type
+ * that were affected by the operation.
+ *
The event describes which user has requested out the operation and the time + * at which the operation was performed. Furthermore, one operation can result in multiple + * {@link UserOperationLogEntry} entities whicha are linked by the value of the + * {@link #getOperationId()} method.
+ * + * @author Danny Gräf + * @author Daniel Meyer + * + */ +public interface UserOperationLogEntry { + + /** @deprecated Please use {@link EntityTypes#TASK} instead. */ + @Deprecated + String ENTITY_TYPE_TASK = EntityTypes.TASK; + /** @deprecated Please use {@link EntityTypes#IDENTITY_LINK} instead. */ + @Deprecated + String ENTITY_TYPE_IDENTITY_LINK = EntityTypes.IDENTITY_LINK; + /** @deprecated Please use {@link EntityTypes#ATTACHMENT} instead. */ + @Deprecated + String ENTITY_TYPE_ATTACHMENT = EntityTypes.ATTACHMENT; + + String OPERATION_TYPE_ASSIGN = "Assign"; + String OPERATION_TYPE_CLAIM = "Claim"; + String OPERATION_TYPE_COMPLETE = "Complete"; + String OPERATION_TYPE_CREATE = "Create"; + String OPERATION_TYPE_DELEGATE = "Delegate"; + String OPERATION_TYPE_DELETE = "Delete"; + String OPERATION_TYPE_RESOLVE = "Resolve"; + + String OPERATION_TYPE_SET_OWNER = "SetOwner"; + String OPERATION_TYPE_SET_PRIORITY = "SetPriority"; + String OPERATION_TYPE_SET_NAME = "SetName"; + String OPERATION_TYPE_SET_DESCRIPTION = "SetDescription"; + String OPERATION_TYPE_SET_FOLLOW_UP_DATE = "SetFollowUpDate"; + + String OPERATION_TYPE_UPDATE = "Update"; + String OPERATION_TYPE_ACTIVATE = "Activate"; + String OPERATION_TYPE_SUSPEND = "Suspend"; + String OPERATION_TYPE_MIGRATE = "Migrate"; + String OPERATION_TYPE_ADD_USER_LINK = "AddUserLink"; + String OPERATION_TYPE_DELETE_USER_LINK = "DeleteUserLink"; + String OPERATION_TYPE_ADD_GROUP_LINK = "AddGroupLink"; + String OPERATION_TYPE_DELETE_GROUP_LINK = "DeleteGroupLink"; + String OPERATION_TYPE_SET_DUEDATE = "SetDueDate"; + String OPERATION_TYPE_RECALC_DUEDATE = "RecalculateDueDate"; + String OPERATION_TYPE_UNLOCK = "Unlock"; + String OPERATION_TYPE_EXECUTE = "Execute"; + String OPERATION_TYPE_EVALUATE = "Evaluate"; + + String OPERATION_TYPE_ADD_ATTACHMENT = "AddAttachment"; + String OPERATION_TYPE_DELETE_ATTACHMENT = "DeleteAttachment"; + + String OPERATION_TYPE_SUSPEND_JOB_DEFINITION = "SuspendJobDefinition"; + String OPERATION_TYPE_ACTIVATE_JOB_DEFINITION = "ActivateJobDefinition"; + String OPERATION_TYPE_SUSPEND_PROCESS_DEFINITION = "SuspendProcessDefinition"; + String OPERATION_TYPE_ACTIVATE_PROCESS_DEFINITION = "ActivateProcessDefinition"; + + String OPERATION_TYPE_CREATE_HISTORY_CLEANUP_JOB = "CreateHistoryCleanupJobs"; + String OPERATION_TYPE_UPDATE_HISTORY_TIME_TO_LIVE = "UpdateHistoryTimeToLive"; + String OPERATION_TYPE_DELETE_HISTORY = "DeleteHistory"; + + String OPERATION_TYPE_MODIFY_PROCESS_INSTANCE = "ModifyProcessInstance"; + String OPERATION_TYPE_RESTART_PROCESS_INSTANCE = "RestartProcessInstance"; + String OPERATION_TYPE_SUSPEND_JOB = "SuspendJob"; + String OPERATION_TYPE_ACTIVATE_JOB = "ActivateJob"; + String OPERATION_TYPE_SET_JOB_RETRIES = "SetJobRetries"; + String OPERATION_TYPE_SET_EXTERNAL_TASK_RETRIES = "SetExternalTaskRetries"; + String OPERATION_TYPE_SET_VARIABLE = "SetVariable"; + String OPERATION_TYPE_SET_VARIABLES = "SetVariables"; + + String OPERATION_TYPE_UPDATE_COMMENT = "UpdateComment"; + String OPERATION_TYPE_DELETE_COMMENT = "DeleteComment"; + + String OPERATION_TYPE_REMOVE_VARIABLE = "RemoveVariable"; + String OPERATION_TYPE_MODIFY_VARIABLE = "ModifyVariable"; + + String OPERATION_TYPE_SUSPEND_BATCH = "SuspendBatch"; + String OPERATION_TYPE_ACTIVATE_BATCH = "ActivateBatch"; + + String OPERATION_TYPE_CREATE_INCIDENT = "CreateIncident"; + + String OPERATION_TYPE_SET_REMOVAL_TIME = "SetRemovalTime"; + + String OPERATION_TYPE_SET_ANNOTATION = "SetAnnotation"; + String OPERATION_TYPE_CLEAR_ANNOTATION = "ClearAnnotation"; + + String OPERATION_TYPE_CORRELATE_MESSAGE = "CorrelateMessage"; + + String CATEGORY_ADMIN = "Admin"; + String CATEGORY_OPERATOR = "Operator"; + String CATEGORY_TASK_WORKER = "TaskWorker"; + + /** The unique identifier of this log entry. */ + String getId(); + + /** Deployment reference */ + String getDeploymentId(); + + /** Process definition reference. */ + String getProcessDefinitionId(); + + /** + * Key of the process definition this log entry belongs to;null means any.
+ */
+ String getProcessDefinitionKey();
+
+ /** Root process instance reference. */
+ String getRootProcessInstanceId();
+
+ /** Process instance reference. */
+ String getProcessInstanceId();
+
+ /** Execution reference. */
+ String getExecutionId();
+
+ /** Case definition reference. */
+ String getCaseDefinitionId();
+
+ /** Case instance reference. */
+ String getCaseInstanceId();
+
+ /** Case execution reference. */
+ String getCaseExecutionId();
+
+ /** Task instance reference. */
+ String getTaskId();
+
+ /** Job instance reference. */
+ String getJobId();
+
+ /** Job definition reference. */
+ String getJobDefinitionId();
+
+ /** Batch reference. */
+ String getBatchId();
+
+ /** The User who performed the operation */
+ String getUserId();
+
+ /** Timestamp of this change. */
+ Date getTimestamp();
+
+ /**
+ * The unique identifier of this operation.
+ *
+ * If an operation modifies multiple properties, multiple {@link UserOperationLogEntry} instances will be
+ * created with a common operationId. This allows grouping multiple entries which are part of a composite operation.
+ */
+ String getOperationId();
+
+ /** External task reference. */
+ String getExternalTaskId();
+
+ /**
+ * Type of this operation, like create, assign, claim and so on.
+ *
+ * @see #OPERATION_TYPE_ASSIGN and other fields beginning with OPERATION_TYPE
+ */
+ String getOperationType();
+
+ /**
+ * The type of the entity on which this operation was executed.
+ *
+ * @see #ENTITY_TYPE_TASK and other fields beginning with ENTITY_TYPE
+ */
+ String getEntityType();
+
+ /** The property changed by this operation. */
+ String getProperty();
+
+ /** The original value of the property. */
+ String getOrgValue();
+
+ /** The new value of the property. */
+ String getNewValue();
+
+ /** The time the historic user operation log will be removed. */
+ Date getRemovalTime();
+
+ /** The category this entry is associated with */
+ String getCategory();
+
+ /** An arbitrary annotation set by a user for auditing reasons */
+ String getAnnotation();
+
+ /**
+ * The id of the tenant this user operation log belongs to. Can be null
+ * if the user operation log belongs to no single tenant.
+ */
+ String getTenantId();
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/UserOperationLogQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/UserOperationLogQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..2c7afb213234416f814fd16c3eebe3692cbcbd84
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/history/UserOperationLogQuery.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.history;
+
+import java.util.Date;
+
+import org.camunda.bpm.engine.EntityTypes;
+import org.camunda.bpm.engine.TaskService;
+import org.camunda.bpm.engine.query.Query;
+
+
+/**
+ * Programmatic querying for {@link UserOperationLogEntry} instances.
+ *
+ * @author Danny Gräf
+ */
+public interface UserOperationLogQuery extends Querytrue if all rules passed, false if at
+ * least one rule was violated.
+ */
+ public boolean isValid();
+
+ /**
+ * List of all rules that were violated during the check.
+ *
+ * @return all violated rules.
+ */
+ public ListHeads-up: The return value is not respected when + * {@link PasswordPolicyRule#execute(String, User)} is implemented.
+ * + * @param candidatePassword + * which is checked against a password policy + * @returntrue if the given password matches this rule.
+ * false if the given password is not compliant with this
+ * rule.
+ */
+ boolean execute(String candidatePassword);
+
+ /**
+ * Checks the given password and the user against this rule.
+ *
+ * @param candidatePassword
+ * which is checked against a password policy
+ * @param user
+ * to be taken into account when checking the candidate password. Can be {@code null}
+ * when {@link IdentityService#checkPassword(String, String)} is called.
+ * @return true if the given password matches this rule.
+ * false if the given password is not compliant with this
+ * rule.
+ */
+ default boolean execute(String candidatePassword, User user) {
+ return execute(candidatePassword);
+ }
+
+}
\ No newline at end of file
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/identity/Picture.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/identity/Picture.java
new file mode 100644
index 0000000000000000000000000000000000000000..cd4b55a157ea81d7c3f8efdc164e7002a700595f
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/identity/Picture.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.identity;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class Picture {
+
+ protected byte[] bytes;
+ protected String mimeType;
+
+ public Picture(byte[] bytes, String mimeType) {
+ this.bytes = bytes;
+ this.mimeType = mimeType;
+ }
+
+ public byte[] getBytes() {
+ return bytes;
+ }
+
+ public InputStream getInputStream() {
+ return new ByteArrayInputStream(bytes);
+ }
+
+ public String getMimeType() {
+ return mimeType;
+ }
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/identity/Tenant.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/identity/Tenant.java
new file mode 100644
index 0000000000000000000000000000000000000000..0bfd53a43cf85b8e618dab1db51d2da97d498f62
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/identity/Tenant.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.identity;
+
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.IdentityService;
+
+/**
+ * Represents a tenant, used in {@link IdentityService}.
+ */
+public interface Tenant extends Serializable {
+
+ /**
+ * @return the id of the tenant
+ */
+ String getId();
+
+ void setId(String id);
+
+ /**
+ * @return the name of the tenant
+ */
+ String getName();
+
+ void setName(String name);
+
+}
diff --git a/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/identity/TenantQuery.java b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/identity/TenantQuery.java
new file mode 100644
index 0000000000000000000000000000000000000000..05dd6b4793e02d1687e3a7a188b10e21bb3f53bc
--- /dev/null
+++ b/source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/identity/TenantQuery.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+ * under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright
+ * ownership. Camunda licenses this file to you under the Apache License,
+ * Version 2.0; 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.camunda.bpm.engine.identity;
+
+import org.camunda.bpm.engine.query.Query;
+
+
+/**
+ * Allows to programmatically query for {@link Tenant}s.
+ */
+public interface TenantQuery extends Query