code
stringlengths
25
201k
docstring
stringlengths
19
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
51
path
stringlengths
11
314
url
stringlengths
62
377
license
stringclasses
7 values
public static void parseCamundaInputParameters(Element inputOutputElement, IoMapping ioMapping) { List<Element> inputParameters = inputOutputElement.elementsNS(BpmnParse.CAMUNDA_BPMN_EXTENSIONS_NS, "inputParameter"); for (Element inputParameterElement : inputParameters) { parseInputParameterElement(inputParameterElement, ioMapping); } }
Parses all input parameters of an input output element and adds them to the {@link IoMapping}. @param inputOutputElement the input output element to process @param ioMapping the input output mapping to add input parameters to @throws BpmnParseException if a input parameter element is malformed
parseCamundaInputParameters
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParseUtil.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParseUtil.java
Apache-2.0
public static void parseCamundaOutputParameters(Element inputOutputElement, IoMapping ioMapping) { List<Element> outputParameters = inputOutputElement.elementsNS(BpmnParse.CAMUNDA_BPMN_EXTENSIONS_NS, "outputParameter"); for (Element outputParameterElement : outputParameters) { parseOutputParameterElement(outputParameterElement, ioMapping); } }
Parses all output parameters of an input output element and adds them to the {@link IoMapping}. @param inputOutputElement the input output element to process @param ioMapping the input output mapping to add input parameters to @throws BpmnParseException if a output parameter element is malformed
parseCamundaOutputParameters
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParseUtil.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParseUtil.java
Apache-2.0
public static void parseInputParameterElement(Element inputParameterElement, IoMapping ioMapping) { String nameAttribute = inputParameterElement.attribute("name"); if(nameAttribute == null || nameAttribute.isEmpty()) { throw new BpmnParseException("Missing attribute 'name' for inputParameter", inputParameterElement); } ParameterValueProvider valueProvider = parseNestedParamValueProvider(inputParameterElement); // add parameter ioMapping.addInputParameter(new InputParameter(nameAttribute, valueProvider)); }
Parses a input parameter and adds it to the {@link IoMapping}. @param inputParameterElement the input parameter element @param ioMapping the mapping to add the element @throws BpmnParseException if the input parameter element is malformed
parseInputParameterElement
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParseUtil.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParseUtil.java
Apache-2.0
public static void parseOutputParameterElement(Element outputParameterElement, IoMapping ioMapping) { String nameAttribute = outputParameterElement.attribute("name"); if(nameAttribute == null || nameAttribute.isEmpty()) { throw new BpmnParseException("Missing attribute 'name' for outputParameter", outputParameterElement); } ParameterValueProvider valueProvider = parseNestedParamValueProvider(outputParameterElement); // add parameter ioMapping.addOutputParameter(new OutputParameter(nameAttribute, valueProvider)); }
Parses a output parameter and adds it to the {@link IoMapping}. @param outputParameterElement the output parameter element @param ioMapping the mapping to add the element @throws BpmnParseException if the output parameter element is malformed
parseOutputParameterElement
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParseUtil.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParseUtil.java
Apache-2.0
public EventSubscriptionEntity createSubscriptionForExecution(ExecutionEntity execution) { EventSubscriptionEntity eventSubscriptionEntity = new EventSubscriptionEntity(execution, eventType); String eventName = resolveExpressionOfEventName(execution); eventSubscriptionEntity.setEventName(eventName); if (activityId != null) { ActivityImpl activity = execution.getProcessDefinition().findActivity(activityId); eventSubscriptionEntity.setActivity(activity); } eventSubscriptionEntity.insert(); LegacyBehavior.removeLegacySubscriptionOnParent(execution, eventSubscriptionEntity); return eventSubscriptionEntity; }
Creates and inserts a subscription entity depending on the message type of this declaration.
createSubscriptionForExecution
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/EventSubscriptionDeclaration.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/EventSubscriptionDeclaration.java
Apache-2.0
public TimeZone getTimeZone() { if (timeZone == null) { timeZone = TimeZone.getDefault(); } return timeZone; }
Returns the time zone for which this <code>CronExpression</code> will be resolved.
getTimeZone
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/calendar/CronExpression.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/calendar/CronExpression.java
Apache-2.0
@Override public String toString() { return getClass().getSimpleName(); }
<p>Adapter class for implementing process engine plugins</p> @author Daniel Meyer
toString
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/AbstractProcessEnginePlugin.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/AbstractProcessEnginePlugin.java
Apache-2.0
public CompositeProcessEnginePlugin addProcessEnginePlugin(ProcessEnginePlugin plugin, ProcessEnginePlugin... additionalPlugins) { return this.addProcessEnginePlugins(toList(plugin, additionalPlugins)); }
Add one (or more) plugins. @param plugin first plugin @param additionalPlugins additional vararg plugins @return self for fluent usage
addProcessEnginePlugin
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/CompositeProcessEnginePlugin.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/CompositeProcessEnginePlugin.java
Apache-2.0
public boolean isDisableExceptionCode() { return disableExceptionCode; }
@return {@code true} if the exception code feature is disabled and vice-versa.
isDisableExceptionCode
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public void setDisableExceptionCode(boolean disableExceptionCode) { this.disableExceptionCode = disableExceptionCode; }
Setter to disables the {@link ExceptionCodeInterceptor} and therefore the whole exception code feature.
setDisableExceptionCode
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public boolean isDisableBuiltinExceptionCodeProvider() { return disableBuiltinExceptionCodeProvider; }
@return {@code true} if the built-in exception code provider is disabled and vice-versa.
isDisableBuiltinExceptionCodeProvider
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public void setDisableBuiltinExceptionCodeProvider(boolean disableBuiltinExceptionCodeProvider) { this.disableBuiltinExceptionCodeProvider = disableBuiltinExceptionCodeProvider; }
Setter to disables the default implementation of {@link ExceptionCodeProvider} which allows overriding the reserved exception codes > {@link ExceptionCodeInterceptor#MAX_CUSTOM_CODE} or < {@link ExceptionCodeInterceptor#MIN_CUSTOM_CODE}.
setDisableBuiltinExceptionCodeProvider
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public ExceptionCodeProvider getCustomExceptionCodeProvider() { return customExceptionCodeProvider; }
@return a custom implementation of a {@link ExceptionCodeProvider} allowing to provide custom error codes.
getCustomExceptionCodeProvider
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public void setAutoStoreScriptVariables(boolean autoStoreScriptVariables) { this.autoStoreScriptVariables = autoStoreScriptVariables; }
If set to true, the process engine will save all script variables (created from Java Script, Groovy ...) as process variables.
setAutoStoreScriptVariables
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public boolean isAutoStoreScriptVariables() { return autoStoreScriptVariables; }
@return true if the process engine should save all script variables (created from Java Script, Groovy ...) as process variables.
isAutoStoreScriptVariables
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public void setEnableScriptCompilation(boolean enableScriptCompilation) { this.enableScriptCompilation = enableScriptCompilation; }
If set to true, the process engine will attempt to pre-compile script sources at runtime to optimize script task execution performance.
setEnableScriptCompilation
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public void setEnableGracefulDegradationOnContextSwitchFailure(boolean enableGracefulDegradationOnContextSwitchFailure) { this.enableGracefulDegradationOnContextSwitchFailure = enableGracefulDegradationOnContextSwitchFailure; }
<p>If set to true, the process engine will tolerate certain exceptions that may result from the fact that it cannot switch to the context of a process application that has made a deployment.</p> <p> <p>Affects the following scenarios:</p> <ul> <li><b>Determining job priorities</b>: uses a default priority in case an expression fails to evaluate</li> </ul>
setEnableGracefulDegradationOnContextSwitchFailure
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public boolean isDeploymentLockUsed() { return isDeploymentLockUsed; }
@return true if the process engine acquires an exclusive lock when creating a deployment.
isDeploymentLockUsed
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public void setDeploymentLockUsed(boolean isDeploymentLockUsed) { this.isDeploymentLockUsed = isDeploymentLockUsed; }
If set to true, the process engine will acquire an exclusive lock when creating a deployment. This ensures that {@link DeploymentBuilder#enableDuplicateFiltering()} works correctly in a clustered environment.
setDeploymentLockUsed
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public boolean isDeploymentSynchronized() { return isDeploymentSynchronized; }
@return true if deployment processing must be synchronized
isDeploymentSynchronized
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Apache-2.0
public CaseDefinition getCaseDefinition() { return caseDefinition; }
@return the case definition of the case instance which is being started
getCaseDefinition
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderCaseInstanceContext.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderCaseInstanceContext.java
Apache-2.0
public VariableMap getVariables() { return variables; }
@return the variables which were passed to the starting case instance
getVariables
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderCaseInstanceContext.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderCaseInstanceContext.java
Apache-2.0
public DelegateExecution getSuperExecution() { return superExecution; }
@return the super execution. <code>null</code> if the starting case instance is a root process instance and not started using a call activity. If the case instance is started using a call activity, this method returns the execution in the super process instance executing the call activity.
getSuperExecution
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderCaseInstanceContext.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderCaseInstanceContext.java
Apache-2.0
public DelegateCaseExecution getSuperCaseExecution() { return superCaseExecution; }
@return the super case execution. <code>null</code> if the starting case instance is not a sub case instance started using a CMMN case task.
getSuperCaseExecution
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderCaseInstanceContext.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderCaseInstanceContext.java
Apache-2.0
public DecisionDefinition getDecisionDefinition() { return decisionDefinition; }
@return the decision definition of the historic decision instance which is being evaluated
getDecisionDefinition
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderHistoricDecisionInstanceContext.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderHistoricDecisionInstanceContext.java
Apache-2.0
public DelegateExecution getExecution() { return execution; }
@return the execution. This method returns the execution of the process instance which evaluated the decision definition.
getExecution
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderHistoricDecisionInstanceContext.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderHistoricDecisionInstanceContext.java
Apache-2.0
public DelegateCaseExecution getCaseExecution() { return caseExecution; }
@return the case execution. This method returns the case execution of the CMMN case task which evaluated the decision definition.
getCaseExecution
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderHistoricDecisionInstanceContext.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderHistoricDecisionInstanceContext.java
Apache-2.0
public ProcessDefinition getProcessDefinition() { return processDefinition; }
@return the process definition of the process instance which is being started
getProcessDefinition
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderProcessInstanceContext.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/multitenancy/TenantIdProviderProcessInstanceContext.java
Apache-2.0
@Override protected void executeSetOperation(TaskEntity task, Integer value) { if (isAssignee(type)) { task.setAssignee(userId); return; } if (isOwner(type)) { task.setOwner(userId); return; } task.addIdentityLink(userId, groupId, type); }
Abstract class that modifies {@link AbstractSetTaskPropertyCmd} to customize validation & logging for Add Identity Link related Commands.
executeSetOperation
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/AbstractAddIdentityLinkCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/AbstractAddIdentityLinkCmd.java
Apache-2.0
@Override public Void execute(CommandContext context) { TaskEntity task = validateAndGet(taskId, context); executeSetOperation(task, value); task.triggerUpdateEvent(); logOperation(context, task); return null; }
Executes this command against the command context to perform the set-operation. @param context the command context @throws NotFoundException in case the referenced task does not exist
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/AbstractSetTaskPropertyCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/AbstractSetTaskPropertyCmd.java
Apache-2.0
protected TaskEntity validateAndGet(String taskId, CommandContext context) { TaskManager taskManager = context.getTaskManager(); TaskEntity task = taskManager.findTaskById(taskId); ensureNotNull(NotFoundException.class, "Cannot find task with id " + taskId, "task", task); checkTaskAgainstContext(task, context); return task; }
Validates the given taskId against to verify it references an existing task before returning the task. @param taskId the given taskId, non-null @param context the context, non-null @return the corresponding task entity
validateAndGet
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/AbstractSetTaskPropertyCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/AbstractSetTaskPropertyCmd.java
Apache-2.0
protected void checkTaskAgainstContext(TaskEntity task, CommandContext context) { for (CommandChecker checker : context.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkTaskAssign(task); } }
Perform multi-tenancy & authorization checks on the given task against the given command context. @param task the given task @param context the given command context to check against
checkTaskAgainstContext
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/AbstractSetTaskPropertyCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/AbstractSetTaskPropertyCmd.java
Apache-2.0
protected <T> T ensureNotNullAndGet(String variableName, T value) { ensureNotNull(variableName, value); return value; }
Ensures the value is not null and returns the value. @param value the value @param <T> the type of the value @return the value @throws NullValueException in case the given value is null
ensureNotNullAndGet
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/AbstractSetTaskPropertyCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/AbstractSetTaskPropertyCmd.java
Apache-2.0
public Object execute(CommandContext commandContext) { ensureNotNull("jobId", jobId); JobEntity job = commandContext.getJobManager().findJobById(jobId); ensureNotNull("No job found with id '" + jobId + "'", "job", job); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkUpdateJob(job); } // We need to check if the job was locked, ie acquired by the job acquisition thread // This happens if the the job was already acquired, but not yet executed. // In that case, we can't allow to delete the job. if (job.getLockOwner() != null || job.getLockExpirationTime() != null) { throw new ProcessEngineException("Cannot delete job when the job is being executed. Try again later."); } commandContext.getOperationLogManager().logJobOperation(UserOperationLogEntry.OPERATION_TYPE_DELETE, jobId, job.getJobDefinitionId(), job.getProcessInstanceId(), job.getProcessDefinitionId(), job.getProcessDefinitionKey(), PropertyChange.EMPTY_CHANGE); job.delete(); return null; }
@author Saeid Mirzaei @author Joram Barrez
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/DeleteJobCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/DeleteJobCmd.java
Apache-2.0
@Override public Void execute(CommandContext commandContext) { ensureNotNull("processDefinitionKey", processDefinitionKey); List<ProcessDefinition> processDefinitions = commandContext.getProcessDefinitionManager() .findDefinitionsByKeyAndTenantId(processDefinitionKey, tenantId, isTenantIdSet); ensureNotEmpty(NotFoundException.class, "No process definition found with key '" + processDefinitionKey + "'", "processDefinitions", processDefinitions); for (ProcessDefinition processDefinition: processDefinitions) { String processDefinitionId = processDefinition.getId(); deleteProcessDefinitionCmd(commandContext, processDefinitionId, cascade, skipCustomListeners, skipIoMappings); } return null; }
Command to delete process definitions by a given key. @author Tassilo Weidner
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/DeleteProcessDefinitionsByKeyCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/DeleteProcessDefinitionsByKeyCmd.java
Apache-2.0
@Override public HistoryLevel execute(final CommandContext commandContext) { final Integer databaseHistoryLevel = HistoryLevelSetupCommand.databaseHistoryLevel(commandContext); HistoryLevel result = null; if (databaseHistoryLevel != null) { for (final HistoryLevel historyLevel : historyLevels) { if (historyLevel.getId() == databaseHistoryLevel) { result = historyLevel; break; } } if (result != null) { return result; } else { // if a custom non-null value is not registered, throw an exception. throw new ProcessEngineException(String.format("The configured history level with id='%s' is not registered in this config.", databaseHistoryLevel)); } } else { return null; } }
Read the already configured historyLevel from DB and map to given list of total levels.
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/DetermineHistoryLevelCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/DetermineHistoryLevelCmd.java
Apache-2.0
public BpmnModelInstance execute(CommandContext commandContext) { ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration(); final DeploymentCache deploymentCache = configuration.getDeploymentCache(); ProcessDefinitionEntity processDefinition = deploymentCache.findDeployedProcessDefinitionById(processDefinitionId); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkReadProcessDefinition(processDefinition); } BpmnModelInstance modelInstance = deploymentCache.findBpmnModelInstanceForProcessDefinition(processDefinitionId); ensureNotNull("no BPMN model instance found for process definition id " + processDefinitionId, "modelInstance", modelInstance); return modelInstance; }
Gives access to a deploy BPMN model instance which can be accessed by the BPMN model API. @author Sebastian Menski
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetDeploymentBpmnModelInstanceCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetDeploymentBpmnModelInstanceCmd.java
Apache-2.0
public InputStream execute(final CommandContext commandContext) { ProcessDefinitionEntity processDefinition = Context .getProcessEngineConfiguration() .getDeploymentCache() .findDeployedProcessDefinitionById(processDefinitionId); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkReadProcessDefinition(processDefinition); } final String deploymentId = processDefinition.getDeploymentId(); final String resourceName = processDefinition.getDiagramResourceName(); if (resourceName == null ) { return null; } else { InputStream processDiagramStream = commandContext.runWithoutAuthorization( new GetDeploymentResourceCmd(deploymentId, resourceName)); return processDiagramStream; } }
Gives access to a deployed process diagram, e.g., a PNG image, through a stream of bytes. @author Falko Menge
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetDeploymentProcessDiagramCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetDeploymentProcessDiagramCmd.java
Apache-2.0
public DiagramLayout execute(final CommandContext commandContext) { ProcessDefinitionEntity processDefinition = Context .getProcessEngineConfiguration() .getDeploymentCache() .findDeployedProcessDefinitionById(processDefinitionId); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkReadProcessDefinition(processDefinition); } InputStream processModelStream = commandContext.runWithoutAuthorization( new GetDeploymentProcessModelCmd(processDefinitionId)); InputStream processDiagramStream = commandContext.runWithoutAuthorization( new GetDeploymentProcessDiagramCmd(processDefinitionId)); return new ProcessDiagramLayoutFactory().getProcessDiagramLayout(processModelStream, processDiagramStream); }
Provides positions and dimensions of elements in a process diagram as provided by {@link GetDeploymentProcessDiagramCmd}. This command requires a process model and a diagram image to be deployed. @author Falko Menge
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetDeploymentProcessDiagramLayoutCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetDeploymentProcessDiagramLayoutCmd.java
Apache-2.0
public InputStream execute(final CommandContext commandContext) { ProcessDefinitionEntity processDefinition = Context .getProcessEngineConfiguration() .getDeploymentCache() .findDeployedProcessDefinitionById(processDefinitionId); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkReadProcessDefinition(processDefinition); } final String deploymentId = processDefinition.getDeploymentId(); final String resourceName = processDefinition.getResourceName(); InputStream processModelStream = commandContext.runWithoutAuthorization( new GetDeploymentResourceCmd(deploymentId, resourceName)); return processModelStream; }
Gives access to a deployed process model, e.g., a BPMN 2.0 XML file, through a stream of bytes. @author Falko Menge
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetDeploymentProcessModelCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetDeploymentProcessModelCmd.java
Apache-2.0
@Override protected void validateInput() { EnsureUtil.ensureNotNull("workerId", workerId); }
Validates the current input of the command.
validateInput
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/HandleExternalTaskCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/HandleExternalTaskCmd.java
Apache-2.0
protected boolean validateWorkerViolation(ExternalTaskEntity externalTask) { return !workerId.equals(externalTask.getWorkerId()); }
Validates the caller's workerId against the workerId of the external task.
validateWorkerViolation
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/HandleExternalTaskCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/HandleExternalTaskCmd.java
Apache-2.0
@Override public Boolean execute(CommandContext commandContext) { return false; }
@deprecated Always returns <code>false</code> The sending telemetry data feature is removed. Please remove any usages of the command.
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/IsTelemetryEnabledCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/IsTelemetryEnabledCmd.java
Apache-2.0
public Object execute(CommandContext commandContext) { commandContext.getAuthorizationManager().checkCamundaAdminOrPermission(CommandChecker::checkSetProperty); final PropertyManager propertyManager = commandContext.getPropertyManager(); PropertyEntity property = propertyManager .findPropertyById(name); String operation = null; if(property != null) { // update property.setValue(value); operation = UserOperationLogEntry.OPERATION_TYPE_UPDATE; } else { // create property = new PropertyEntity(name, value); propertyManager.insert(property); operation = UserOperationLogEntry.OPERATION_TYPE_CREATE; } commandContext.getOperationLogManager().logPropertyOperation(operation, Collections.singletonList(new PropertyChange("name", null, name))); return null; }
<p>Command which can be used for setting the value of a property</p> @author Daniel Meyer
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/SetPropertyCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/SetPropertyCmd.java
Apache-2.0
protected ActivityImpl determineFirstActivity(ProcessDefinitionImpl processDefinition, ProcessInstanceModificationBuilderImpl modificationBuilder) { AbstractProcessInstanceModificationCommand firstInstruction = modificationBuilder.getModificationOperations().get(0); if (firstInstruction instanceof AbstractInstantiationCmd) { AbstractInstantiationCmd instantiationInstruction = (AbstractInstantiationCmd) firstInstruction; CoreModelElement targetElement = instantiationInstruction.getTargetElement(processDefinition); ensureNotNull(NotValidException.class, "Element '" + instantiationInstruction.getTargetElementId() + "' does not exist in process " + processDefinition.getId(), "targetElement", targetElement); if (targetElement instanceof ActivityImpl) { return (ActivityImpl) targetElement; } else if (targetElement instanceof TransitionImpl) { return (ActivityImpl) ((TransitionImpl) targetElement).getDestination(); } } return null; }
get the activity that is started by the first instruction, if exists; return null if the first instruction is a start-transition instruction
determineFirstActivity
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/StartProcessInstanceAtActivitiesCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/StartProcessInstanceAtActivitiesCmd.java
Apache-2.0
@Override public Void execute(CommandContext commandContext) { return null; }
@deprecated Command is empty The sending telemetry data feature is removed. Please any remove usages of the command.
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/TelemetryConfigureCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/TelemetryConfigureCmd.java
Apache-2.0
@Override public Object execute(CommandContext commandContext) { commandContext.getAuthorizationManager().checkCamundaAdmin(); IdentityOperationResult operationResult = commandContext.getWritableIdentityProvider().unlockUser(userId); commandContext.getOperationLogManager().logUserOperation(operationResult, userId); return null; }
Allows to unlock users. Only CAMUNDA_ADMIN is authorised to do it. @author Yana Vasileva
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmd/UnlockUserCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/UnlockUserCmd.java
Apache-2.0
@Override public InputStream execute(final CommandContext commandContext) { CaseDefinitionEntity caseDefinition = Context .getProcessEngineConfiguration() .getDeploymentCache() .findDeployedCaseDefinitionById(caseDefinitionId); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkReadCaseDefinition(caseDefinition); } final String deploymentId = caseDefinition.getDeploymentId(); final String resourceName = caseDefinition.getDiagramResourceName(); InputStream caseDiagramStream = null; if (resourceName != null) { caseDiagramStream = commandContext.runWithoutAuthorization(new GetDeploymentResourceCmd(deploymentId, resourceName)); } return caseDiagramStream; }
Gives access to a deployed case diagram, e.g., a PNG image, through a stream of bytes. @author Simon Zambrovski
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/cmd/GetDeploymentCaseDiagramCmd.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/cmd/GetDeploymentCaseDiagramCmd.java
Apache-2.0
@Override public void updateModifiableFieldsFromEntity(CaseDefinitionEntity updatingCaseDefinition) { if (this.key.equals(updatingCaseDefinition.key) && this.deploymentId.equals(updatingCaseDefinition.deploymentId)) { this.revision = updatingCaseDefinition.revision; this.historyTimeToLive = updatingCaseDefinition.historyTimeToLive; } else { LOG.logUpdateUnrelatedCaseDefinitionEntity(this.key, updatingCaseDefinition.key, this.deploymentId, updatingCaseDefinition.deploymentId); } }
Updates all modifiable fields from another case definition entity. @param updatingCaseDefinition
updateModifiableFieldsFromEntity
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/entity/repository/CaseDefinitionEntity.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/entity/repository/CaseDefinitionEntity.java
Apache-2.0
public CaseDefinitionEntity findLatestCaseDefinitionByKey(String caseDefinitionKey) { @SuppressWarnings("unchecked") List<CaseDefinitionEntity> caseDefinitions = getDbEntityManager().selectList("selectLatestCaseDefinitionByKey", configureParameterizedQuery(caseDefinitionKey)); if (caseDefinitions.isEmpty()) { return null; } else if (caseDefinitions.size() == 1) { return caseDefinitions.iterator().next(); } else { throw LOG.multipleTenantsForCaseDefinitionKeyException(caseDefinitionKey); } }
@return the latest version of the case definition with the given key (from any tenant) @throws ProcessEngineException if more than one tenant has a case definition with the given key @see #findLatestCaseDefinitionByKeyAndTenantId(String, String)
findLatestCaseDefinitionByKey
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/entity/repository/CaseDefinitionManager.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/entity/repository/CaseDefinitionManager.java
Apache-2.0
public String getCaseDefinitionId() { return caseDefinitionId; }
reference to a sub process instance, not-null if currently subprocess is started from this execution
getCaseDefinitionId
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/entity/runtime/CaseExecutionEntity.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/entity/runtime/CaseExecutionEntity.java
Apache-2.0
protected List<String> getSatisfiedSentries(List<String> sentryIds) { List<String> result = new ArrayList<String>(); if (sentryIds != null) { for (String sentryId : sentryIds) { if (isSentrySatisfied(sentryId)) { result.add(sentryId); } } } return result; }
Checks for each given sentry id whether the corresponding sentry is satisfied.
getSatisfiedSentries
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/execution/CmmnExecution.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/execution/CmmnExecution.java
Apache-2.0
public Map<String, List<VariableListener<?>>> getVariableListeners(String eventName, boolean includeCustomListeners) { Map<String, Map<String, List<VariableListener<?>>>> listenerCache; if (includeCustomListeners) { if (resolvedVariableListeners == null) { resolvedVariableListeners = new HashMap<String, Map<String,List<VariableListener<?>>>>(); } listenerCache = resolvedVariableListeners; } else { if (resolvedBuiltInVariableListeners == null) { resolvedBuiltInVariableListeners = new HashMap<String, Map<String,List<VariableListener<?>>>>(); } listenerCache = resolvedBuiltInVariableListeners; } Map<String, List<VariableListener<?>>> resolvedListenersForEvent = listenerCache.get(eventName); if (resolvedListenersForEvent == null) { resolvedListenersForEvent = new HashMap<String, List<VariableListener<?>>>(); listenerCache.put(eventName, resolvedListenersForEvent); CmmnActivity currentActivity = this; while (currentActivity != null) { List<VariableListener<?>> localListeners = null; if (includeCustomListeners) { localListeners = currentActivity.getVariableListenersLocal(eventName); } else { localListeners = currentActivity.getBuiltInVariableListenersLocal(eventName); } if (localListeners != null && !localListeners.isEmpty()) { resolvedListenersForEvent.put(currentActivity.getId(), localListeners); } currentActivity = currentActivity.getParent(); } } return resolvedListenersForEvent; }
Returns a map of all variable listeners defined on this activity or any of its parents activities. The map's key is the id of the respective activity the listener is defined on.
getVariableListeners
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/model/CmmnActivity.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/model/CmmnActivity.java
Apache-2.0
public void transformCasePlanModel(org.camunda.bpm.model.cmmn.impl.instance.CasePlanModel casePlanModel, CmmnActivity activity) { transformCasePlanModel((org.camunda.bpm.model.cmmn.instance.CasePlanModel) casePlanModel, activity); }
Abstract base class for implementing a {@link CmmnTransformListener} without being forced to implement all methods provided, which make the implementation more robust to future changes. @author Sebastian Menski
transformCasePlanModel
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/transformer/AbstractCmmnTransformListener.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/transformer/AbstractCmmnTransformListener.java
Apache-2.0
public boolean hasDynamicReferences() { return (tenantIdProvider != null && tenantIdProvider.isDynamic()) || definitionKeyValueProvider.isDynamic() || versionValueProvider.isDynamic() || versionTagValueProvider.isDynamic(); }
@return true if any of the references that specify the callable element are non-literal and need to be resolved with potential side effects to determine the process or case definition that is to be called.
hasDynamicReferences
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/model/BaseCallableElement.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/model/BaseCallableElement.java
Apache-2.0
@SuppressWarnings("unchecked") public <T> T get(PropertyKey<T> property) { return (T) properties.get(property.getName()); }
Returns the value to which the specified property key is mapped, or <code>null</code> if this properties contains no mapping for the property key. @param property the property key whose associated value is to be returned @return the value to which the specified property key is mapped, or <code>null</code> if this properties contains no mapping for the property key
get
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
Apache-2.0
@SuppressWarnings("unchecked") public <T> List<T> get(PropertyListKey<T> property) { if (contains(property)) { return (List<T>) properties.get(property.getName()); } else { return new ArrayList<T>(); } }
Returns the list to which the specified property key is mapped, or an empty list if this properties contains no mapping for the property key. Note that the empty list is not mapped to the property key. @param property the property key whose associated list is to be returned @return the list to which the specified property key is mapped, or an empty list if this properties contains no mapping for the property key @see #addListItem(PropertyListKey, Object)
get
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
Apache-2.0
@SuppressWarnings("unchecked") public <K, V> Map<K, V> get(PropertyMapKey<K, V> property) { if (contains(property)) { return (Map<K, V>) properties.get(property.getName()); } else { return new HashMap<K, V>(); } }
Returns the map to which the specified property key is mapped, or an empty map if this properties contains no mapping for the property key. Note that the empty map is not mapped to the property key. @param property the property key whose associated map is to be returned @return the map to which the specified property key is mapped, or an empty map if this properties contains no mapping for the property key @see #putMapEntry(PropertyMapKey, Object, Object)
get
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
Apache-2.0
public <T> void set(PropertyKey<T> property, T value) { properties.put(property.getName(), value); }
Associates the specified value with the specified property key. If the properties previously contained a mapping for the property key, the old value is replaced by the specified value. @param <T> the type of the value @param property the property key with which the specified value is to be associated @param value the value to be associated with the specified property key
set
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
Apache-2.0
public <T> void set(PropertyListKey<T> property, List<T> value) { properties.put(property.getName(), value); }
Associates the specified list with the specified property key. If the properties previously contained a mapping for the property key, the old value is replaced by the specified list. @param <T> the type of elements in the list @param property the property key with which the specified list is to be associated @param value the list to be associated with the specified property key
set
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
Apache-2.0
public <K, V> void set(PropertyMapKey<K, V> property, Map<K, V> value) { properties.put(property.getName(), value); }
Associates the specified map with the specified property key. If the properties previously contained a mapping for the property key, the old value is replaced by the specified map. @param <K> the type of keys maintained by the map @param <V> the type of mapped values @param property the property key with which the specified map is to be associated @param value the map to be associated with the specified property key
set
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
Apache-2.0
public <T> void addListItem(PropertyListKey<T> property, T value) { List<T> list = get(property); list.add(value); if (!contains(property)) { set(property, list); } }
Append the value to the list to which the specified property key is mapped. If this properties contains no mapping for the property key, the value append to a new list witch is associate the the specified property key. @param <T> the type of elements in the list @param property the property key whose associated list is to be added @param value the value to be appended to list
addListItem
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
Apache-2.0
public <K, V> void putMapEntry(PropertyMapKey<K, V> property, K key, V value) { Map<K, V> map = get(property); if (!property.allowsOverwrite() && map.containsKey(key)) { throw new ProcessEngineException("Cannot overwrite property key " + key + ". Key already exists"); } map.put(key, value); if (!contains(property)) { set(property, map); } }
Insert the value to the map to which the specified property key is mapped. If this properties contains no mapping for the property key, the value insert to a new map witch is associate the the specified property key. @param <K> the type of keys maintained by the map @param <V> the type of mapped values @param property the property key whose associated list is to be added @param value the value to be appended to list
putMapEntry
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
Apache-2.0
protected void execute(AbstractVariableScope innerScope, AbstractVariableScope outerScope) { // get value from outer scope Object value = valueProvider.getValue(outerScope); LOG.debugMappingValueFromOuterScopeToInnerScope(value,outerScope, name, innerScope); // set variable in inner scope innerScope.setVariableLocal(name, value); }
<pre> +-----------------+ | | outer scope-----> inner scope | | | +-----------------+ </pre> @author Daniel Meyer
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/variable/mapping/InputParameter.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/variable/mapping/InputParameter.java
Apache-2.0
public void execute(AbstractVariableScope scope) { execute(scope, scope.getParentVariableScope()); }
Execute the parameter in a given variable scope.
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/variable/mapping/IoParameter.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/variable/mapping/IoParameter.java
Apache-2.0
protected void execute(AbstractVariableScope innerScope, AbstractVariableScope outerScope) { // get value from inner scope Object value = valueProvider.getValue(innerScope); LOG.debugMappingValuefromInnerScopeToOuterScope(value, innerScope, name, outerScope); // set variable in outer scope outerScope.setVariable(name, value); }
<pre> +--------------+ | | | inner scope ------> outer scope | | +--------------+ </pre> @author Daniel Meyer
execute
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/variable/mapping/OutputParameter.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/core/variable/mapping/OutputParameter.java
Apache-2.0
public void reset() { nextId = 0; lastId = -1; }
Reset inner state so that the generator fetches a new block of IDs from the database when the next ID generation request is received.
reset
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/DbIdGenerator.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/DbIdGenerator.java
Apache-2.0
public List<DbOperation> getFailedOperations() { return failedOperations; }
@return the operation that could not be performed
getFailedOperations
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/FlushResult.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/FlushResult.java
Apache-2.0
public boolean isTenantCheckEnabled() { return isTenantCheckEnabled; }
the ids of the authenticated tenants
isTenantCheckEnabled
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/TenantCheck.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/TenantCheck.java
Apache-2.0
public void recycle() { // clean out state dbEntity = null; copy = null; entityState = null; }
Ids of referenced entities of the same entity type
recycle
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/CachedDbEntity.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/CachedDbEntity.java
Apache-2.0
public CachedDbEntity getCachedEntity(Class<?> type, String id) { Class<?> cacheKey = cacheKeyMapping.getEntityCacheKey(type); Map<String, CachedDbEntity> entitiesByType = cachedEntites.get(cacheKey); if(entitiesByType != null) { return entitiesByType.get(id); } else { return null; } }
Looks up an entity in the cache. @param type the type of the object @param id the id of the CachedEntity to lookup @return the cached entity or null if the entity does not exist.
getCachedEntity
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
Apache-2.0
public CachedDbEntity getCachedEntity(DbEntity dbEntity) { return getCachedEntity(dbEntity.getClass(), dbEntity.getId()); }
Looks up an entity in the cache. @param dbEntity the entity for which the CachedEntity should be looked up @return the cached entity or null if the entity does not exist.
getCachedEntity
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
Apache-2.0
public void putTransient(DbEntity e) { CachedDbEntity cachedDbEntity = new CachedDbEntity(); cachedDbEntity.setEntity(e); cachedDbEntity.setEntityState(TRANSIENT); putInternal(cachedDbEntity); }
Put a new, {@link DbEntityState#TRANSIENT} object into the cache. @param e the object to put into the cache
putTransient
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
Apache-2.0
public void putPersistent(DbEntity e) { CachedDbEntity cachedDbEntity = new CachedDbEntity(); cachedDbEntity.setEntity(e); cachedDbEntity.setEntityState(PERSISTENT); cachedDbEntity.determineEntityReferences(); cachedDbEntity.makeCopy(); putInternal(cachedDbEntity); }
Put a {@link DbEntityState#PERSISTENT} object into the cache. @param e the object to put into the cache
putPersistent
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
Apache-2.0
public boolean remove(DbEntity e) { Class<?> cacheKey = cacheKeyMapping.getEntityCacheKey(e.getClass()); Map<String, CachedDbEntity> typeMap = cachedEntites.get(cacheKey); if(typeMap != null) { return typeMap.remove(e.getId()) != null; } else { return false; } }
Remove an entity from the cache @param e the entity to remove @return
remove
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
Apache-2.0
public boolean contains(DbEntity dbEntity) { return getCachedEntity(dbEntity) != null; }
Allows checking whether the provided entity is present in the cache @param dbEntity the entity to check @return true if the the provided entity is present in the cache
contains
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
Apache-2.0
public boolean isPersistent(DbEntity dbEntity) { CachedDbEntity cachedDbEntity = getCachedEntity(dbEntity); if(cachedDbEntity == null) { return false; } else { return cachedDbEntity.getEntityState() == PERSISTENT; } }
Allows checking whether the provided entity is present in the cache and is {@link DbEntityState#PERSISTENT}. @param dbEntity the entity to check @return true if the provided entity is present in the cache and is {@link DbEntityState#PERSISTENT}.
isPersistent
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
Apache-2.0
public boolean isDeleted(DbEntity dbEntity) { CachedDbEntity cachedDbEntity = getCachedEntity(dbEntity); if(cachedDbEntity == null) { return false; } else { return cachedDbEntity.getEntityState() == DELETED_MERGED || cachedDbEntity.getEntityState() == DELETED_PERSISTENT || cachedDbEntity.getEntityState() == DELETED_TRANSIENT; } }
Allows checking whether the provided entity is present in the cache and is marked to be deleted. @param dbEntity the entity to check @return true if the provided entity is present in the cache and is marked to be deleted
isDeleted
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/cache/DbEntityCache.java
Apache-2.0
protected void addSortedInserts(List<DbOperation> flush) { for (Entry<Class<?>, SortedSet<DbEntityOperation>> operationsForType : inserts.entrySet()) { // add inserts to flush if(HasDbReferences.class.isAssignableFrom(operationsForType.getKey())) { // if this type has self references, we need to resolve the reference order flush.addAll(sortByReferences(operationsForType.getValue())); } else { flush.addAll(operationsForType.getValue()); } } }
Adds the insert operations to the flush (in correct order). @param operationsForFlush
addSortedInserts
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/operation/DbOperationManager.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/operation/DbOperationManager.java
Apache-2.0
public int compare(DbBulkOperation firstOperation, DbBulkOperation secondOperation) { if(firstOperation.equals(secondOperation)) { return 0; } // order by statement int statementOrder = firstOperation.getStatement().compareTo(secondOperation.getStatement()); if(statementOrder == 0) { return firstOperation.hashCode() < secondOperation.hashCode() ? -1 : 1; } else { return statementOrder; } }
Orders bulk operations according to the lexicographical ordering of their statement names @author Daniel Meyer
compare
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/operation/comparator/DbBulkOperationComparator.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/operation/comparator/DbBulkOperationComparator.java
Apache-2.0
public int compare(Class<?> firstEntityType, Class<?> secondEntityType) { if(firstEntityType == secondEntityType) { return 0; } Integer firstIndex = TYPE_ORDER.get(firstEntityType); Integer secondIndex = TYPE_ORDER.get(secondEntityType); // unknown type happens before / after everything else if(firstIndex == null) { firstIndex = Integer.MAX_VALUE; } if(secondIndex == null) { secondIndex = Integer.MAX_VALUE; } int result = firstIndex.compareTo(secondIndex); if(result == 0) { return firstEntityType.getName().compareTo(secondEntityType.getName()); } else { return result; } }
Compares operations by Entity type. @author Daniel Meyer
compare
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/operation/comparator/EntityTypeComparatorForModifications.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/db/entitymanager/operation/comparator/EntityTypeComparatorForModifications.java
Apache-2.0
public Object getInvocationResult() { return invocationResult; }
@return the result of the invocation (can be null if the invocation does not return a result)
getInvocationResult
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/delegate/DelegateInvocation.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/delegate/DelegateInvocation.java
Apache-2.0
protected void invoke() throws Exception { invocationResult = valueExpression.getValue(elContext); }
Class responsible for handling Expression.getValue invocations @author Daniel Meyer
invoke
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/delegate/ExpressionGetInvocation.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/delegate/ExpressionGetInvocation.java
Apache-2.0
@Override protected void invoke() throws Exception { valueExpression.setValue(elContext, value); }
Class responsible for handling Expression.setValue() invocations. @author Daniel Meyer
invoke
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/delegate/ExpressionSetInvocation.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/delegate/ExpressionSetInvocation.java
Apache-2.0
@Override public String hashAlgorithmName() { return "SHA-512"; }
<p>{@link PasswordEncryptor} implementation using base64 encoded SHA-512 password hashes</p>
hashAlgorithmName
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/Sha512HashDigest.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/Sha512HashDigest.java
Apache-2.0
@Override public String hashAlgorithmName() { return "SHA"; }
<p>{@link PasswordEncryptor} implementation using base64 encoded SHA password hashes</p> @author Daniel Meyer
hashAlgorithmName
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/ShaHashDigest.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/ShaHashDigest.java
Apache-2.0
public boolean isUrlSafe() { return this.encodeTable == URL_SAFE_ENCODE_TABLE; }
Returns our current encode mode. True if we're URL-SAFE, false otherwise. @return true if we're in URL-SAFE mode, false otherwise. @since 1.4
isUrlSafe
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
boolean hasData() { return this.buffer != null; }
Returns true if this Base64 object has buffered data for reading. @return true if there is Base64 object still available for reading.
hasData
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
int avail() { return buffer != null ? pos - readPos : 0; }
Returns the amount of buffered data available for reading. @return The amount of buffered data available for reading.
avail
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
int readResults(byte[] b, int bPos, int bAvail) { if (buffer != null) { int len = Math.min(avail(), bAvail); if (buffer != b) { System.arraycopy(buffer, readPos, b, bPos, len); readPos += len; if (readPos >= pos) { buffer = null; } } else { // Re-using the original consumer's output array is only // allowed for one round. buffer = null; } return len; } return eof ? -1 : 0; }
Extracts buffered data into the provided byte[] array, starting at position bPos, up to a maximum of bAvail bytes. Returns how many bytes were actually extracted. @param b byte[] array to extract the buffered data into. @param bPos position in byte[] array to start extraction at. @param bAvail amount of bytes we're allowed to extract. We may extract fewer (if fewer are available). @return The number of bytes successfully extracted into the provided byte[] array.
readResults
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
void setInitialBuffer(byte[] out, int outPos, int outAvail) { // We can re-use consumer's original output array under // special circumstances, saving on some System.arraycopy(). if (out != null && out.length == outAvail) { buffer = out; pos = outPos; readPos = outPos; } }
Sets the streaming buffer. This is a small optimization where we try to buffer directly to the consumer's output array for one round (if the consumer calls this method first) instead of starting our own buffer. @param out byte[] array to buffer directly to. @param outPos Position to start buffering into. @param outAvail Amount of bytes available for direct buffering.
setInitialBuffer
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
public static boolean isBase64(byte octet) { return octet == PAD || (octet >= 0 && octet < DECODE_TABLE.length && DECODE_TABLE[octet] != -1); }
Returns whether or not the <code>octet</code> is in the base 64 alphabet. @param octet The value to test @return <code>true</code> if the value is defined in the the base 64 alphabet, <code>false</code> otherwise. @since 1.4
isBase64
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
public static boolean isArrayByteBase64(byte[] arrayOctet) { for (int i = 0; i < arrayOctet.length; i++) { if (!isBase64(arrayOctet[i]) && !isWhiteSpace(arrayOctet[i])) { return false; } } return true; }
Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. Currently the method treats whitespace as valid. @param arrayOctet byte array to test @return <code>true</code> if all bytes are valid characters in the Base64 alphabet or if the byte array is empty; false, otherwise
isArrayByteBase64
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
private static boolean containsBase64Byte(byte[] arrayOctet) { for (int i = 0; i < arrayOctet.length; i++) { if (isBase64(arrayOctet[i])) { return true; } } return false; }
Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. @param arrayOctet byte array to test @return <code>true</code> if any byte is a valid character in the Base64 alphabet; false herwise
containsBase64Byte
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
public static byte[] encodeBase64(byte[] binaryData) { return encodeBase64(binaryData, false); }
Encodes binary data using the base64 algorithm but does not chunk the output. @param binaryData binary data to encode @return byte[] containing Base64 characters in their UTF-8 representation.
encodeBase64
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
public static String encodeBase64String(byte[] binaryData) { return StringUtils.newStringUtf8(encodeBase64(binaryData, true)); }
Encodes binary data using the base64 algorithm into 76 character blocks separated by CRLF. @param binaryData binary data to encode @return String containing Base64 characters. @since 1.4
encodeBase64String
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
public static byte[] encodeBase64Chunked(byte[] binaryData) { return encodeBase64(binaryData, true); }
Encodes binary data using the base64 algorithm and chunks the encoded output into 76 character blocks @param binaryData binary data to encode @return Base64 characters chunked in 76 character blocks
encodeBase64Chunked
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
public Object decode(Object pObject) { if (pObject instanceof byte[]) { return decode((byte[]) pObject); } else if (pObject instanceof String) { return decode((String) pObject); } else { throw new RuntimeException("Parameter supplied to Base64 decode is not a byte[] or a String"); } }
Decodes an Object using the base64 algorithm. This method is provided in order to satisfy the requirements of the Decoder interface, and will throw a DecoderException if the supplied object is not of type byte[] or String. @param pObject Object to decode @return An object (of type byte[]) containing the binary data which corresponds to the byte[] or String supplied. @throws DecoderException if the parameter supplied is not of type byte[]
decode
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
public byte[] decode(String pArray) { return decode(StringUtils.getBytesUtf8(pArray)); }
Decodes a String containing containing characters in the Base64 alphabet. @param pArray A String containing Base64 character data @return a byte array containing binary data @since 1.4
decode
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0
public byte[] decode(byte[] pArray) { reset(); if (pArray == null || pArray.length == 0) { return pArray; } long len = (pArray.length * 3) / 4; byte[] buf = new byte[(int) len]; setInitialBuffer(buf, 0, buf.length); decode(pArray, 0, pArray.length); decode(pArray, 0, -1); // Notify decoder of EOF. // Would be nice to just return buf (like we sometimes do in the encode // logic), but we have no idea what the line-length was (could even be // variable). So we cannot determine ahead of time exactly how big an // array is necessary. Hence the need to construct a 2nd byte array to // hold the final result: byte[] result = new byte[pos]; readResults(result, 0, result.length); return result; }
Decodes a byte[] containing containing characters in the Base64 alphabet. @param pArray A byte array containing Base64 character data @return a byte array containing binary data
decode
java
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/digest/_apacheCommonsCodec/Base64.java
Apache-2.0