Datasets:
Add pinned source: camunda-dmn-examples (part 6)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/authorization/UserOperationLogCategoryPermissions.java +78 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/Batch.java +138 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchQuery.java +56 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchStatistics.java +86 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchStatisticsQuery.java +77 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/history/HistoricBatch.java +94 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/history/HistoricBatchQuery.java +68 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/context/DelegateExecutionContext.java +46 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/context/ProcessEngineContext.java +116 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/BaseDelegateExecution.java +38 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/BpmnError.java +98 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/BpmnModelExecutionContext.java +53 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/CaseExecutionListener.java +84 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/CaseVariableListener.java +39 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/CmmnModelExecutionContext.java +46 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateCaseExecution.java +61 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateCaseVariableInstance.java +33 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateExecution.java +144 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateListener.java +29 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateTask.java +212 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateVariableInstance.java +30 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateVariableMapping.java +47 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/ExecutionListener.java +35 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/Expression.java +34 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/JavaDelegate.java +38 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/ProcessEngineServicesAware.java +47 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/TaskListener.java +46 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/VariableListener.java +29 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/VariableScope.java +113 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/package.html +6 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/dmn/DecisionEvaluationBuilder.java +76 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/dmn/DecisionsEvaluationBuilder.java +73 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/DeploymentResourceNotFoundException.java +45 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotAllowedException.java +47 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotFoundException.java +46 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotValidException.java +46 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NullValueException.java +44 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseDefinitionNotFoundException.java +45 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseException.java +48 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseExecutionNotFoundException.java +45 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseIllegalStateTransitionException.java +46 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CmmnModelInstanceNotFoundException.java +48 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DecisionDefinitionNotFoundException.java +42 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DecisionException.java +44 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DmnModelInstanceNotFoundException.java +45 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTask.java +145 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTaskQuery.java +273 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTaskQueryBuilder.java +46 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTaskQueryTopicBuilder.java +150 -0
- source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/FetchAndLockBuilder.java +76 -0
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/authorization/UserOperationLogCategoryPermissions.java
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.authorization;
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* The set of built-in {@link Permission Permissions} for {@link Resources#OPERATION_LOG_CATEGORY User operation log based on categories} in Camunda Platform.
|
| 21 |
+
*
|
| 22 |
+
* @author Tobias Metzke
|
| 23 |
+
*
|
| 24 |
+
*/
|
| 25 |
+
public enum UserOperationLogCategoryPermissions implements Permission {
|
| 26 |
+
|
| 27 |
+
/** The none permission means 'no action', 'doing nothing'.
|
| 28 |
+
* It does not mean that no permissions are granted. */
|
| 29 |
+
NONE("NONE", 0),
|
| 30 |
+
|
| 31 |
+
/**
|
| 32 |
+
* Indicates that all interactions are permitted.
|
| 33 |
+
* If ALL is revoked it means that the user is not permitted
|
| 34 |
+
* to do everything, which means that at least one permission
|
| 35 |
+
* is revoked. This does not implicate that all individual
|
| 36 |
+
* permissions are revoked.
|
| 37 |
+
*
|
| 38 |
+
* Example: If the UPDATE permission is revoked then the ALL
|
| 39 |
+
* permission is revoked as well, because the user is not authorized
|
| 40 |
+
* to execute all actions anymore.
|
| 41 |
+
*/
|
| 42 |
+
ALL("ALL", Integer.MAX_VALUE),
|
| 43 |
+
|
| 44 |
+
/** Indicates that READ interactions on defined categories are permitted. */
|
| 45 |
+
READ("READ", 2),
|
| 46 |
+
|
| 47 |
+
/** Indicates that UPDATE interactions on defined categories are permitted. */
|
| 48 |
+
UPDATE("UPDATE", 4),
|
| 49 |
+
|
| 50 |
+
/** Indicates that DELETE interactions on defined categories are permitted. */
|
| 51 |
+
DELETE("DELETE", 16);
|
| 52 |
+
|
| 53 |
+
private static final Resource[] RESOURCES = new Resource[] { Resources.OPERATION_LOG_CATEGORY };
|
| 54 |
+
|
| 55 |
+
private String name;
|
| 56 |
+
private int id;
|
| 57 |
+
|
| 58 |
+
private UserOperationLogCategoryPermissions(String name, int id) {
|
| 59 |
+
this.name = name;
|
| 60 |
+
this.id = id;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
@Override
|
| 64 |
+
public String getName() {
|
| 65 |
+
return name;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
@Override
|
| 69 |
+
public int getValue() {
|
| 70 |
+
return id;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
@Override
|
| 74 |
+
public Resource[] getTypes() {
|
| 75 |
+
return RESOURCES;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/Batch.java
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.batch;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.ManagementService;
|
| 20 |
+
|
| 21 |
+
import java.util.Date;
|
| 22 |
+
|
| 23 |
+
/**
|
| 24 |
+
* <p>A batch represents a number of jobs which
|
| 25 |
+
* execute a number of commands asynchronously.
|
| 26 |
+
* <p>
|
| 27 |
+
* <p>Batches have three types of jobs:
|
| 28 |
+
* <ul>
|
| 29 |
+
* <li>Seed jobs: Create execution jobs
|
| 30 |
+
* <li>Execution jobs: Execute the actual action
|
| 31 |
+
* <li>Monitor jobs: Manage the batch once all execution jobs have been created
|
| 32 |
+
* (e.g. responsible for deletion of the Batch after completion).
|
| 33 |
+
* </ul>
|
| 34 |
+
* <p>
|
| 35 |
+
* <p>All three job types have independent job definitions. They can be controlled individually
|
| 36 |
+
* (e.g. suspension) and are independently represented in the historic job log.
|
| 37 |
+
*/
|
| 38 |
+
public interface Batch {
|
| 39 |
+
|
| 40 |
+
String TYPE_PROCESS_INSTANCE_MIGRATION = "instance-migration";
|
| 41 |
+
String TYPE_PROCESS_INSTANCE_MODIFICATION = "instance-modification";
|
| 42 |
+
String TYPE_PROCESS_INSTANCE_RESTART = "instance-restart";
|
| 43 |
+
String TYPE_PROCESS_INSTANCE_DELETION = "instance-deletion";
|
| 44 |
+
String TYPE_PROCESS_INSTANCE_UPDATE_SUSPENSION_STATE = "instance-update-suspension-state";
|
| 45 |
+
String TYPE_HISTORIC_PROCESS_INSTANCE_DELETION = "historic-instance-deletion";
|
| 46 |
+
String TYPE_HISTORIC_DECISION_INSTANCE_DELETION = "historic-decision-instance-deletion";
|
| 47 |
+
String TYPE_SET_JOB_RETRIES = "set-job-retries";
|
| 48 |
+
String TYPE_SET_EXTERNAL_TASK_RETRIES = "set-external-task-retries";
|
| 49 |
+
String TYPE_PROCESS_SET_REMOVAL_TIME = "process-set-removal-time";
|
| 50 |
+
String TYPE_DECISION_SET_REMOVAL_TIME = "decision-set-removal-time";
|
| 51 |
+
String TYPE_BATCH_SET_REMOVAL_TIME = "batch-set-removal-time";
|
| 52 |
+
String TYPE_SET_VARIABLES = "set-variables";
|
| 53 |
+
String TYPE_CORRELATE_MESSAGE = "correlate-message";
|
| 54 |
+
|
| 55 |
+
/**
|
| 56 |
+
* @return the id of the batch
|
| 57 |
+
*/
|
| 58 |
+
String getId();
|
| 59 |
+
|
| 60 |
+
/**
|
| 61 |
+
* @return the type of the batch
|
| 62 |
+
*/
|
| 63 |
+
String getType();
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* @return the number of batch execution jobs required to complete the batch
|
| 67 |
+
*/
|
| 68 |
+
int getTotalJobs();
|
| 69 |
+
|
| 70 |
+
/**
|
| 71 |
+
* @return the number of batch execution jobs already created by the seed job
|
| 72 |
+
*/
|
| 73 |
+
int getJobsCreated();
|
| 74 |
+
|
| 75 |
+
/**
|
| 76 |
+
* @return number of batch jobs created per batch seed job invocation
|
| 77 |
+
*/
|
| 78 |
+
int getBatchJobsPerSeed();
|
| 79 |
+
|
| 80 |
+
/**
|
| 81 |
+
* @return the number of invocations executed per batch job
|
| 82 |
+
*/
|
| 83 |
+
int getInvocationsPerBatchJob();
|
| 84 |
+
|
| 85 |
+
/**
|
| 86 |
+
* @return the id of the batch seed job definition
|
| 87 |
+
*/
|
| 88 |
+
String getSeedJobDefinitionId();
|
| 89 |
+
|
| 90 |
+
/**
|
| 91 |
+
* @return the id of the batch monitor job definition
|
| 92 |
+
*/
|
| 93 |
+
String getMonitorJobDefinitionId();
|
| 94 |
+
|
| 95 |
+
/**
|
| 96 |
+
* @return the id of the batch job definition
|
| 97 |
+
*/
|
| 98 |
+
String getBatchJobDefinitionId();
|
| 99 |
+
|
| 100 |
+
/**
|
| 101 |
+
* @return the batch's tenant id or null
|
| 102 |
+
*/
|
| 103 |
+
String getTenantId();
|
| 104 |
+
|
| 105 |
+
/**
|
| 106 |
+
* @return the batch creator's user id
|
| 107 |
+
*/
|
| 108 |
+
String getCreateUserId();
|
| 109 |
+
|
| 110 |
+
/**
|
| 111 |
+
* <p>
|
| 112 |
+
* Indicates whether this batch is suspended. If a batch is suspended,
|
| 113 |
+
* the batch jobs will not be acquired by the job executor.
|
| 114 |
+
* </p>
|
| 115 |
+
* <p>
|
| 116 |
+
* <p>
|
| 117 |
+
* <strong>Note:</strong> It is still possible to manually suspend and activate
|
| 118 |
+
* jobs and job definitions using the {@link ManagementService}, which will
|
| 119 |
+
* not change the suspension state of the batch.
|
| 120 |
+
* </p>
|
| 121 |
+
*
|
| 122 |
+
* @return true if this batch is currently suspended, false otherwise
|
| 123 |
+
* @see ManagementService#suspendBatchById(String)
|
| 124 |
+
* @see ManagementService#activateBatchById(String)
|
| 125 |
+
*/
|
| 126 |
+
boolean isSuspended();
|
| 127 |
+
|
| 128 |
+
/**
|
| 129 |
+
* @return the date the batch was started
|
| 130 |
+
*/
|
| 131 |
+
Date getStartTime();
|
| 132 |
+
|
| 133 |
+
/**
|
| 134 |
+
* @return the date the batch execution started
|
| 135 |
+
*/
|
| 136 |
+
Date getExecutionStartTime();
|
| 137 |
+
|
| 138 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchQuery.java
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.batch;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.query.Query;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* Query for {@link Batch} instances.
|
| 23 |
+
*/
|
| 24 |
+
public interface BatchQuery extends Query<BatchQuery, Batch> {
|
| 25 |
+
|
| 26 |
+
/** Only select batch instances for the given batch id. */
|
| 27 |
+
BatchQuery batchId(String batchId);
|
| 28 |
+
|
| 29 |
+
/**
|
| 30 |
+
* Only select batches of the given type.
|
| 31 |
+
*/
|
| 32 |
+
BatchQuery type(String type);
|
| 33 |
+
|
| 34 |
+
/** Only selects batches with one of the given tenant ids. */
|
| 35 |
+
BatchQuery tenantIdIn(String... tenantIds);
|
| 36 |
+
|
| 37 |
+
/** Only selects batches which have no tenant id. */
|
| 38 |
+
BatchQuery withoutTenantId();
|
| 39 |
+
|
| 40 |
+
/** Only selects batches which are active **/
|
| 41 |
+
BatchQuery active();
|
| 42 |
+
|
| 43 |
+
/** Only selects batches which are suspended **/
|
| 44 |
+
BatchQuery suspended();
|
| 45 |
+
|
| 46 |
+
/**
|
| 47 |
+
* Returns batches sorted by id; must be followed by an invocation of {@link #asc()} or {@link #desc()}.
|
| 48 |
+
*/
|
| 49 |
+
BatchQuery orderById();
|
| 50 |
+
|
| 51 |
+
/**
|
| 52 |
+
* Returns batches sorted by tenant id; must be followed by an invocation of {@link #asc()} or {@link #desc()}.
|
| 53 |
+
*/
|
| 54 |
+
BatchQuery orderByTenantId();
|
| 55 |
+
|
| 56 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchStatistics.java
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.batch;
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* <p>
|
| 21 |
+
* Additional statistics for a single batch.
|
| 22 |
+
* </p>
|
| 23 |
+
*
|
| 24 |
+
* <p>
|
| 25 |
+
* Contains the number of remaining jobs, completed and failed batch
|
| 26 |
+
* execution jobs. The following relation between these exists:
|
| 27 |
+
*
|
| 28 |
+
* <code>
|
| 29 |
+
* batch total jobs = remaining jobs + completed jobs
|
| 30 |
+
* </code>
|
| 31 |
+
* </p>
|
| 32 |
+
*/
|
| 33 |
+
public interface BatchStatistics extends Batch {
|
| 34 |
+
/**
|
| 35 |
+
* <p>
|
| 36 |
+
* The number of remaining batch execution jobs.
|
| 37 |
+
* This does include failed batch execution jobs and
|
| 38 |
+
* batch execution jobs which still have to be created by the seed job.
|
| 39 |
+
* </p>
|
| 40 |
+
*
|
| 41 |
+
* <p>
|
| 42 |
+
* See
|
| 43 |
+
* {@link #getTotalJobs()} for the number of all batch execution jobs,
|
| 44 |
+
* {@link #getCompletedJobs()} for the number of completed batch execution jobs and
|
| 45 |
+
* {@link #getFailedJobs()} for the number of failed batch execution jobs.
|
| 46 |
+
* </p>
|
| 47 |
+
*
|
| 48 |
+
* @return the number of remaining batch execution jobs
|
| 49 |
+
*/
|
| 50 |
+
int getRemainingJobs();
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* <p>
|
| 54 |
+
* The number of completed batch execution jobs.
|
| 55 |
+
* This does include aborted/deleted batch execution jobs.
|
| 56 |
+
* </p>
|
| 57 |
+
*
|
| 58 |
+
* <p>
|
| 59 |
+
* See
|
| 60 |
+
* {@link #getTotalJobs()} for the number of all batch execution jobs,
|
| 61 |
+
* {@link #getRemainingJobs()} ()} for the number of remaining batch execution jobs and
|
| 62 |
+
* {@link #getFailedJobs()} for the number of failed batch execution jobs.
|
| 63 |
+
* </p>
|
| 64 |
+
*
|
| 65 |
+
* @return the number of completed batch execution jobs
|
| 66 |
+
*/
|
| 67 |
+
int getCompletedJobs();
|
| 68 |
+
|
| 69 |
+
/**
|
| 70 |
+
* <p>
|
| 71 |
+
* The number of failed batch execution jobs.
|
| 72 |
+
* This does not include aborted or deleted batch execution jobs.
|
| 73 |
+
* </p>
|
| 74 |
+
*
|
| 75 |
+
* <p>
|
| 76 |
+
* See
|
| 77 |
+
* {@link #getTotalJobs()} for the number of all batch execution jobs,
|
| 78 |
+
* {@link #getRemainingJobs()} ()} for the number of remaining batch execution jobs and
|
| 79 |
+
* {@link #getCompletedJobs()} ()} for the number of completed batch execution jobs.
|
| 80 |
+
* </p>
|
| 81 |
+
*
|
| 82 |
+
* @return the number of failed batch execution jobs
|
| 83 |
+
*/
|
| 84 |
+
int getFailedJobs();
|
| 85 |
+
|
| 86 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/BatchStatisticsQuery.java
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.batch;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.query.Query;
|
| 20 |
+
|
| 21 |
+
import java.util.Date;
|
| 22 |
+
|
| 23 |
+
public interface BatchStatisticsQuery extends Query<BatchStatisticsQuery, BatchStatistics> {
|
| 24 |
+
|
| 25 |
+
/**
|
| 26 |
+
* Only select batch statistics for the given batch id.
|
| 27 |
+
*/
|
| 28 |
+
BatchStatisticsQuery batchId(String batchId);
|
| 29 |
+
|
| 30 |
+
/**
|
| 31 |
+
* Only select batch statistics of the given type.
|
| 32 |
+
*/
|
| 33 |
+
BatchStatisticsQuery type(String type);
|
| 34 |
+
|
| 35 |
+
/** Only selects batch statistics with one of the given tenant ids. */
|
| 36 |
+
BatchStatisticsQuery tenantIdIn(String... tenantIds);
|
| 37 |
+
|
| 38 |
+
/** Only selects batch statistics which have no tenant id. */
|
| 39 |
+
BatchStatisticsQuery withoutTenantId();
|
| 40 |
+
|
| 41 |
+
/** Only selects batches which are active **/
|
| 42 |
+
BatchStatisticsQuery active();
|
| 43 |
+
|
| 44 |
+
/** Only selects batches which are suspended **/
|
| 45 |
+
BatchStatisticsQuery suspended();
|
| 46 |
+
|
| 47 |
+
/** Only selects batches that are started by the given user id **/
|
| 48 |
+
BatchStatisticsQuery createdBy(String userId);
|
| 49 |
+
|
| 50 |
+
/** Only select historic activity instances that were started before the given date. */
|
| 51 |
+
BatchStatisticsQuery startedBefore(Date date);
|
| 52 |
+
|
| 53 |
+
/** Only select historic activity instances that were started after the given date. */
|
| 54 |
+
BatchStatisticsQuery startedAfter(Date date);
|
| 55 |
+
|
| 56 |
+
/** Only selects batches with failed jobs **/
|
| 57 |
+
BatchStatisticsQuery withFailures();
|
| 58 |
+
|
| 59 |
+
/** Only selects batches without failed jobs **/
|
| 60 |
+
BatchStatisticsQuery withoutFailures();
|
| 61 |
+
|
| 62 |
+
/**
|
| 63 |
+
* Returns batch statistics sorted by batch id; must be followed by an invocation of {@link #asc()} or {@link #desc()}.
|
| 64 |
+
*/
|
| 65 |
+
BatchStatisticsQuery orderById();
|
| 66 |
+
|
| 67 |
+
/**
|
| 68 |
+
* Returns batch statistics sorted by tenant id; must be followed by an invocation of {@link #asc()} or {@link #desc()}.
|
| 69 |
+
*/
|
| 70 |
+
BatchStatisticsQuery orderByTenantId();
|
| 71 |
+
|
| 72 |
+
/**
|
| 73 |
+
* Returns batch statistics sorted by start time; must be followed by an invocation of {@link #asc()} or {@link #desc()}.
|
| 74 |
+
*/
|
| 75 |
+
BatchStatisticsQuery orderByStartTime();
|
| 76 |
+
|
| 77 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/history/HistoricBatch.java
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.batch.history;
|
| 18 |
+
|
| 19 |
+
import java.util.Date;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* Historic representation of a {@link org.camunda.bpm.engine.batch.Batch}.
|
| 23 |
+
*/
|
| 24 |
+
public interface HistoricBatch {
|
| 25 |
+
|
| 26 |
+
/**
|
| 27 |
+
* @return the id of the batch
|
| 28 |
+
*/
|
| 29 |
+
String getId();
|
| 30 |
+
|
| 31 |
+
/**
|
| 32 |
+
* @return the type of the batch
|
| 33 |
+
*/
|
| 34 |
+
String getType();
|
| 35 |
+
|
| 36 |
+
/**
|
| 37 |
+
* @return the number of batch execution jobs required to complete the batch
|
| 38 |
+
*/
|
| 39 |
+
int getTotalJobs();
|
| 40 |
+
|
| 41 |
+
/**
|
| 42 |
+
* @return number of batch jobs created per batch seed job invocation
|
| 43 |
+
*/
|
| 44 |
+
int getBatchJobsPerSeed();
|
| 45 |
+
|
| 46 |
+
/**
|
| 47 |
+
* @return the number of invocations executed per batch job
|
| 48 |
+
*/
|
| 49 |
+
int getInvocationsPerBatchJob();
|
| 50 |
+
|
| 51 |
+
/**
|
| 52 |
+
* @return the id of the batch seed job definition
|
| 53 |
+
*/
|
| 54 |
+
String getSeedJobDefinitionId();
|
| 55 |
+
|
| 56 |
+
/**
|
| 57 |
+
* @return the id of the batch monitor job definition
|
| 58 |
+
*/
|
| 59 |
+
String getMonitorJobDefinitionId();
|
| 60 |
+
|
| 61 |
+
/**
|
| 62 |
+
* @return the id of the batch job definition
|
| 63 |
+
*/
|
| 64 |
+
String getBatchJobDefinitionId();
|
| 65 |
+
|
| 66 |
+
/**
|
| 67 |
+
* @return the batch's tenant id or null
|
| 68 |
+
*/
|
| 69 |
+
String getTenantId();
|
| 70 |
+
|
| 71 |
+
/**
|
| 72 |
+
* @return the batch creator's user id
|
| 73 |
+
*/
|
| 74 |
+
String getCreateUserId();
|
| 75 |
+
|
| 76 |
+
/**
|
| 77 |
+
* @return the date the batch was started
|
| 78 |
+
*/
|
| 79 |
+
Date getStartTime();
|
| 80 |
+
|
| 81 |
+
/**
|
| 82 |
+
* @return the date the batch was completed
|
| 83 |
+
*/
|
| 84 |
+
Date getEndTime();
|
| 85 |
+
|
| 86 |
+
/** The time the historic batch will be removed. */
|
| 87 |
+
Date getRemovalTime();
|
| 88 |
+
|
| 89 |
+
/**
|
| 90 |
+
* @return the date the batch execution started
|
| 91 |
+
*/
|
| 92 |
+
Date getExecutionStartTime();
|
| 93 |
+
|
| 94 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/batch/history/HistoricBatchQuery.java
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.batch.history;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.query.Query;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* Query for {@link HistoricBatch} instances.
|
| 23 |
+
*/
|
| 24 |
+
public interface HistoricBatchQuery extends Query<HistoricBatchQuery, HistoricBatch> {
|
| 25 |
+
|
| 26 |
+
/**
|
| 27 |
+
* Only select historic batch instances for the given batch id.
|
| 28 |
+
*/
|
| 29 |
+
HistoricBatchQuery batchId(String batchId);
|
| 30 |
+
|
| 31 |
+
/**
|
| 32 |
+
* Only select historic batches of the given type.
|
| 33 |
+
*/
|
| 34 |
+
HistoricBatchQuery type(String type);
|
| 35 |
+
|
| 36 |
+
/**
|
| 37 |
+
* Only select historic batches which are completed or not.
|
| 38 |
+
*/
|
| 39 |
+
HistoricBatchQuery completed(boolean completed);
|
| 40 |
+
|
| 41 |
+
/** Only selects historic batches with one of the given tenant ids. */
|
| 42 |
+
HistoricBatchQuery tenantIdIn(String... tenantIds);
|
| 43 |
+
|
| 44 |
+
/** Only selects historic batches which have no tenant id. */
|
| 45 |
+
HistoricBatchQuery withoutTenantId();
|
| 46 |
+
|
| 47 |
+
/**
|
| 48 |
+
* Returns historic batches sorted by id; must be followed by an invocation of {@link #asc()} or {@link #desc()}.
|
| 49 |
+
*/
|
| 50 |
+
HistoricBatchQuery orderById();
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Returns historic batches sorted by start time; must be followed by an invocation of {@link #asc()} or {@link #desc()}.
|
| 54 |
+
*/
|
| 55 |
+
HistoricBatchQuery orderByStartTime();
|
| 56 |
+
|
| 57 |
+
/**
|
| 58 |
+
* Returns historic batches sorted by end time; must be followed by an invocation of {@link #asc()} or {@link #desc()}.
|
| 59 |
+
*/
|
| 60 |
+
HistoricBatchQuery orderByEndTime();
|
| 61 |
+
|
| 62 |
+
/**
|
| 63 |
+
* Returns historic batches sorted by tenant id; must be followed by an invocation of {@link #asc()} or {@link #desc()}.
|
| 64 |
+
*/
|
| 65 |
+
HistoricBatchQuery orderByTenantId();
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/context/DelegateExecutionContext.java
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.context;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.delegate.DelegateExecution;
|
| 20 |
+
import org.camunda.bpm.engine.impl.context.BpmnExecutionContext;
|
| 21 |
+
import org.camunda.bpm.engine.impl.context.Context;
|
| 22 |
+
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity;
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* Represents a delegation execution context which should return the current
|
| 26 |
+
* delegation execution.
|
| 27 |
+
*
|
| 28 |
+
* @author Christopher Zell <christopher.zell@camunda.com>
|
| 29 |
+
*/
|
| 30 |
+
public class DelegateExecutionContext {
|
| 31 |
+
|
| 32 |
+
/**
|
| 33 |
+
* Returns the current delegation execution or null if the
|
| 34 |
+
* execution is not available.
|
| 35 |
+
*
|
| 36 |
+
* @return the current delegation execution or null if not available
|
| 37 |
+
*/
|
| 38 |
+
public static DelegateExecution getCurrentDelegationExecution() {
|
| 39 |
+
BpmnExecutionContext bpmnExecutionContext = Context.getBpmnExecutionContext();
|
| 40 |
+
ExecutionEntity executionEntity = null;
|
| 41 |
+
if (bpmnExecutionContext != null) {
|
| 42 |
+
executionEntity = bpmnExecutionContext.getExecution();
|
| 43 |
+
}
|
| 44 |
+
return executionEntity;
|
| 45 |
+
}
|
| 46 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/context/ProcessEngineContext.java
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.context;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.impl.context.ProcessEngineContextImpl;
|
| 20 |
+
|
| 21 |
+
import java.util.concurrent.Callable;
|
| 22 |
+
|
| 23 |
+
/**
|
| 24 |
+
* <p>When a Process Engine API call is performed, the engine
|
| 25 |
+
* will create a Process Engine Context. The context caches database
|
| 26 |
+
* entities, so that multiple operations on the same entity do not
|
| 27 |
+
* result in multiple database queries. This also means that the changes
|
| 28 |
+
* to these entities are accumulated and are flushed to the database
|
| 29 |
+
* as soon as the Process Engine API call returns (however, the current
|
| 30 |
+
* transaction might be committed at a later time).</p>
|
| 31 |
+
*
|
| 32 |
+
* <p>If a Process Engine API call is nested into another call, the
|
| 33 |
+
* default behaviour is to reuse the existing Process Engine Context.
|
| 34 |
+
* This means that the nested call will have access to the same cached
|
| 35 |
+
* entities and the changes made to them.</p>
|
| 36 |
+
*
|
| 37 |
+
* <p>When the nested call is to be executed in a new transaction, a new Process
|
| 38 |
+
* Engine Context needs to be created for its execution. In this case, the
|
| 39 |
+
* nested call will use a new cache for the database entities, independent of
|
| 40 |
+
* the previous (outer) call cache. This means that, the changes in the cache of
|
| 41 |
+
* one call are invisible to the other call and vice versa. When the nested call
|
| 42 |
+
* returns, the changes are flushed to the database independently of the Process
|
| 43 |
+
* Engine Context of the outer call.</p>
|
| 44 |
+
*
|
| 45 |
+
* <p>The <code>ProcessEngineContext</code> is a utility class to declare to
|
| 46 |
+
* the Process Engine that a new Process Engine Context needs to be created
|
| 47 |
+
* in order for the database operations in a nested Process Engine API call
|
| 48 |
+
* to be separated in a new transaction.</p>
|
| 49 |
+
*
|
| 50 |
+
* Example on declaring a new Process Engine Context:
|
| 51 |
+
*
|
| 52 |
+
* <pre>
|
| 53 |
+
* try {
|
| 54 |
+
* ProcessEngineContext.requiresNew();
|
| 55 |
+
* runtimeService.startProcessInstanceByKey("EXAMPLE_INSTANCE");
|
| 56 |
+
* } finally {
|
| 57 |
+
* ProcessEngineContext.clear();
|
| 58 |
+
* }
|
| 59 |
+
* </pre>
|
| 60 |
+
*/
|
| 61 |
+
public class ProcessEngineContext {
|
| 62 |
+
|
| 63 |
+
/**
|
| 64 |
+
* Declares to the Process Engine that a new, separate context,
|
| 65 |
+
* bound to the current thread, needs to be created for all subsequent
|
| 66 |
+
* Process Engine database operations. The method should always be used
|
| 67 |
+
* in a try-finally block to ensure that {@link #clear()} is called
|
| 68 |
+
* under any circumstances.
|
| 69 |
+
*
|
| 70 |
+
* Please see the {@link ProcessEngineContext} class documentation for
|
| 71 |
+
* a more detailed description on the purpose of this method.
|
| 72 |
+
*/
|
| 73 |
+
public static void requiresNew() {
|
| 74 |
+
ProcessEngineContextImpl.set(true);
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
/**
|
| 78 |
+
* Declares to the Process Engine that the new Context created
|
| 79 |
+
* by the {@link #requiresNew()} method can be closed. Please
|
| 80 |
+
* see the {@link ProcessEngineContext} class documentation for
|
| 81 |
+
* a more detailed description on the purpose of this method.
|
| 82 |
+
*/
|
| 83 |
+
public static void clear() {
|
| 84 |
+
ProcessEngineContextImpl.clear();
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
/**
|
| 88 |
+
* <p>Takes a callable and executes all engine API invocations
|
| 89 |
+
* within that callable in a new Process Engine Context. Please
|
| 90 |
+
* see the {@link ProcessEngineContext} class documentation for
|
| 91 |
+
* a more detailed description on the purpose of this method.</p>
|
| 92 |
+
*
|
| 93 |
+
* An alternative to calling:
|
| 94 |
+
*
|
| 95 |
+
* <code>
|
| 96 |
+
* try {
|
| 97 |
+
* requiresNew();
|
| 98 |
+
* callable.call();
|
| 99 |
+
* } finally {
|
| 100 |
+
* clear();
|
| 101 |
+
* }
|
| 102 |
+
* </code>
|
| 103 |
+
*
|
| 104 |
+
* @param callable the callable to execute
|
| 105 |
+
* @return what is defined by the callable passed to the method
|
| 106 |
+
* @throws Exception
|
| 107 |
+
*/
|
| 108 |
+
public static <T> T withNewProcessEngineContext(Callable<T> callable) throws Exception {
|
| 109 |
+
try {
|
| 110 |
+
requiresNew();
|
| 111 |
+
return callable.call();
|
| 112 |
+
} finally {
|
| 113 |
+
clear();
|
| 114 |
+
}
|
| 115 |
+
}
|
| 116 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/BaseDelegateExecution.java
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
*
|
| 21 |
+
* @author Daniel Meyer
|
| 22 |
+
* @author Roman Smirnov
|
| 23 |
+
* @author Sebastian Menski
|
| 24 |
+
*
|
| 25 |
+
*/
|
| 26 |
+
public interface BaseDelegateExecution extends VariableScope {
|
| 27 |
+
|
| 28 |
+
/** Unique id of this path of execution that can be used as a handle to provide external signals back into the engine after wait states. */
|
| 29 |
+
String getId();
|
| 30 |
+
|
| 31 |
+
/** The {@link ExecutionListener#EVENTNAME_START event name} in case this execution is passed in for an {@link ExecutionListener} */
|
| 32 |
+
String getEventName();
|
| 33 |
+
|
| 34 |
+
/** The business key for the root execution (e.g. process instance).
|
| 35 |
+
*/
|
| 36 |
+
String getBusinessKey();
|
| 37 |
+
|
| 38 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/BpmnError.java
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.ProcessEngineException;
|
| 20 |
+
import org.camunda.bpm.engine.impl.bpmn.parser.Error;
|
| 21 |
+
|
| 22 |
+
import static org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty;
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
/**
|
| 26 |
+
* Special exception that can be used to throw a BPMN Error from
|
| 27 |
+
* {@link JavaDelegate}s and expressions.
|
| 28 |
+
*
|
| 29 |
+
* This should only be used for business faults, which shall be handled by a
|
| 30 |
+
* Boundary Error Event or Error Event Sub-Process modeled in the process
|
| 31 |
+
* definition. Technical errors should be represented by other exception types.
|
| 32 |
+
*
|
| 33 |
+
* This class represents an actual instance of a BPMN Error, whereas
|
| 34 |
+
* {@link Error} represents an Error definition.
|
| 35 |
+
*
|
| 36 |
+
* @author Falko Menge
|
| 37 |
+
*/
|
| 38 |
+
public class BpmnError extends ProcessEngineException {
|
| 39 |
+
|
| 40 |
+
private static final long serialVersionUID = 1L;
|
| 41 |
+
|
| 42 |
+
private String errorCode;
|
| 43 |
+
private String errorMessage;
|
| 44 |
+
|
| 45 |
+
public BpmnError(String errorCode) {
|
| 46 |
+
super(exceptionMessage(errorCode, null));
|
| 47 |
+
setErrorCode(errorCode);
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
public BpmnError(String errorCode, String message) {
|
| 51 |
+
super(exceptionMessage(errorCode, message));
|
| 52 |
+
setErrorCode(errorCode);
|
| 53 |
+
setMessage(message);
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
public BpmnError(String errorCode, String message, Throwable cause) {
|
| 57 |
+
super(exceptionMessage(errorCode, message), cause);
|
| 58 |
+
setErrorCode(errorCode);
|
| 59 |
+
setMessage(message);
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
public BpmnError(String errorCode, Throwable cause) {
|
| 63 |
+
super(exceptionMessage(errorCode, null), cause);
|
| 64 |
+
setErrorCode(errorCode);
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
private static String exceptionMessage(String errorCode, String message) {
|
| 68 |
+
if (message == null) {
|
| 69 |
+
return "";
|
| 70 |
+
} else {
|
| 71 |
+
return message + " (errorCode='" + errorCode + "')";
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
protected void setErrorCode(String errorCode) {
|
| 76 |
+
ensureNotEmpty("Error Code", errorCode);
|
| 77 |
+
this.errorCode = errorCode;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
public String getErrorCode() {
|
| 81 |
+
return errorCode;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
@Override
|
| 85 |
+
public String toString() {
|
| 86 |
+
return super.toString() + " (errorCode='" + errorCode + "')";
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
protected void setMessage(String errorMessage) {
|
| 90 |
+
ensureNotEmpty("Error Message", errorMessage);
|
| 91 |
+
this.errorMessage = errorMessage;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
@Override
|
| 95 |
+
public String getMessage() {
|
| 96 |
+
return errorMessage;
|
| 97 |
+
}
|
| 98 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/BpmnModelExecutionContext.java
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.model.bpmn.BpmnModelInstance;
|
| 20 |
+
import org.camunda.bpm.model.bpmn.instance.FlowElement;
|
| 21 |
+
import org.camunda.bpm.model.bpmn.instance.FlowNode;
|
| 22 |
+
import org.camunda.bpm.model.bpmn.instance.SequenceFlow;
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* Implemented by classes which provide access to the {@link BpmnModelInstance}
|
| 26 |
+
* and the currently executed {@link FlowElement}.
|
| 27 |
+
*
|
| 28 |
+
* @author Daniel Meyer
|
| 29 |
+
* @author Sebastian Menski
|
| 30 |
+
*
|
| 31 |
+
*/
|
| 32 |
+
public interface BpmnModelExecutionContext {
|
| 33 |
+
|
| 34 |
+
/**
|
| 35 |
+
* Returns the {@link BpmnModelInstance} for the currently executed Bpmn Model
|
| 36 |
+
*
|
| 37 |
+
* @return the current {@link BpmnModelInstance}
|
| 38 |
+
*/
|
| 39 |
+
BpmnModelInstance getBpmnModelInstance();
|
| 40 |
+
|
| 41 |
+
/**
|
| 42 |
+
* <p>Returns the currently executed Element in the BPMN Model. This method returns a {@link FlowElement} which may be casted
|
| 43 |
+
* to the concrete type of the Bpmn Model Element currently executed.</p>
|
| 44 |
+
*
|
| 45 |
+
* <p>If called from a Service {@link ExecutionListener}, the method will return the corresponding {@link FlowNode}
|
| 46 |
+
* for {@link ExecutionListener#EVENTNAME_START} and {@link ExecutionListener#EVENTNAME_END} and the corresponding
|
| 47 |
+
* {@link SequenceFlow} for {@link ExecutionListener#EVENTNAME_TAKE}.</p>
|
| 48 |
+
*
|
| 49 |
+
* @return the {@link FlowElement} corresponding to the current Bpmn Model Element
|
| 50 |
+
*/
|
| 51 |
+
FlowElement getBpmnModelElementInstance();
|
| 52 |
+
|
| 53 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/CaseExecutionListener.java
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.runtime.CaseExecution;
|
| 20 |
+
import org.camunda.bpm.engine.runtime.CaseInstance;
|
| 21 |
+
import org.camunda.bpm.model.cmmn.instance.Stage;
|
| 22 |
+
import org.camunda.bpm.model.cmmn.instance.Task;
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* Listener interface implemented by user code which wants to be notified
|
| 26 |
+
* when a state transition happens on a {@link CaseExecution}.
|
| 27 |
+
*
|
| 28 |
+
* <p>The following state transition are supported on a {@link CaseInstance}:
|
| 29 |
+
* <ul>
|
| 30 |
+
* <li>{@link #CREATE}</li>
|
| 31 |
+
* <li>{@link #COMPLETE}</li>
|
| 32 |
+
* <li>{@link #TERMINATE}</li>
|
| 33 |
+
* <li>{@link #SUSPEND}</li>
|
| 34 |
+
* <li>{@link #RE_ACTIVATE}</li>
|
| 35 |
+
* <li>{@link #CLOSE}</li>
|
| 36 |
+
* </ul>
|
| 37 |
+
* </p>
|
| 38 |
+
*
|
| 39 |
+
* <p>And on a {@link CaseExecution} which is not a {@link CaseInstance} and which
|
| 40 |
+
* is associated with a {@link Task} or a {@link Stage} the following state transition
|
| 41 |
+
* are supported:
|
| 42 |
+
* <ul>
|
| 43 |
+
* <li>{@link #CREATE}</li>
|
| 44 |
+
* <li>{@link #ENABLE}</li>
|
| 45 |
+
* <li>{@link #DISABLE}</li>
|
| 46 |
+
* <li>{@link #RE_ENABLE}</li>
|
| 47 |
+
* <li>{@link #START}</li>
|
| 48 |
+
* <li>{@link #MANUAL_START}</li>
|
| 49 |
+
* <li>{@link #COMPLETE}</li>
|
| 50 |
+
* <li>{@link #TERMINATE}</li>
|
| 51 |
+
* <li>{@link #EXIT}</li>
|
| 52 |
+
* <li>{@link #SUSPEND}</li>
|
| 53 |
+
* <li>{@link #RESUME}</li>
|
| 54 |
+
* <li>{@link #PARENT_SUSPEND}</li>
|
| 55 |
+
* <li>{@link #PARENT_RESUME}</li>
|
| 56 |
+
* </ul>
|
| 57 |
+
* </p>
|
| 58 |
+
*
|
| 59 |
+
* @author Roman Smirnov
|
| 60 |
+
*
|
| 61 |
+
*/
|
| 62 |
+
public interface CaseExecutionListener extends DelegateListener<DelegateCaseExecution> {
|
| 63 |
+
|
| 64 |
+
String CREATE = "create";
|
| 65 |
+
String ENABLE = "enable";
|
| 66 |
+
String DISABLE = "disable";
|
| 67 |
+
String RE_ENABLE = "reenable";
|
| 68 |
+
String START = "start";
|
| 69 |
+
String MANUAL_START = "manualStart";
|
| 70 |
+
String COMPLETE = "complete";
|
| 71 |
+
String RE_ACTIVATE = "reactivate";
|
| 72 |
+
String TERMINATE = "terminate";
|
| 73 |
+
String EXIT = "exit";
|
| 74 |
+
String PARENT_TERMINATE = "parentTerminate";
|
| 75 |
+
String SUSPEND = "suspend";
|
| 76 |
+
String RESUME = "resume";
|
| 77 |
+
String PARENT_SUSPEND = "parentSuspend";
|
| 78 |
+
String PARENT_RESUME = "parentResume";
|
| 79 |
+
String CLOSE = "close";
|
| 80 |
+
String OCCUR = "occur";
|
| 81 |
+
|
| 82 |
+
void notify(DelegateCaseExecution caseExecution) throws Exception;
|
| 83 |
+
|
| 84 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/CaseVariableListener.java
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* <p>A variable listener can be defined on a scope in a case model.
|
| 21 |
+
* Depending on its configuration, it is invoked when a variable is create/updated/deleted
|
| 22 |
+
* on a case execution that corresponds to that scope or to any of its descendant scopes.</p>
|
| 23 |
+
*
|
| 24 |
+
* <p>
|
| 25 |
+
* <strong>Beware:</strong> If you set a variable inside a {@link VariableListener} implementation,
|
| 26 |
+
* this will result in new variable listener invocations. Make sure that your implementation
|
| 27 |
+
* allows to exit such a cascade as otherwise there will be an <strong>infinite loop</strong>.
|
| 28 |
+
* </p>
|
| 29 |
+
*
|
| 30 |
+
* @author Thorben Lindhauer
|
| 31 |
+
*/
|
| 32 |
+
public interface CaseVariableListener extends VariableListener<DelegateCaseVariableInstance> {
|
| 33 |
+
|
| 34 |
+
String CREATE = VariableListener.CREATE;
|
| 35 |
+
String UPDATE = VariableListener.UPDATE;
|
| 36 |
+
String DELETE = VariableListener.DELETE;
|
| 37 |
+
|
| 38 |
+
void notify(DelegateCaseVariableInstance variableInstance) throws Exception;
|
| 39 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/CmmnModelExecutionContext.java
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.model.cmmn.CmmnModelInstance;
|
| 20 |
+
import org.camunda.bpm.model.cmmn.instance.CmmnElement;
|
| 21 |
+
|
| 22 |
+
/**
|
| 23 |
+
* Implemented by classes which provide access to the {@link CmmnModelInstance}
|
| 24 |
+
* and the currently executed {@link CmmnElement}.
|
| 25 |
+
*
|
| 26 |
+
* @author Roman Smirnov
|
| 27 |
+
*
|
| 28 |
+
*/
|
| 29 |
+
public interface CmmnModelExecutionContext {
|
| 30 |
+
|
| 31 |
+
/**
|
| 32 |
+
* Returns the {@link CmmnModelInstance} for the currently executed Cmmn Model
|
| 33 |
+
*
|
| 34 |
+
* @return the current {@link CmmnModelInstance}
|
| 35 |
+
*/
|
| 36 |
+
CmmnModelInstance getCmmnModelInstance();
|
| 37 |
+
|
| 38 |
+
/**
|
| 39 |
+
* <p>Returns the currently executed Element in the Cmmn Model. This method returns a {@link CmmnElement} which may be casted
|
| 40 |
+
* to the concrete type of the Cmmn Model Element currently executed.</p>
|
| 41 |
+
*
|
| 42 |
+
* @return the {@link CmmnElement} corresponding to the current Cmmn Model Element
|
| 43 |
+
*/
|
| 44 |
+
CmmnElement getCmmnModelElementInstance();
|
| 45 |
+
|
| 46 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateCaseExecution.java
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* @author Roman Smirnov
|
| 21 |
+
*
|
| 22 |
+
*/
|
| 23 |
+
public interface DelegateCaseExecution extends BaseDelegateExecution, ProcessEngineServicesAware, CmmnModelExecutionContext {
|
| 24 |
+
|
| 25 |
+
String getId();
|
| 26 |
+
|
| 27 |
+
String getCaseInstanceId();
|
| 28 |
+
|
| 29 |
+
String getEventName();
|
| 30 |
+
|
| 31 |
+
String getCaseBusinessKey();
|
| 32 |
+
|
| 33 |
+
String getCaseDefinitionId();
|
| 34 |
+
|
| 35 |
+
String getParentId();
|
| 36 |
+
|
| 37 |
+
String getActivityId();
|
| 38 |
+
|
| 39 |
+
String getActivityName();
|
| 40 |
+
|
| 41 |
+
String getTenantId();
|
| 42 |
+
|
| 43 |
+
boolean isAvailable();
|
| 44 |
+
|
| 45 |
+
boolean isEnabled();
|
| 46 |
+
|
| 47 |
+
boolean isDisabled();
|
| 48 |
+
|
| 49 |
+
boolean isActive();
|
| 50 |
+
|
| 51 |
+
boolean isSuspended();
|
| 52 |
+
|
| 53 |
+
boolean isTerminated();
|
| 54 |
+
|
| 55 |
+
boolean isCompleted();
|
| 56 |
+
|
| 57 |
+
boolean isFailed();
|
| 58 |
+
|
| 59 |
+
boolean isClosed();
|
| 60 |
+
|
| 61 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateCaseVariableInstance.java
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
/**
|
| 21 |
+
* @author Thorben Lindhauer
|
| 22 |
+
*
|
| 23 |
+
*/
|
| 24 |
+
public interface DelegateCaseVariableInstance extends DelegateVariableInstance<DelegateCaseExecution> {
|
| 25 |
+
|
| 26 |
+
/** The event name, which caused the listener to be notified.
|
| 27 |
+
* Valid values are the constants defined in {@link CaseVariableListener}.*/
|
| 28 |
+
String getEventName();
|
| 29 |
+
|
| 30 |
+
/** The case execution in which context the variable was created/updated/deleted. */
|
| 31 |
+
DelegateCaseExecution getSourceExecution();
|
| 32 |
+
|
| 33 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateExecution.java
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.ProcessEngineException;
|
| 20 |
+
import org.camunda.bpm.engine.runtime.Incident;
|
| 21 |
+
|
| 22 |
+
/**
|
| 23 |
+
* Execution used in {@link JavaDelegate}s and {@link ExecutionListener}s.
|
| 24 |
+
*
|
| 25 |
+
* @author Tom Baeyens
|
| 26 |
+
*/
|
| 27 |
+
public interface DelegateExecution extends BaseDelegateExecution, BpmnModelExecutionContext, ProcessEngineServicesAware {
|
| 28 |
+
|
| 29 |
+
/** Reference to the overall process instance */
|
| 30 |
+
String getProcessInstanceId();
|
| 31 |
+
|
| 32 |
+
/**
|
| 33 |
+
* The business key for the process instance this execution is associated
|
| 34 |
+
* with.
|
| 35 |
+
*/
|
| 36 |
+
String getProcessBusinessKey();
|
| 37 |
+
|
| 38 |
+
/**
|
| 39 |
+
* Configure a business key on the process instance this execution is associated
|
| 40 |
+
* with.
|
| 41 |
+
*
|
| 42 |
+
* @param businessKey the new business key
|
| 43 |
+
*/
|
| 44 |
+
void setProcessBusinessKey(String businessKey);
|
| 45 |
+
|
| 46 |
+
/**
|
| 47 |
+
* The process definition key for the process instance this execution is
|
| 48 |
+
* associated with.
|
| 49 |
+
*/
|
| 50 |
+
String getProcessDefinitionId();
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the id of the parent of this execution. If null, the execution
|
| 54 |
+
* represents a process-instance.
|
| 55 |
+
*/
|
| 56 |
+
String getParentId();
|
| 57 |
+
|
| 58 |
+
/**
|
| 59 |
+
* Gets the id of the current activity.
|
| 60 |
+
*/
|
| 61 |
+
String getCurrentActivityId();
|
| 62 |
+
|
| 63 |
+
/**
|
| 64 |
+
* Gets the name of the current activity.
|
| 65 |
+
*/
|
| 66 |
+
String getCurrentActivityName();
|
| 67 |
+
|
| 68 |
+
/**
|
| 69 |
+
* return the Id of the activity instance currently executed by this execution
|
| 70 |
+
*/
|
| 71 |
+
String getActivityInstanceId();
|
| 72 |
+
|
| 73 |
+
/**
|
| 74 |
+
* return the Id of the parent activity instance currently executed by this
|
| 75 |
+
* execution
|
| 76 |
+
*/
|
| 77 |
+
String getParentActivityInstanceId();
|
| 78 |
+
|
| 79 |
+
/** return the Id of the current transition */
|
| 80 |
+
String getCurrentTransitionId();
|
| 81 |
+
|
| 82 |
+
/**
|
| 83 |
+
* Return the process instance execution for this execution. In case this
|
| 84 |
+
* execution is the process instance execution the method returns itself.
|
| 85 |
+
*/
|
| 86 |
+
DelegateExecution getProcessInstance();
|
| 87 |
+
|
| 88 |
+
/**
|
| 89 |
+
* In case this delegate execution is the process instance execution
|
| 90 |
+
* and this process instance was started by a call activity, this method
|
| 91 |
+
* returns the execution which executed the call activity in the super process instance.
|
| 92 |
+
*
|
| 93 |
+
* @return the super execution or null.
|
| 94 |
+
*/
|
| 95 |
+
DelegateExecution getSuperExecution();
|
| 96 |
+
|
| 97 |
+
/**
|
| 98 |
+
* Returns whether this execution has been canceled.
|
| 99 |
+
*/
|
| 100 |
+
boolean isCanceled();
|
| 101 |
+
|
| 102 |
+
/**
|
| 103 |
+
* Return the id of the tenant this execution belongs to. Can be <code>null</code>
|
| 104 |
+
* if the execution belongs to no single tenant.
|
| 105 |
+
*/
|
| 106 |
+
String getTenantId();
|
| 107 |
+
|
| 108 |
+
/**
|
| 109 |
+
* Method to store variable in a specific scope identified by activity ID.
|
| 110 |
+
*
|
| 111 |
+
* @param variableName - name of the variable
|
| 112 |
+
* @param value - value of the variable
|
| 113 |
+
* @param activityId - activity ID which is associated with destination execution,
|
| 114 |
+
* if not existing - exception will be thrown
|
| 115 |
+
* @throws ProcessEngineException if scope with specified activity ID is not found
|
| 116 |
+
*/
|
| 117 |
+
void setVariable (String variableName, Object value, String activityId);
|
| 118 |
+
|
| 119 |
+
/**
|
| 120 |
+
* Create an incident associated with this execution
|
| 121 |
+
*
|
| 122 |
+
* @param incidentType the type of incident
|
| 123 |
+
* @param configuration
|
| 124 |
+
* @return a new incident
|
| 125 |
+
*/
|
| 126 |
+
Incident createIncident(String incidentType, String configuration);
|
| 127 |
+
|
| 128 |
+
/**
|
| 129 |
+
* Create an incident associated with this execution
|
| 130 |
+
*
|
| 131 |
+
* @param incidentType the type of incident
|
| 132 |
+
* @param configuration
|
| 133 |
+
* @param message
|
| 134 |
+
* @return a new incident
|
| 135 |
+
*/
|
| 136 |
+
Incident createIncident(String incidentType, String configuration, String message);
|
| 137 |
+
|
| 138 |
+
/**
|
| 139 |
+
* Resolve and remove an incident with given id
|
| 140 |
+
*
|
| 141 |
+
* @param incidentId
|
| 142 |
+
*/
|
| 143 |
+
void resolveIncident(String incidentId);
|
| 144 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateListener.java
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* @author Daniel Meyer
|
| 21 |
+
* @author Roman Smirnov
|
| 22 |
+
* @author Sebastian Menski
|
| 23 |
+
*
|
| 24 |
+
*/
|
| 25 |
+
public interface DelegateListener<T extends BaseDelegateExecution> {
|
| 26 |
+
|
| 27 |
+
void notify(T instance) throws Exception;
|
| 28 |
+
|
| 29 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateTask.java
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
import java.util.Collection;
|
| 20 |
+
import java.util.Date;
|
| 21 |
+
import java.util.Set;
|
| 22 |
+
|
| 23 |
+
import org.camunda.bpm.engine.ProcessEngineException;
|
| 24 |
+
import org.camunda.bpm.engine.task.IdentityLink;
|
| 25 |
+
import org.camunda.bpm.engine.task.IdentityLinkType;
|
| 26 |
+
import org.camunda.bpm.model.bpmn.instance.UserTask;
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* @author Joram Barrez
|
| 30 |
+
* @author Daniel Meyer
|
| 31 |
+
* @author Sebastian Menski
|
| 32 |
+
*/
|
| 33 |
+
public interface DelegateTask extends VariableScope, BpmnModelExecutionContext, ProcessEngineServicesAware {
|
| 34 |
+
|
| 35 |
+
/** DB id of the task. */
|
| 36 |
+
String getId();
|
| 37 |
+
|
| 38 |
+
/** Name or title of the task. */
|
| 39 |
+
String getName();
|
| 40 |
+
|
| 41 |
+
/** Change the name of the task. */
|
| 42 |
+
void setName(String name);
|
| 43 |
+
|
| 44 |
+
/** Free text description of the task. */
|
| 45 |
+
String getDescription();
|
| 46 |
+
|
| 47 |
+
/** Change the description of the task */
|
| 48 |
+
void setDescription(String description);
|
| 49 |
+
|
| 50 |
+
/** indication of how important/urgent this task is with a number between
|
| 51 |
+
* 0 and 100 where higher values mean a higher priority and lower values mean
|
| 52 |
+
* lower priority: [0..19] lowest, [20..39] low, [40..59] normal, [60..79] high
|
| 53 |
+
* [80..100] highest */
|
| 54 |
+
int getPriority();
|
| 55 |
+
|
| 56 |
+
/** indication of how important/urgent this task is with a number between
|
| 57 |
+
* 0 and 100 where higher values mean a higher priority and lower values mean
|
| 58 |
+
* lower priority: [0..19] lowest, [20..39] low, [40..59] normal, [60..79] high
|
| 59 |
+
* [80..100] highest */
|
| 60 |
+
void setPriority(int priority);
|
| 61 |
+
|
| 62 |
+
/** Reference to the process instance or null if it is not related to a process instance. */
|
| 63 |
+
String getProcessInstanceId();
|
| 64 |
+
|
| 65 |
+
/** Reference to the path of execution or null if it is not related to a process instance. */
|
| 66 |
+
String getExecutionId();
|
| 67 |
+
|
| 68 |
+
/** Reference to the process definition or null if it is not related to a process. */
|
| 69 |
+
String getProcessDefinitionId();
|
| 70 |
+
|
| 71 |
+
/** Reference to the case instance or null if it is not related to a case instance. */
|
| 72 |
+
String getCaseInstanceId();
|
| 73 |
+
|
| 74 |
+
/** Reference to the case execution or null if it is not related to a case instance. */
|
| 75 |
+
String getCaseExecutionId();
|
| 76 |
+
|
| 77 |
+
/** Reference to the case definition or null if it is not related to a case. */
|
| 78 |
+
String getCaseDefinitionId();
|
| 79 |
+
|
| 80 |
+
/** The date/time when this task was created */
|
| 81 |
+
Date getCreateTime();
|
| 82 |
+
|
| 83 |
+
/**
|
| 84 |
+
* The date/time when this task was last updated.
|
| 85 |
+
* All operations that fire {@link TaskListener#EVENTNAME_UPDATE} count as an update to the task.
|
| 86 |
+
* Returns null if the task was never updated before (i.e. it was only created).
|
| 87 |
+
* */
|
| 88 |
+
Date getLastUpdated();
|
| 89 |
+
|
| 90 |
+
/** The id of the activity in the process defining this task or null if this is not related to a process */
|
| 91 |
+
String getTaskDefinitionKey();
|
| 92 |
+
|
| 93 |
+
/** Returns the execution currently at the task. */
|
| 94 |
+
DelegateExecution getExecution();
|
| 95 |
+
|
| 96 |
+
/** Returns the case execution currently at the task. */
|
| 97 |
+
DelegateCaseExecution getCaseExecution();
|
| 98 |
+
|
| 99 |
+
/** Returns the event name which triggered the task listener to fire for this task. */
|
| 100 |
+
String getEventName();
|
| 101 |
+
|
| 102 |
+
/** Adds the given user as a candidate user to this task. */
|
| 103 |
+
void addCandidateUser(String userId);
|
| 104 |
+
|
| 105 |
+
/** Adds multiple users as candidate user to this task. */
|
| 106 |
+
void addCandidateUsers(Collection<String> candidateUsers);
|
| 107 |
+
|
| 108 |
+
/** Adds the given group as candidate group to this task */
|
| 109 |
+
void addCandidateGroup(String groupId);
|
| 110 |
+
|
| 111 |
+
/** Adds multiple groups as candidate group to this task. */
|
| 112 |
+
void addCandidateGroups(Collection<String> candidateGroups);
|
| 113 |
+
|
| 114 |
+
/** The {@link User.getId() userId} of the person responsible for this task. */
|
| 115 |
+
String getOwner();
|
| 116 |
+
|
| 117 |
+
/** The {@link User.getId() userId} of the person responsible for this task.*/
|
| 118 |
+
void setOwner(String owner);
|
| 119 |
+
|
| 120 |
+
/** The {@link User.getId() userId} of the person to which this task is delegated. */
|
| 121 |
+
String getAssignee();
|
| 122 |
+
|
| 123 |
+
/** The {@link User.getId() userId} of the person to which this task is delegated. */
|
| 124 |
+
void setAssignee(String assignee);
|
| 125 |
+
|
| 126 |
+
/** Due date of the task. */
|
| 127 |
+
Date getDueDate();
|
| 128 |
+
|
| 129 |
+
/** Change due date of the task. */
|
| 130 |
+
void setDueDate(Date dueDate);
|
| 131 |
+
|
| 132 |
+
/** Get delete reason of the task. */
|
| 133 |
+
String getDeleteReason();
|
| 134 |
+
|
| 135 |
+
/**
|
| 136 |
+
* Involves a user with a task. The type of identity link is defined by the given identityLinkType.
|
| 137 |
+
* @param userId id of the user involve, cannot be null.
|
| 138 |
+
* @param identityLinkType type of identityLink, cannot be null (@see {@link IdentityLinkType}).
|
| 139 |
+
* @throws ProcessEngineException when the task or user doesn't exist.
|
| 140 |
+
*/
|
| 141 |
+
void addUserIdentityLink(String userId, String identityLinkType);
|
| 142 |
+
|
| 143 |
+
/**
|
| 144 |
+
* Involves a group with group task. The type of identityLink is defined by the given identityLink.
|
| 145 |
+
* @param groupId id of the group to involve, cannot be null.
|
| 146 |
+
* @param identityLinkType type of identity, cannot be null (@see {@link IdentityLinkType}).
|
| 147 |
+
* @throws ProcessEngineException when the task or group doesn't exist.
|
| 148 |
+
*/
|
| 149 |
+
void addGroupIdentityLink(String groupId, String identityLinkType);
|
| 150 |
+
|
| 151 |
+
/**
|
| 152 |
+
* Convenience shorthand for {@link #deleteUserIdentityLink(String, String)}; with type {@link IdentityLinkType#CANDIDATE}
|
| 153 |
+
* @param userId id of the user to use as candidate, cannot be null.
|
| 154 |
+
* @throws ProcessEngineException when the task or user doesn't exist.
|
| 155 |
+
*/
|
| 156 |
+
void deleteCandidateUser(String userId);
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Convenience shorthand for {@link #deleteGroupIdentityLink(String, String, String)}; with type {@link IdentityLinkType#CANDIDATE}
|
| 160 |
+
* @param groupId id of the group to use as candidate, cannot be null.
|
| 161 |
+
* @throws ProcessEngineException when the task or group doesn't exist.
|
| 162 |
+
*/
|
| 163 |
+
void deleteCandidateGroup(String groupId);
|
| 164 |
+
|
| 165 |
+
/**
|
| 166 |
+
* Removes the association between a user and a task for the given identityLinkType.
|
| 167 |
+
* @param userId id of the user involve, cannot be null.
|
| 168 |
+
* @param identityLinkType type of identityLink, cannot be null (@see {@link IdentityLinkType}).
|
| 169 |
+
* @throws ProcessEngineException when the task or user doesn't exist.
|
| 170 |
+
*/
|
| 171 |
+
void deleteUserIdentityLink(String userId, String identityLinkType);
|
| 172 |
+
|
| 173 |
+
/**
|
| 174 |
+
* Removes the association between a group and a task for the given identityLinkType.
|
| 175 |
+
* @param groupId id of the group to involve, cannot be null.
|
| 176 |
+
* @param identityLinkType type of identity, cannot be null (@see {@link IdentityLinkType}).
|
| 177 |
+
* @throws ProcessEngineException when the task or group doesn't exist.
|
| 178 |
+
*/
|
| 179 |
+
void deleteGroupIdentityLink(String groupId, String identityLinkType);
|
| 180 |
+
|
| 181 |
+
/**
|
| 182 |
+
* Retrieves the candidate users and groups associated with the task.
|
| 183 |
+
* @return set of {@link IdentityLink}s of type {@link IdentityLinkType#CANDIDATE}.
|
| 184 |
+
*/
|
| 185 |
+
Set<IdentityLink> getCandidates();
|
| 186 |
+
|
| 187 |
+
/**
|
| 188 |
+
* Provides access to the current {@link UserTask} Element from the Bpmn Model.
|
| 189 |
+
* @return the current {@link UserTask} Element from the Bpmn Model.
|
| 190 |
+
*/
|
| 191 |
+
@Override
|
| 192 |
+
public UserTask getBpmnModelElementInstance();
|
| 193 |
+
|
| 194 |
+
/**
|
| 195 |
+
* Return the id of the tenant this task belongs to. Can be <code>null</code>
|
| 196 |
+
* if the task belongs to no single tenant.
|
| 197 |
+
*/
|
| 198 |
+
String getTenantId();
|
| 199 |
+
|
| 200 |
+
/** Follow-up date of the task. */
|
| 201 |
+
Date getFollowUpDate();
|
| 202 |
+
|
| 203 |
+
/** Change follow-up date of the task. */
|
| 204 |
+
void setFollowUpDate(Date followUpDate);
|
| 205 |
+
|
| 206 |
+
/**
|
| 207 |
+
* set status to complete.
|
| 208 |
+
*
|
| 209 |
+
* @throws IllegalStateException if performed on completion or deletion
|
| 210 |
+
*/
|
| 211 |
+
void complete();
|
| 212 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateVariableInstance.java
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.runtime.VariableInstance;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* @author Thorben Lindhauer
|
| 23 |
+
*
|
| 24 |
+
*/
|
| 25 |
+
public interface DelegateVariableInstance<T extends BaseDelegateExecution> extends VariableInstance, ProcessEngineServicesAware {
|
| 26 |
+
|
| 27 |
+
String getEventName();
|
| 28 |
+
|
| 29 |
+
T getSourceExecution();
|
| 30 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateVariableMapping.java
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.variable.VariableMap;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* Represents a delegated mapping of input and output variables.
|
| 23 |
+
*
|
| 24 |
+
* @author Christopher Zell <christopher.zell@camunda.com>
|
| 25 |
+
*/
|
| 26 |
+
public interface DelegateVariableMapping {
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Maps the input variables into the given variables map.
|
| 30 |
+
* The variables map will be used by the sub process.
|
| 31 |
+
*
|
| 32 |
+
* @param superExecution the execution object of the super (outer) process
|
| 33 |
+
* @param subVariables the variables map of the sub (inner) process
|
| 34 |
+
*/
|
| 35 |
+
void mapInputVariables(DelegateExecution superExecution, VariableMap subVariables);
|
| 36 |
+
|
| 37 |
+
/**
|
| 38 |
+
* Maps the output variables into the outer process. This means the variables of
|
| 39 |
+
* the sub process, which can be accessed via the subInstance, will be
|
| 40 |
+
* set as variables into the super process, for example via ${superExecution.setVariables}.
|
| 41 |
+
*
|
| 42 |
+
* @param superExecution the execution object of the super (outer) process, which gets the output variables
|
| 43 |
+
* @param subInstance the instance of the sub process, which contains the variables
|
| 44 |
+
*/
|
| 45 |
+
void mapOutputVariables(DelegateExecution superExecution, VariableScope subInstance);
|
| 46 |
+
|
| 47 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/ExecutionListener.java
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
/** Callback interface to be notified of execution events like starting a process instance,
|
| 23 |
+
* ending an activity instance or taking a transition.
|
| 24 |
+
*
|
| 25 |
+
* @author Tom Baeyens
|
| 26 |
+
* @author Joram Barrez
|
| 27 |
+
*/
|
| 28 |
+
public interface ExecutionListener extends DelegateListener<DelegateExecution> {
|
| 29 |
+
|
| 30 |
+
String EVENTNAME_START = "start";
|
| 31 |
+
String EVENTNAME_END = "end";
|
| 32 |
+
String EVENTNAME_TAKE = "take";
|
| 33 |
+
|
| 34 |
+
void notify(DelegateExecution execution) throws Exception;
|
| 35 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/Expression.java
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* @author Frederik Heremans
|
| 21 |
+
*/
|
| 22 |
+
public interface Expression {
|
| 23 |
+
|
| 24 |
+
// public API for field injection
|
| 25 |
+
|
| 26 |
+
Object getValue(VariableScope variableScope);
|
| 27 |
+
|
| 28 |
+
void setValue(Object value, VariableScope variableScope);
|
| 29 |
+
|
| 30 |
+
String getExpressionText();
|
| 31 |
+
|
| 32 |
+
boolean isLiteralText();
|
| 33 |
+
|
| 34 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/JavaDelegate.java
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
/**
|
| 21 |
+
* Convience class that should be used when a Java delegation in a BPMN 2.0
|
| 22 |
+
* process is required (for example, to call custom business logic).
|
| 23 |
+
*
|
| 24 |
+
* This class can be used for both service tasks and event listeners.
|
| 25 |
+
*
|
| 26 |
+
* This class does not allow to influence the control flow. It follows the
|
| 27 |
+
* default BPMN 2.0 behavior of taking every outgoing sequence flow (which has a
|
| 28 |
+
* condition that evaluates to true if there is a condition defined) If you are
|
| 29 |
+
* in need of influencing the flow in your process, use the
|
| 30 |
+
* class 'org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior' instead.
|
| 31 |
+
*
|
| 32 |
+
* @author Joram Barrez
|
| 33 |
+
*/
|
| 34 |
+
public interface JavaDelegate {
|
| 35 |
+
|
| 36 |
+
void execute(DelegateExecution execution) throws Exception;
|
| 37 |
+
|
| 38 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/ProcessEngineServicesAware.java
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.ProcessEngine;
|
| 20 |
+
import org.camunda.bpm.engine.ProcessEngineServices;
|
| 21 |
+
|
| 22 |
+
/**
|
| 23 |
+
* <p>Interface providing access to the {@link ProcessEngineServices} from Java
|
| 24 |
+
* delegation code.</p>
|
| 25 |
+
*
|
| 26 |
+
* @author Daniel Meyer
|
| 27 |
+
*
|
| 28 |
+
*/
|
| 29 |
+
public interface ProcessEngineServicesAware {
|
| 30 |
+
|
| 31 |
+
/**
|
| 32 |
+
* Returns the {@link ProcessEngineServices} providing access to the
|
| 33 |
+
* public API of the process engine.
|
| 34 |
+
*
|
| 35 |
+
* @return the {@link ProcessEngineServices}.
|
| 36 |
+
*/
|
| 37 |
+
ProcessEngineServices getProcessEngineServices();
|
| 38 |
+
|
| 39 |
+
/**
|
| 40 |
+
* Returns the {@link ProcessEngine} providing access to the
|
| 41 |
+
* public API of the process engine.
|
| 42 |
+
*
|
| 43 |
+
* @return the {@link ProcessEngine}.
|
| 44 |
+
*/
|
| 45 |
+
ProcessEngine getProcessEngine();
|
| 46 |
+
|
| 47 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/TaskListener.java
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* Listener interface implemented by user code which wants to be notified when a property of a task changes.
|
| 21 |
+
*
|
| 22 |
+
* <p>The following Task Events are supported:
|
| 23 |
+
* <ul>
|
| 24 |
+
* <li>{@link #EVENTNAME_CREATE}</li>
|
| 25 |
+
* <li>{@link #EVENTNAME_ASSIGNMENT}</li>
|
| 26 |
+
* <li>{@link #EVENTNAME_COMPLETE}</li>
|
| 27 |
+
* <li>{@link #EVENTNAME_UPDATE}</li>
|
| 28 |
+
* <li>{@link #EVENTNAME_DELETE}</li>
|
| 29 |
+
* <li>{@link #EVENTNAME_TIMEOUT}</li>
|
| 30 |
+
* </ul>
|
| 31 |
+
* </p>
|
| 32 |
+
*
|
| 33 |
+
* @author Tom Baeyens
|
| 34 |
+
*/
|
| 35 |
+
public interface TaskListener {
|
| 36 |
+
|
| 37 |
+
String EVENTNAME_CREATE = "create";
|
| 38 |
+
String EVENTNAME_ASSIGNMENT = "assignment";
|
| 39 |
+
String EVENTNAME_COMPLETE = "complete";
|
| 40 |
+
String EVENTNAME_UPDATE = "update";
|
| 41 |
+
String EVENTNAME_DELETE = "delete";
|
| 42 |
+
String EVENTNAME_TIMEOUT = "timeout";
|
| 43 |
+
|
| 44 |
+
void notify(DelegateTask delegateTask);
|
| 45 |
+
|
| 46 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/VariableListener.java
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* @author Thorben Lindhauer
|
| 21 |
+
*/
|
| 22 |
+
public interface VariableListener<T extends DelegateVariableInstance<?>> {
|
| 23 |
+
|
| 24 |
+
String CREATE = "create";
|
| 25 |
+
String UPDATE = "update";
|
| 26 |
+
String DELETE = "delete";
|
| 27 |
+
|
| 28 |
+
void notify(T variableInstance) throws Exception;
|
| 29 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/VariableScope.java
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.delegate;
|
| 18 |
+
|
| 19 |
+
import java.util.Collection;
|
| 20 |
+
import java.util.Map;
|
| 21 |
+
import java.util.Set;
|
| 22 |
+
|
| 23 |
+
import org.camunda.bpm.engine.variable.VariableMap;
|
| 24 |
+
import org.camunda.bpm.engine.variable.value.TypedValue;
|
| 25 |
+
|
| 26 |
+
/**
|
| 27 |
+
* @author Tom Baeyens
|
| 28 |
+
*/
|
| 29 |
+
public interface VariableScope {
|
| 30 |
+
|
| 31 |
+
String getVariableScopeKey();
|
| 32 |
+
|
| 33 |
+
Map<String, Object> getVariables();
|
| 34 |
+
|
| 35 |
+
VariableMap getVariablesTyped();
|
| 36 |
+
|
| 37 |
+
VariableMap getVariablesTyped(boolean deserializeValues);
|
| 38 |
+
|
| 39 |
+
Map<String, Object> getVariablesLocal();
|
| 40 |
+
|
| 41 |
+
VariableMap getVariablesLocalTyped();
|
| 42 |
+
|
| 43 |
+
VariableMap getVariablesLocalTyped(boolean deserializeValues);
|
| 44 |
+
|
| 45 |
+
Object getVariable(String variableName);
|
| 46 |
+
|
| 47 |
+
Object getVariableLocal(String variableName);
|
| 48 |
+
|
| 49 |
+
<T extends TypedValue> T getVariableTyped(String variableName);
|
| 50 |
+
|
| 51 |
+
<T extends TypedValue> T getVariableTyped(String variableName, boolean deserializeValue);
|
| 52 |
+
|
| 53 |
+
<T extends TypedValue> T getVariableLocalTyped(String variableName);
|
| 54 |
+
|
| 55 |
+
<T extends TypedValue> T getVariableLocalTyped(String variableName, boolean deserializeValue);
|
| 56 |
+
|
| 57 |
+
Set<String> getVariableNames();
|
| 58 |
+
|
| 59 |
+
Set<String> getVariableNamesLocal();
|
| 60 |
+
|
| 61 |
+
void setVariable(String variableName, Object value);
|
| 62 |
+
|
| 63 |
+
void setVariableLocal(String variableName, Object value);
|
| 64 |
+
|
| 65 |
+
void setVariables(Map<String, ? extends Object> variables);
|
| 66 |
+
|
| 67 |
+
void setVariablesLocal(Map<String, ? extends Object> variables);
|
| 68 |
+
|
| 69 |
+
boolean hasVariables();
|
| 70 |
+
|
| 71 |
+
boolean hasVariablesLocal();
|
| 72 |
+
|
| 73 |
+
boolean hasVariable(String variableName);
|
| 74 |
+
|
| 75 |
+
boolean hasVariableLocal(String variableName);
|
| 76 |
+
|
| 77 |
+
/**
|
| 78 |
+
* Removes the variable and creates a new
|
| 79 |
+
* {@link HistoricVariableUpdateEntity}.
|
| 80 |
+
*/
|
| 81 |
+
void removeVariable(String variableName);
|
| 82 |
+
|
| 83 |
+
/**
|
| 84 |
+
* Removes the local variable and creates a new
|
| 85 |
+
* {@link HistoricVariableUpdateEntity}.
|
| 86 |
+
*/
|
| 87 |
+
void removeVariableLocal(String variableName);
|
| 88 |
+
|
| 89 |
+
/**
|
| 90 |
+
* Removes the variables and creates a new
|
| 91 |
+
* {@link HistoricVariableUpdateEntity} for each of them.
|
| 92 |
+
*/
|
| 93 |
+
void removeVariables(Collection<String> variableNames);
|
| 94 |
+
|
| 95 |
+
/**
|
| 96 |
+
* Removes the local variables and creates a new
|
| 97 |
+
* {@link HistoricVariableUpdateEntity} for each of them.
|
| 98 |
+
*/
|
| 99 |
+
void removeVariablesLocal(Collection<String> variableNames);
|
| 100 |
+
|
| 101 |
+
/**
|
| 102 |
+
* Removes the (local) variables and creates a new
|
| 103 |
+
* {@link HistoricVariableUpdateEntity} for each of them.
|
| 104 |
+
*/
|
| 105 |
+
void removeVariables();
|
| 106 |
+
|
| 107 |
+
/**
|
| 108 |
+
* Removes the (local) variables and creates a new
|
| 109 |
+
* {@link HistoricVariableUpdateEntity} for each of them.
|
| 110 |
+
*/
|
| 111 |
+
void removeVariablesLocal();
|
| 112 |
+
|
| 113 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/delegate/package.html
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<html>
|
| 2 |
+
<body>
|
| 3 |
+
Interfaces used to include Java code in a process as the behavior of an activity
|
| 4 |
+
or as a listener to process events with {@link org.camunda.bpm.engine.delegate.JavaDelegate}s.
|
| 5 |
+
</body>
|
| 6 |
+
</html>
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/dmn/DecisionEvaluationBuilder.java
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.dmn;
|
| 18 |
+
|
| 19 |
+
import java.util.Map;
|
| 20 |
+
|
| 21 |
+
import org.camunda.bpm.dmn.engine.DmnDecisionTableResult;
|
| 22 |
+
import org.camunda.bpm.engine.AuthorizationException;
|
| 23 |
+
import org.camunda.bpm.engine.authorization.Permissions;
|
| 24 |
+
import org.camunda.bpm.engine.authorization.Resources;
|
| 25 |
+
import org.camunda.bpm.engine.exception.NotFoundException;
|
| 26 |
+
import org.camunda.bpm.engine.exception.NotValidException;
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Fluent builder to evaluate a decision.
|
| 30 |
+
*
|
| 31 |
+
* @author Kristin Polenz
|
| 32 |
+
*
|
| 33 |
+
*/
|
| 34 |
+
public interface DecisionEvaluationBuilder {
|
| 35 |
+
|
| 36 |
+
/**
|
| 37 |
+
* Specify the id of the tenant the decision definition belongs to. Can only be
|
| 38 |
+
* used when the definition is referenced by <code>key</code> and not by <code>id</code>.
|
| 39 |
+
*/
|
| 40 |
+
DecisionEvaluationBuilder decisionDefinitionTenantId(String tenantId);
|
| 41 |
+
|
| 42 |
+
/**
|
| 43 |
+
* Specify that the decision definition belongs to no tenant. Can only be
|
| 44 |
+
* used when the definition is referenced by <code>key</code> and not by <code>id</code>.
|
| 45 |
+
*/
|
| 46 |
+
DecisionEvaluationBuilder decisionDefinitionWithoutTenantId();
|
| 47 |
+
|
| 48 |
+
/**
|
| 49 |
+
* Set the version of the decision definition. If <code>null</code> then
|
| 50 |
+
* the latest version is taken.
|
| 51 |
+
*/
|
| 52 |
+
DecisionEvaluationBuilder version(Integer version);
|
| 53 |
+
|
| 54 |
+
/**
|
| 55 |
+
* Set the input values of the decision.
|
| 56 |
+
*/
|
| 57 |
+
DecisionEvaluationBuilder variables(Map<String, Object> variables);
|
| 58 |
+
|
| 59 |
+
/**
|
| 60 |
+
* Evaluates the decision.
|
| 61 |
+
*
|
| 62 |
+
* @return the result of the evaluation.
|
| 63 |
+
*
|
| 64 |
+
* @throws NotFoundException
|
| 65 |
+
* when no decision definition is deployed with the given id / key.
|
| 66 |
+
*
|
| 67 |
+
* @throws NotValidException
|
| 68 |
+
* when the given decision definition id / key is null.
|
| 69 |
+
*
|
| 70 |
+
* @throws AuthorizationException
|
| 71 |
+
* if the user has no {@link Permissions#CREATE_INSTANCE} permission
|
| 72 |
+
* on {@link Resources#DECISION_DEFINITION}.
|
| 73 |
+
*/
|
| 74 |
+
DmnDecisionTableResult evaluate();
|
| 75 |
+
|
| 76 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/dmn/DecisionsEvaluationBuilder.java
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.dmn;
|
| 18 |
+
|
| 19 |
+
import java.util.Map;
|
| 20 |
+
|
| 21 |
+
import org.camunda.bpm.dmn.engine.DmnDecisionResult;
|
| 22 |
+
import org.camunda.bpm.engine.AuthorizationException;
|
| 23 |
+
import org.camunda.bpm.engine.authorization.Permissions;
|
| 24 |
+
import org.camunda.bpm.engine.authorization.Resources;
|
| 25 |
+
import org.camunda.bpm.engine.exception.NotFoundException;
|
| 26 |
+
import org.camunda.bpm.engine.exception.NotValidException;
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Fluent builder to evaluate a decision.
|
| 30 |
+
*/
|
| 31 |
+
public interface DecisionsEvaluationBuilder {
|
| 32 |
+
|
| 33 |
+
/**
|
| 34 |
+
* Specify the id of the tenant the decision definition belongs to. Can only be
|
| 35 |
+
* used when the definition is referenced by <code>key</code> and not by <code>id</code>.
|
| 36 |
+
*/
|
| 37 |
+
DecisionsEvaluationBuilder decisionDefinitionTenantId(String tenantId);
|
| 38 |
+
|
| 39 |
+
/**
|
| 40 |
+
* Specify that the decision definition belongs to no tenant. Can only be
|
| 41 |
+
* used when the definition is referenced by <code>key</code> and not by <code>id</code>.
|
| 42 |
+
*/
|
| 43 |
+
DecisionsEvaluationBuilder decisionDefinitionWithoutTenantId();
|
| 44 |
+
|
| 45 |
+
/**
|
| 46 |
+
* Set the version of the decision definition. If <code>null</code> then
|
| 47 |
+
* the latest version is taken.
|
| 48 |
+
*/
|
| 49 |
+
DecisionsEvaluationBuilder version(Integer version);
|
| 50 |
+
|
| 51 |
+
/**
|
| 52 |
+
* Set the input values of the decision.
|
| 53 |
+
*/
|
| 54 |
+
DecisionsEvaluationBuilder variables(Map<String, Object> variables);
|
| 55 |
+
|
| 56 |
+
/**
|
| 57 |
+
* Evaluates the decision.
|
| 58 |
+
*
|
| 59 |
+
* @return the result of the evaluation.
|
| 60 |
+
*
|
| 61 |
+
* @throws NotFoundException
|
| 62 |
+
* when no decision definition is deployed with the given id / key.
|
| 63 |
+
*
|
| 64 |
+
* @throws NotValidException
|
| 65 |
+
* when the given decision definition id / key is null.
|
| 66 |
+
*
|
| 67 |
+
* @throws AuthorizationException
|
| 68 |
+
* if the user has no {@link Permissions#CREATE_INSTANCE} permission
|
| 69 |
+
* on {@link Resources#DECISION_DEFINITION}.
|
| 70 |
+
*/
|
| 71 |
+
DmnDecisionResult evaluate();
|
| 72 |
+
|
| 73 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/DeploymentResourceNotFoundException.java
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.ProcessEngineException;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* @author Roman Smirnov
|
| 23 |
+
*
|
| 24 |
+
*/
|
| 25 |
+
public class DeploymentResourceNotFoundException extends ProcessEngineException {
|
| 26 |
+
|
| 27 |
+
private static final long serialVersionUID = 1L;
|
| 28 |
+
|
| 29 |
+
public DeploymentResourceNotFoundException() {
|
| 30 |
+
super();
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
public DeploymentResourceNotFoundException(String message, Throwable cause) {
|
| 34 |
+
super(message, cause);
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
public DeploymentResourceNotFoundException(String message) {
|
| 38 |
+
super(message);
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
public DeploymentResourceNotFoundException(Throwable cause) {
|
| 42 |
+
super(cause);
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotAllowedException.java
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.BadUserRequestException;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* <p>This exception is thrown, if an operation is not allowed to be executed.</p>
|
| 23 |
+
*
|
| 24 |
+
* @author Roman Smirnov
|
| 25 |
+
*
|
| 26 |
+
*/
|
| 27 |
+
public class NotAllowedException extends BadUserRequestException {
|
| 28 |
+
|
| 29 |
+
private static final long serialVersionUID = 1L;
|
| 30 |
+
|
| 31 |
+
public NotAllowedException() {
|
| 32 |
+
super();
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
public NotAllowedException(String message, Throwable cause) {
|
| 36 |
+
super(message, cause);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
public NotAllowedException(String message) {
|
| 40 |
+
super(message);
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
public NotAllowedException(Throwable cause) {
|
| 44 |
+
super(cause);
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotFoundException.java
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.BadUserRequestException;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* <p>This exception is thrown, if an entity (case execution, case definition) is not found.</p>
|
| 23 |
+
*
|
| 24 |
+
* @author Roman Smirnov
|
| 25 |
+
*
|
| 26 |
+
*/
|
| 27 |
+
public class NotFoundException extends BadUserRequestException {
|
| 28 |
+
|
| 29 |
+
private static final long serialVersionUID = 1L;
|
| 30 |
+
|
| 31 |
+
public NotFoundException() {
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
public NotFoundException(String message, Throwable cause) {
|
| 35 |
+
super(message, cause);
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
public NotFoundException(String message) {
|
| 39 |
+
super(message);
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
public NotFoundException(Throwable cause) {
|
| 43 |
+
super(cause);
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NotValidException.java
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.BadUserRequestException;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* <p>This exception is thrown, if a given value is not valid.</p>
|
| 23 |
+
*
|
| 24 |
+
* @author Roman Smirnov
|
| 25 |
+
*
|
| 26 |
+
*/
|
| 27 |
+
public class NotValidException extends BadUserRequestException {
|
| 28 |
+
|
| 29 |
+
private static final long serialVersionUID = 1L;
|
| 30 |
+
|
| 31 |
+
public NotValidException() {
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
public NotValidException(String message, Throwable cause) {
|
| 35 |
+
super(message, cause);
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
public NotValidException(String message) {
|
| 39 |
+
super(message);
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
public NotValidException(Throwable cause) {
|
| 43 |
+
super(cause);
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/NullValueException.java
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.ProcessEngineException;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* @author Roman Smirnov
|
| 23 |
+
*
|
| 24 |
+
*/
|
| 25 |
+
public class NullValueException extends ProcessEngineException {
|
| 26 |
+
|
| 27 |
+
private static final long serialVersionUID = 1L;
|
| 28 |
+
|
| 29 |
+
public NullValueException() {
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
public NullValueException(String message, Throwable cause) {
|
| 33 |
+
super(message, cause);
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
public NullValueException(String message) {
|
| 37 |
+
super(message);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
public NullValueException(Throwable cause) {
|
| 41 |
+
super(cause);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseDefinitionNotFoundException.java
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception.cmmn;
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
/**
|
| 21 |
+
* <p>This is exception is thrown when a specific case definition is not found.</p>
|
| 22 |
+
*
|
| 23 |
+
* @author Roman Smirnov
|
| 24 |
+
*
|
| 25 |
+
*/
|
| 26 |
+
public class CaseDefinitionNotFoundException extends CaseException {
|
| 27 |
+
|
| 28 |
+
private static final long serialVersionUID = 1L;
|
| 29 |
+
|
| 30 |
+
public CaseDefinitionNotFoundException() {
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
public CaseDefinitionNotFoundException(String message, Throwable cause) {
|
| 34 |
+
super(message, cause);
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
public CaseDefinitionNotFoundException(String message) {
|
| 38 |
+
super(message);
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
public CaseDefinitionNotFoundException(Throwable cause) {
|
| 42 |
+
super(cause);
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseException.java
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception.cmmn;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.ProcessEngineException;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* <p>This is exception is thrown when something happens in the execution
|
| 23 |
+
* of a case instance.</p>
|
| 24 |
+
*
|
| 25 |
+
* @author Roman Smirnov
|
| 26 |
+
*
|
| 27 |
+
*/
|
| 28 |
+
public class CaseException extends ProcessEngineException {
|
| 29 |
+
|
| 30 |
+
private static final long serialVersionUID = 1L;
|
| 31 |
+
|
| 32 |
+
public CaseException() {
|
| 33 |
+
super();
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
public CaseException(String message, Throwable cause) {
|
| 37 |
+
super(message, cause);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
public CaseException(String message) {
|
| 41 |
+
super(message);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
public CaseException(Throwable cause) {
|
| 45 |
+
super(cause);
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseExecutionNotFoundException.java
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception.cmmn;
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
/**
|
| 21 |
+
* <p>This is exception is thrown when a specific case execution is not found.</p>
|
| 22 |
+
*
|
| 23 |
+
* @author Roman Smirnov
|
| 24 |
+
*
|
| 25 |
+
*/
|
| 26 |
+
public class CaseExecutionNotFoundException extends CaseException {
|
| 27 |
+
|
| 28 |
+
private static final long serialVersionUID = 1L;
|
| 29 |
+
|
| 30 |
+
public CaseExecutionNotFoundException() {
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
public CaseExecutionNotFoundException(String message, Throwable cause) {
|
| 34 |
+
super(message, cause);
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
public CaseExecutionNotFoundException(String message) {
|
| 38 |
+
super(message);
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
public CaseExecutionNotFoundException(Throwable cause) {
|
| 42 |
+
super(cause);
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CaseIllegalStateTransitionException.java
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception.cmmn;
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
/**
|
| 21 |
+
* <p>This is exception is thrown when a state transition on a case execution
|
| 22 |
+
* is not possible. For example: an 'enabled' case execution cannot be completed.</p>
|
| 23 |
+
*
|
| 24 |
+
* @author Roman Smirnov
|
| 25 |
+
*
|
| 26 |
+
*/
|
| 27 |
+
public class CaseIllegalStateTransitionException extends CaseException {
|
| 28 |
+
|
| 29 |
+
private static final long serialVersionUID = 1L;
|
| 30 |
+
|
| 31 |
+
public CaseIllegalStateTransitionException() {
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
public CaseIllegalStateTransitionException(String message, Throwable cause) {
|
| 35 |
+
super(message, cause);
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
public CaseIllegalStateTransitionException(String message) {
|
| 39 |
+
super(message);
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
public CaseIllegalStateTransitionException(Throwable cause) {
|
| 43 |
+
super(cause);
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/cmmn/CmmnModelInstanceNotFoundException.java
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception.cmmn;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.model.cmmn.CmmnModelInstance;
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
/**
|
| 23 |
+
* <p>This is exception is thrown when a {@link CmmnModelInstance} is not found.</p>
|
| 24 |
+
*
|
| 25 |
+
* @author Roman Smirnov
|
| 26 |
+
*
|
| 27 |
+
*/
|
| 28 |
+
public class CmmnModelInstanceNotFoundException extends CaseException {
|
| 29 |
+
|
| 30 |
+
private static final long serialVersionUID = 1L;
|
| 31 |
+
|
| 32 |
+
public CmmnModelInstanceNotFoundException() {
|
| 33 |
+
super();
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
public CmmnModelInstanceNotFoundException(String message, Throwable cause) {
|
| 37 |
+
super(message, cause);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
public CmmnModelInstanceNotFoundException(String message) {
|
| 41 |
+
super(message);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
public CmmnModelInstanceNotFoundException(Throwable cause) {
|
| 45 |
+
super(cause);
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DecisionDefinitionNotFoundException.java
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception.dmn;
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
/**
|
| 21 |
+
* <p>This exception is thrown when a specific decision definition is not found.</p>
|
| 22 |
+
*/
|
| 23 |
+
public class DecisionDefinitionNotFoundException extends DecisionException {
|
| 24 |
+
|
| 25 |
+
private static final long serialVersionUID = 1L;
|
| 26 |
+
|
| 27 |
+
public DecisionDefinitionNotFoundException() {
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
public DecisionDefinitionNotFoundException(String message, Throwable cause) {
|
| 31 |
+
super(message, cause);
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
public DecisionDefinitionNotFoundException(String message) {
|
| 35 |
+
super(message);
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
public DecisionDefinitionNotFoundException(Throwable cause) {
|
| 39 |
+
super(cause);
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DecisionException.java
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception.dmn;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.ProcessEngineException;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* <p>This exception is thrown when something happens related to a decision.</p>
|
| 23 |
+
*/
|
| 24 |
+
public class DecisionException extends ProcessEngineException {
|
| 25 |
+
|
| 26 |
+
private static final long serialVersionUID = 1L;
|
| 27 |
+
|
| 28 |
+
public DecisionException() {
|
| 29 |
+
super();
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
public DecisionException(String message, Throwable cause) {
|
| 33 |
+
super(message, cause);
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
public DecisionException(String message) {
|
| 37 |
+
super(message);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
public DecisionException(Throwable cause) {
|
| 41 |
+
super(cause);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/exception/dmn/DmnModelInstanceNotFoundException.java
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.exception.dmn;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.model.dmn.DmnModelInstance;
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
/**
|
| 23 |
+
* <p>This exception is thrown when a {@link DmnModelInstance} is not found.</p>
|
| 24 |
+
*/
|
| 25 |
+
public class DmnModelInstanceNotFoundException extends DecisionException {
|
| 26 |
+
|
| 27 |
+
private static final long serialVersionUID = 1L;
|
| 28 |
+
|
| 29 |
+
public DmnModelInstanceNotFoundException() {
|
| 30 |
+
super();
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
public DmnModelInstanceNotFoundException(String message, Throwable cause) {
|
| 34 |
+
super(message, cause);
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
public DmnModelInstanceNotFoundException(String message) {
|
| 38 |
+
super(message);
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
public DmnModelInstanceNotFoundException(Throwable cause) {
|
| 42 |
+
super(cause);
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTask.java
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.externaltask;
|
| 18 |
+
|
| 19 |
+
import java.util.Date;
|
| 20 |
+
import java.util.Map;
|
| 21 |
+
|
| 22 |
+
import org.camunda.bpm.engine.ExternalTaskService;
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* Represents an instance of an external task that is created when
|
| 26 |
+
* a service-task like activity (i.e. service task, send task, ...) with
|
| 27 |
+
* attribute <code>camunda:type="external"</code> is executed.
|
| 28 |
+
*
|
| 29 |
+
* @author Thorben Lindhauer
|
| 30 |
+
*/
|
| 31 |
+
public interface ExternalTask {
|
| 32 |
+
|
| 33 |
+
/**
|
| 34 |
+
* @return the id of the task
|
| 35 |
+
*/
|
| 36 |
+
String getId();
|
| 37 |
+
|
| 38 |
+
/**
|
| 39 |
+
* @return the name of the topic the task belongs to
|
| 40 |
+
*/
|
| 41 |
+
String getTopicName();
|
| 42 |
+
|
| 43 |
+
/**
|
| 44 |
+
* @return the id of the worker that has locked the task
|
| 45 |
+
*/
|
| 46 |
+
String getWorkerId();
|
| 47 |
+
|
| 48 |
+
/**
|
| 49 |
+
* @return the absolute time at which the lock expires
|
| 50 |
+
*/
|
| 51 |
+
Date getLockExpirationTime();
|
| 52 |
+
|
| 53 |
+
/**
|
| 54 |
+
* @return the absolute time at which the task was created
|
| 55 |
+
* @return
|
| 56 |
+
*/
|
| 57 |
+
Date getCreateTime();
|
| 58 |
+
|
| 59 |
+
/**
|
| 60 |
+
* @return the id of the process instance the task exists in
|
| 61 |
+
*/
|
| 62 |
+
String getProcessInstanceId();
|
| 63 |
+
|
| 64 |
+
/**
|
| 65 |
+
* @return the id of the execution that the task is assigned to
|
| 66 |
+
*/
|
| 67 |
+
String getExecutionId();
|
| 68 |
+
|
| 69 |
+
/**
|
| 70 |
+
* @return the id of the activity for which the task is created
|
| 71 |
+
*/
|
| 72 |
+
String getActivityId();
|
| 73 |
+
|
| 74 |
+
/**
|
| 75 |
+
* @return the id of the activity instance in which context the task exists
|
| 76 |
+
*/
|
| 77 |
+
String getActivityInstanceId();
|
| 78 |
+
|
| 79 |
+
/**
|
| 80 |
+
* @return the id of the process definition the tasks activity belongs to
|
| 81 |
+
*/
|
| 82 |
+
String getProcessDefinitionId();
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* @return the key of the process definition the tasks activity belongs to
|
| 86 |
+
*/
|
| 87 |
+
String getProcessDefinitionKey();
|
| 88 |
+
|
| 89 |
+
/**
|
| 90 |
+
* @return the version tag of the process definition the tasks activity belongs to
|
| 91 |
+
*/
|
| 92 |
+
String getProcessDefinitionVersionTag();
|
| 93 |
+
|
| 94 |
+
/**
|
| 95 |
+
* @return the number of retries left. The number of retries is provided by
|
| 96 |
+
* a task client, therefore the initial value is <code>null</code>.
|
| 97 |
+
*/
|
| 98 |
+
Integer getRetries();
|
| 99 |
+
|
| 100 |
+
/**
|
| 101 |
+
* @return short error message submitted with the latest reported failure executing this task;
|
| 102 |
+
* <code>null</code> if no failure was reported previously or if no error message
|
| 103 |
+
* was submitted
|
| 104 |
+
*
|
| 105 |
+
* @see ExternalTaskService#handleFailure(String, String,String, String, int, long)
|
| 106 |
+
*
|
| 107 |
+
* To get the full error details,
|
| 108 |
+
* use {@link ExternalTaskService#getExternalTaskErrorDetails(String)}
|
| 109 |
+
*/
|
| 110 |
+
String getErrorMessage();
|
| 111 |
+
|
| 112 |
+
/**
|
| 113 |
+
* @return true if the external task is suspended; a suspended external task
|
| 114 |
+
* cannot be completed, thereby preventing process continuation
|
| 115 |
+
*/
|
| 116 |
+
boolean isSuspended();
|
| 117 |
+
|
| 118 |
+
/**
|
| 119 |
+
* @return the id of the tenant the task belongs to. Can be <code>null</code>
|
| 120 |
+
* if the task belongs to no single tenant.
|
| 121 |
+
*/
|
| 122 |
+
String getTenantId();
|
| 123 |
+
|
| 124 |
+
/**
|
| 125 |
+
* Returns the priority of the external task.
|
| 126 |
+
*
|
| 127 |
+
* @return the priority of the external task
|
| 128 |
+
*/
|
| 129 |
+
long getPriority();
|
| 130 |
+
|
| 131 |
+
/**
|
| 132 |
+
* Returns a map containing all custom extension properties of the external task.
|
| 133 |
+
*
|
| 134 |
+
* @return the properties, never <code>null</code>
|
| 135 |
+
*/
|
| 136 |
+
Map<String, String> getExtensionProperties();
|
| 137 |
+
|
| 138 |
+
/**
|
| 139 |
+
* Returns the business key of the process instance the external task belongs to
|
| 140 |
+
*
|
| 141 |
+
* @return the business key
|
| 142 |
+
*/
|
| 143 |
+
String getBusinessKey();
|
| 144 |
+
|
| 145 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTaskQuery.java
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.externaltask;
|
| 18 |
+
|
| 19 |
+
import org.camunda.bpm.engine.query.Query;
|
| 20 |
+
|
| 21 |
+
import java.io.Serializable;
|
| 22 |
+
import java.util.Date;
|
| 23 |
+
import java.util.Set;
|
| 24 |
+
|
| 25 |
+
/**
|
| 26 |
+
* @author Thorben Lindhauer
|
| 27 |
+
* @author Christopher Zell
|
| 28 |
+
*/
|
| 29 |
+
public interface ExternalTaskQuery extends Query<ExternalTaskQuery, ExternalTask> {
|
| 30 |
+
|
| 31 |
+
/**
|
| 32 |
+
* Only select the external task with the given id
|
| 33 |
+
*/
|
| 34 |
+
ExternalTaskQuery externalTaskId(String externalTaskId);
|
| 35 |
+
|
| 36 |
+
/**
|
| 37 |
+
* Only select external tasks with any of the given ids
|
| 38 |
+
*/
|
| 39 |
+
ExternalTaskQuery externalTaskIdIn(Set<String> externalTaskIds);
|
| 40 |
+
|
| 41 |
+
/**
|
| 42 |
+
* Only select external tasks that was most recently locked by the given worker
|
| 43 |
+
*/
|
| 44 |
+
ExternalTaskQuery workerId(String workerId);
|
| 45 |
+
|
| 46 |
+
/**
|
| 47 |
+
* Only select external tasks that have a lock expiring before the given date
|
| 48 |
+
*/
|
| 49 |
+
ExternalTaskQuery lockExpirationBefore(Date lockExpirationDate);
|
| 50 |
+
|
| 51 |
+
/**
|
| 52 |
+
* Only select external tasks that have a lock expiring after the given date
|
| 53 |
+
*/
|
| 54 |
+
ExternalTaskQuery lockExpirationAfter(Date lockExpirationDate);
|
| 55 |
+
|
| 56 |
+
/**
|
| 57 |
+
* Only select external tasks of the given topic
|
| 58 |
+
*/
|
| 59 |
+
ExternalTaskQuery topicName(String topicName);
|
| 60 |
+
|
| 61 |
+
/**
|
| 62 |
+
* Only select external tasks that are currently locked, i.e. that have a lock expiration
|
| 63 |
+
* time that is in the future
|
| 64 |
+
*/
|
| 65 |
+
ExternalTaskQuery locked();
|
| 66 |
+
|
| 67 |
+
/**
|
| 68 |
+
* Only select external tasks that are not currently locked, i.e. that have no
|
| 69 |
+
* lock expiration time or one that is overdue
|
| 70 |
+
*/
|
| 71 |
+
ExternalTaskQuery notLocked();
|
| 72 |
+
|
| 73 |
+
/**
|
| 74 |
+
* Only select external tasks created in the context of the given execution
|
| 75 |
+
*/
|
| 76 |
+
ExternalTaskQuery executionId(String executionId);
|
| 77 |
+
|
| 78 |
+
/**
|
| 79 |
+
* Only select external tasks created in the context of the given process instance
|
| 80 |
+
*/
|
| 81 |
+
ExternalTaskQuery processInstanceId(String processInstanceId);
|
| 82 |
+
|
| 83 |
+
/**
|
| 84 |
+
* Only select external tasks created in the context of the given process instances
|
| 85 |
+
*/
|
| 86 |
+
ExternalTaskQuery processInstanceIdIn(String... processInstanceIdIn);
|
| 87 |
+
|
| 88 |
+
/**
|
| 89 |
+
* Only select tasks which are part of a process instance which has the given
|
| 90 |
+
* process definition key.
|
| 91 |
+
*/
|
| 92 |
+
ExternalTaskQuery processDefinitionKey(String processDefinitionKey);
|
| 93 |
+
|
| 94 |
+
/**
|
| 95 |
+
* Only select tasks which are part of a process instance which has one of the
|
| 96 |
+
* given process definition keys.
|
| 97 |
+
*/
|
| 98 |
+
ExternalTaskQuery processDefinitionKeyIn(String... processDefinitionKeys);
|
| 99 |
+
|
| 100 |
+
/**
|
| 101 |
+
* Only select external tasks that belong to an instance of the given process definition
|
| 102 |
+
*/
|
| 103 |
+
ExternalTaskQuery processDefinitionId(String processDefinitionId);
|
| 104 |
+
|
| 105 |
+
/**
|
| 106 |
+
* Only select tasks which are part of a process instance which has the given
|
| 107 |
+
* process definition name.
|
| 108 |
+
*/
|
| 109 |
+
ExternalTaskQuery processDefinitionName(String processDefinitionName);
|
| 110 |
+
|
| 111 |
+
/**
|
| 112 |
+
* Only select tasks which are part of a process instance which process definition
|
| 113 |
+
* name is like the given parameter.
|
| 114 |
+
* The syntax is that of SQL: for example usage: nameLike(%processDefinitionName%)
|
| 115 |
+
*/
|
| 116 |
+
ExternalTaskQuery processDefinitionNameLike(String processDefinitionName);
|
| 117 |
+
|
| 118 |
+
/**
|
| 119 |
+
* Only select external tasks that belong to an instance of the given activity
|
| 120 |
+
*/
|
| 121 |
+
ExternalTaskQuery activityId(String activityId);
|
| 122 |
+
|
| 123 |
+
/**
|
| 124 |
+
* Only select external tasks that belong to an instances of the given activities.
|
| 125 |
+
*/
|
| 126 |
+
ExternalTaskQuery activityIdIn(String... activityIdIn);
|
| 127 |
+
|
| 128 |
+
/**
|
| 129 |
+
* Only select external tasks with a priority that is higher than or equal to the given priority.
|
| 130 |
+
*
|
| 131 |
+
* @since 7.5
|
| 132 |
+
* @param priority the priority which is used for the query
|
| 133 |
+
* @return the builded external task query
|
| 134 |
+
*/
|
| 135 |
+
ExternalTaskQuery priorityHigherThanOrEquals(long priority);
|
| 136 |
+
|
| 137 |
+
/**
|
| 138 |
+
* Only select external tasks with a priority that is lower than or equal to the given priority.
|
| 139 |
+
*
|
| 140 |
+
* @since 7.5
|
| 141 |
+
* @param priority the priority which is used for the query
|
| 142 |
+
* @return the builded external task query
|
| 143 |
+
*/
|
| 144 |
+
ExternalTaskQuery priorityLowerThanOrEquals(long priority);
|
| 145 |
+
|
| 146 |
+
/**
|
| 147 |
+
* Only select tasks which have are part of a process that have a variable
|
| 148 |
+
* with the given name set to the given value.
|
| 149 |
+
*/
|
| 150 |
+
ExternalTaskQuery processVariableValueEquals(String variableName, Object variableValue);
|
| 151 |
+
|
| 152 |
+
/**
|
| 153 |
+
* Only select tasks which have a variable with the given name, but
|
| 154 |
+
* with a different value than the passed value.
|
| 155 |
+
* Byte-arrays and {@link Serializable} objects (which are not primitive type wrappers)
|
| 156 |
+
* are not supported.
|
| 157 |
+
*/
|
| 158 |
+
ExternalTaskQuery processVariableValueNotEquals(String variableName, Object variableValue);
|
| 159 |
+
|
| 160 |
+
/**
|
| 161 |
+
* Only select tasks which are part of a process that have a variable
|
| 162 |
+
* with the given name and matching the given value.
|
| 163 |
+
* The syntax is that of SQL: for example usage: valueLike(%value%)
|
| 164 |
+
*/
|
| 165 |
+
ExternalTaskQuery processVariableValueLike(String variableName, String variableValue);
|
| 166 |
+
|
| 167 |
+
/**
|
| 168 |
+
* Only select tasks which are part of a process that have a variable
|
| 169 |
+
* with the given name and not matching the given value.
|
| 170 |
+
* The syntax is that of SQL: for example usage: valueNotLike(%value%)
|
| 171 |
+
*/
|
| 172 |
+
ExternalTaskQuery processVariableValueNotLike(String variableName, String variableValue);
|
| 173 |
+
|
| 174 |
+
/**
|
| 175 |
+
* Only select tasks which are part of a process that have a variable
|
| 176 |
+
* with the given name and a value greater than the given one.
|
| 177 |
+
*/
|
| 178 |
+
ExternalTaskQuery processVariableValueGreaterThan(String variableName, Object variableValue);
|
| 179 |
+
|
| 180 |
+
/**
|
| 181 |
+
* Only select tasks which are part of a process that have a variable
|
| 182 |
+
* with the given name and a value greater than or equal to the given one.
|
| 183 |
+
*/
|
| 184 |
+
ExternalTaskQuery processVariableValueGreaterThanOrEquals(String variableName, Object variableValue);
|
| 185 |
+
|
| 186 |
+
/**
|
| 187 |
+
* Only select tasks which are part of a process that have a variable
|
| 188 |
+
* with the given name and a value less than the given one.
|
| 189 |
+
*/
|
| 190 |
+
ExternalTaskQuery processVariableValueLessThan(String variableName, Object variableValue);
|
| 191 |
+
|
| 192 |
+
/**
|
| 193 |
+
* Only select tasks which are part of a process that have a variable
|
| 194 |
+
* with the given name and a value greater than or equal to the given one.
|
| 195 |
+
*/
|
| 196 |
+
ExternalTaskQuery processVariableValueLessThanOrEquals(String variableName, Object variableValue);
|
| 197 |
+
|
| 198 |
+
/**
|
| 199 |
+
* All queries for task-, process- and case-variables will match the variable names in a case-insensitive way.
|
| 200 |
+
*/
|
| 201 |
+
ExternalTaskQuery matchVariableNamesIgnoreCase();
|
| 202 |
+
|
| 203 |
+
/**
|
| 204 |
+
* All queries for task-, process- and case-variables will match the variable values in a case-insensitive way.
|
| 205 |
+
*/
|
| 206 |
+
ExternalTaskQuery matchVariableValuesIgnoreCase();
|
| 207 |
+
|
| 208 |
+
/**
|
| 209 |
+
* Only select external tasks that are currently suspended
|
| 210 |
+
*/
|
| 211 |
+
ExternalTaskQuery suspended();
|
| 212 |
+
|
| 213 |
+
/**
|
| 214 |
+
* Only select external tasks that are currently not suspended
|
| 215 |
+
*/
|
| 216 |
+
ExternalTaskQuery active();
|
| 217 |
+
|
| 218 |
+
/**
|
| 219 |
+
* Only select external tasks that have retries > 0
|
| 220 |
+
*/
|
| 221 |
+
ExternalTaskQuery withRetriesLeft();
|
| 222 |
+
|
| 223 |
+
/**
|
| 224 |
+
* Only select external tasks that have retries = 0
|
| 225 |
+
*/
|
| 226 |
+
ExternalTaskQuery noRetriesLeft();
|
| 227 |
+
|
| 228 |
+
/** Only select external tasks that belong to one of the given tenant ids. */
|
| 229 |
+
ExternalTaskQuery tenantIdIn(String... tenantIds);
|
| 230 |
+
|
| 231 |
+
/**
|
| 232 |
+
* Order by external task id (needs to be followed by {@link #asc()} or {@link #desc()}).
|
| 233 |
+
*/
|
| 234 |
+
ExternalTaskQuery orderById();
|
| 235 |
+
|
| 236 |
+
/**
|
| 237 |
+
* Order by lock expiration time (needs to be followed by {@link #asc()} or {@link #desc()}).
|
| 238 |
+
* Ordering of tasks with no lock expiration time is database-dependent.
|
| 239 |
+
*/
|
| 240 |
+
ExternalTaskQuery orderByLockExpirationTime();
|
| 241 |
+
|
| 242 |
+
/**
|
| 243 |
+
* Order by process instance id (needs to be followed by {@link #asc()} or {@link #desc()}).
|
| 244 |
+
*/
|
| 245 |
+
ExternalTaskQuery orderByProcessInstanceId();
|
| 246 |
+
|
| 247 |
+
/**
|
| 248 |
+
* Order by process definition id (needs to be followed by {@link #asc()} or {@link #desc()}).
|
| 249 |
+
*/
|
| 250 |
+
ExternalTaskQuery orderByProcessDefinitionId();
|
| 251 |
+
|
| 252 |
+
/**
|
| 253 |
+
* Order by process definition key (needs to be followed by {@link #asc()} or {@link #desc()}).
|
| 254 |
+
*/
|
| 255 |
+
ExternalTaskQuery orderByProcessDefinitionKey();
|
| 256 |
+
|
| 257 |
+
/**
|
| 258 |
+
* Order by tenant id (needs to be followed by {@link #asc()} or {@link #desc()}).
|
| 259 |
+
* Note that the ordering of external tasks without tenant id is database-specific.
|
| 260 |
+
*/
|
| 261 |
+
ExternalTaskQuery orderByTenantId();
|
| 262 |
+
|
| 263 |
+
/**
|
| 264 |
+
* Order by priority (needs to be followed by {@link #asc()} or {@link #desc()}).
|
| 265 |
+
* @since 7.5
|
| 266 |
+
*/
|
| 267 |
+
ExternalTaskQuery orderByPriority();
|
| 268 |
+
|
| 269 |
+
/**
|
| 270 |
+
* Order by create time (needs to be followed by {@link #asc()} or {@link #desc()}).
|
| 271 |
+
*/
|
| 272 |
+
ExternalTaskQuery orderByCreateTime();
|
| 273 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTaskQueryBuilder.java
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.externaltask;
|
| 18 |
+
|
| 19 |
+
import java.util.List;
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* @author Thorben Lindhauer
|
| 23 |
+
*
|
| 24 |
+
*/
|
| 25 |
+
public interface ExternalTaskQueryBuilder {
|
| 26 |
+
|
| 27 |
+
/**
|
| 28 |
+
* Specifies that tasks of a topic should be fetched and locked for
|
| 29 |
+
* a certain amount of time
|
| 30 |
+
*
|
| 31 |
+
* @param topicName the name of the topic
|
| 32 |
+
* @param lockDuration the duration in milliseconds for which tasks should be locked;
|
| 33 |
+
* begins at the time of fetching
|
| 34 |
+
* @return
|
| 35 |
+
*/
|
| 36 |
+
public ExternalTaskQueryTopicBuilder topic(String topicName, long lockDuration);
|
| 37 |
+
|
| 38 |
+
/**
|
| 39 |
+
* Performs the fetching. Locks candidate tasks of the given topics
|
| 40 |
+
* for the specified duration.
|
| 41 |
+
*
|
| 42 |
+
* @return fetched external tasks that match the topic and that can be
|
| 43 |
+
* successfully locked
|
| 44 |
+
*/
|
| 45 |
+
List<LockedExternalTask> execute();
|
| 46 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTaskQueryTopicBuilder.java
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.externaltask;
|
| 18 |
+
|
| 19 |
+
import java.util.List;
|
| 20 |
+
import java.util.Map;
|
| 21 |
+
|
| 22 |
+
/**
|
| 23 |
+
* @author Thorben Lindhauer
|
| 24 |
+
*
|
| 25 |
+
*/
|
| 26 |
+
public interface ExternalTaskQueryTopicBuilder extends ExternalTaskQueryBuilder {
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Define variables to fetch with all tasks for the current topic. Calling
|
| 30 |
+
* this method multiple times overrides the previously specified variables.
|
| 31 |
+
*
|
| 32 |
+
* @param variables the variable names to fetch, if null all variables will be fetched
|
| 33 |
+
* @return this builder
|
| 34 |
+
*/
|
| 35 |
+
public ExternalTaskQueryTopicBuilder variables(String... variables);
|
| 36 |
+
|
| 37 |
+
/**
|
| 38 |
+
* Define variables to fetch with all tasks for the current topic. Calling
|
| 39 |
+
* this method multiple times overrides the previously specified variables.
|
| 40 |
+
*
|
| 41 |
+
* @param variables the variable names to fetch, if null all variables will be fetched
|
| 42 |
+
* @return this builder
|
| 43 |
+
*/
|
| 44 |
+
public ExternalTaskQueryTopicBuilder variables(List<String> variables);
|
| 45 |
+
|
| 46 |
+
/**
|
| 47 |
+
* Define a HashMap of variables and their values to filter correlated tasks.
|
| 48 |
+
* Calling this method multiple times overrides the previously specified variables.
|
| 49 |
+
*
|
| 50 |
+
* @param variables a HashMap of the variable names (keys) and the values to filter by
|
| 51 |
+
* @return this builder
|
| 52 |
+
*/
|
| 53 |
+
public ExternalTaskQueryTopicBuilder processInstanceVariableEquals(Map<String, Object> variables);
|
| 54 |
+
|
| 55 |
+
/**
|
| 56 |
+
* Define a single variable and its name to filter tasks in a topic. Multiple calls to
|
| 57 |
+
* this method add to the existing "variable filters".
|
| 58 |
+
*
|
| 59 |
+
* @param name the name of the variable you want to fetch and query by
|
| 60 |
+
* @param value the value of the variable which you want to filter
|
| 61 |
+
* @return this builder
|
| 62 |
+
*/
|
| 63 |
+
public ExternalTaskQueryTopicBuilder processInstanceVariableEquals(String name, Object value);
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Define business key value to filter external tasks by (Process Instance) Business Key.
|
| 67 |
+
*
|
| 68 |
+
* @param businessKey the value of the Business Key to filter by
|
| 69 |
+
* @return this builder
|
| 70 |
+
*/
|
| 71 |
+
public ExternalTaskQueryTopicBuilder businessKey(String businessKey);
|
| 72 |
+
|
| 73 |
+
/**
|
| 74 |
+
* Define process definition id to filter external tasks by.
|
| 75 |
+
*
|
| 76 |
+
* @param processDefinitionId the definition id to filter by
|
| 77 |
+
* @return this builder
|
| 78 |
+
*/
|
| 79 |
+
public ExternalTaskQueryTopicBuilder processDefinitionId(String processDefinitionId);
|
| 80 |
+
|
| 81 |
+
/**
|
| 82 |
+
* Define process definition ids to filter external tasksb by.
|
| 83 |
+
*
|
| 84 |
+
* @param processDefinitionIds the definition ids to filter by
|
| 85 |
+
* @return this builder
|
| 86 |
+
*/
|
| 87 |
+
public ExternalTaskQueryTopicBuilder processDefinitionIdIn(String... processDefinitionIds);
|
| 88 |
+
|
| 89 |
+
/**
|
| 90 |
+
* Define process definition key to filter external tasks by.
|
| 91 |
+
*
|
| 92 |
+
* @param processDefinitionKey the definition key to filter by
|
| 93 |
+
* @return this builder
|
| 94 |
+
*/
|
| 95 |
+
public ExternalTaskQueryTopicBuilder processDefinitionKey(String processDefinitionKey);
|
| 96 |
+
|
| 97 |
+
/**
|
| 98 |
+
* Define process definition keys to filter external tasks by.
|
| 99 |
+
*
|
| 100 |
+
* @param processDefinitionKey the definition keys to filter by
|
| 101 |
+
* @return this builder
|
| 102 |
+
*/
|
| 103 |
+
public ExternalTaskQueryTopicBuilder processDefinitionKeyIn(String... processDefinitionKeys);
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
/**
|
| 107 |
+
* Define a process definition version tag to filter external tasks by.
|
| 108 |
+
*
|
| 109 |
+
* @param versionTag the version tag to filter by
|
| 110 |
+
* @return this builder
|
| 111 |
+
*/
|
| 112 |
+
public ExternalTaskQueryTopicBuilder processDefinitionVersionTag(String versionTag);
|
| 113 |
+
|
| 114 |
+
/**
|
| 115 |
+
* Filter external tasks only with null tenant id.
|
| 116 |
+
*
|
| 117 |
+
* @return this builder
|
| 118 |
+
*/
|
| 119 |
+
public ExternalTaskQueryTopicBuilder withoutTenantId();
|
| 120 |
+
|
| 121 |
+
/**
|
| 122 |
+
* Define tenant ids to filter external tasks by.
|
| 123 |
+
*
|
| 124 |
+
* @param tenantIds the tenant ids to filter by
|
| 125 |
+
* @return this builder
|
| 126 |
+
*/
|
| 127 |
+
public ExternalTaskQueryTopicBuilder tenantIdIn(String... tenantIds);
|
| 128 |
+
|
| 129 |
+
/**
|
| 130 |
+
* Enable deserialization of variable values that are custom objects. By default, the query
|
| 131 |
+
* will not attempt to deserialize the value of these variables.
|
| 132 |
+
*
|
| 133 |
+
* @return this builder
|
| 134 |
+
*/
|
| 135 |
+
public ExternalTaskQueryTopicBuilder enableCustomObjectDeserialization();
|
| 136 |
+
|
| 137 |
+
/**
|
| 138 |
+
* Define whether only local variables will be fetched with all tasks for the current topic.
|
| 139 |
+
*
|
| 140 |
+
* @return this builder
|
| 141 |
+
*/
|
| 142 |
+
public ExternalTaskQueryTopicBuilder localVariables();
|
| 143 |
+
|
| 144 |
+
/**
|
| 145 |
+
* Configure the query to include custom extension properties, if available, for all fetched tasks.
|
| 146 |
+
*
|
| 147 |
+
* @return this builder
|
| 148 |
+
*/
|
| 149 |
+
public ExternalTaskQueryTopicBuilder includeExtensionProperties();
|
| 150 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-ee4826e5e76c/engine/src/main/java/org/camunda/bpm/engine/externaltask/FetchAndLockBuilder.java
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.engine.externaltask;
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* Fetch And Lock Builder used to enable a Fluent API that exposes all parameters for fetch and Lock operation.
|
| 21 |
+
*/
|
| 22 |
+
public interface FetchAndLockBuilder {
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* Configures the workerId that will be used during the Fetch and Lock operation.
|
| 26 |
+
*
|
| 27 |
+
* @param workerId the given workerId
|
| 28 |
+
* @return the builder
|
| 29 |
+
*/
|
| 30 |
+
FetchAndLockBuilder workerId(String workerId);
|
| 31 |
+
|
| 32 |
+
/**
|
| 33 |
+
* Configures the max tasks fetching that will be used during the Fetch and Lock operation.
|
| 34 |
+
*
|
| 35 |
+
* @param maxTasks the given number of max tasks
|
| 36 |
+
* @return the builder
|
| 37 |
+
*/
|
| 38 |
+
FetchAndLockBuilder maxTasks(int maxTasks);
|
| 39 |
+
|
| 40 |
+
/**
|
| 41 |
+
* Configures fetching to consider (or not) priority during the Fetch and Lock operation.
|
| 42 |
+
*
|
| 43 |
+
* @param usePriority the given usePriority flag. If true, tasks will be fetched in descending order.
|
| 44 |
+
* @return the builder
|
| 45 |
+
*/
|
| 46 |
+
FetchAndLockBuilder usePriority(boolean usePriority);
|
| 47 |
+
|
| 48 |
+
/**
|
| 49 |
+
* Configures the fetching during the Fetch and Lock Operation to include ordering by create time of the external tasks.
|
| 50 |
+
* This method can be combined by calling asc() or desc() afterwards to define an ascending or descending order respectively.
|
| 51 |
+
*
|
| 52 |
+
* @return the builder
|
| 53 |
+
*/
|
| 54 |
+
FetchAndLockBuilder orderByCreateTime();
|
| 55 |
+
|
| 56 |
+
/**
|
| 57 |
+
* Configures the order to be ascending.
|
| 58 |
+
*
|
| 59 |
+
* @return the builder
|
| 60 |
+
*/
|
| 61 |
+
FetchAndLockBuilder asc();
|
| 62 |
+
|
| 63 |
+
/**
|
| 64 |
+
* Configures the order to be descending.
|
| 65 |
+
*
|
| 66 |
+
* @return the builder
|
| 67 |
+
*/
|
| 68 |
+
FetchAndLockBuilder desc();
|
| 69 |
+
|
| 70 |
+
/**
|
| 71 |
+
* Returns the {@link ExternalTaskQueryTopicBuilder} to handle all the configuration that applies per topic.
|
| 72 |
+
*
|
| 73 |
+
* @return the builder
|
| 74 |
+
*/
|
| 75 |
+
ExternalTaskQueryTopicBuilder subscribe();
|
| 76 |
+
}
|