Package org.cibseven.bpm.engine.impl
Class ExecutionAllowListChecker
java.lang.Object
org.cibseven.bpm.engine.impl.ExecutionAllowListChecker
Checks the built-in execution mechanisms a process definition uses against
ProcessEngineConfigurationImpl.getExecutionAllowList(): the task types
camunda:type="shell", "mail" and "external", and the script
languages resolved by the ScriptingEngines.
An empty allow list means no check. Once it has entries, only the listed task types and
script languages are allowed; ProcessEngineConfigurationImpl.getExpressionHardeningMode()
decides what happens on a violation (off: no check, report: log only, enforce: block).
Entries are matched in full and ignoring case.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidensureScriptLanguageAllowed(String language) Blocks the script language, unless the allow list permits it or is not active.static voidensureTaskTypeAllowed(String taskType, String activityId) Blocks the task type at execution time, unless the allow list permits it or is not active.static StringgetViolationMessage(String kind, String name, String activityId) static boolean
-
Field Details
-
TASK_TYPE_SHELL
- See Also:
-
TASK_TYPE_MAIL
- See Also:
-
TASK_TYPE_EXTERNAL
- See Also:
-
KIND_TASK_TYPE
- See Also:
-
KIND_SCRIPT_LANGUAGE
- See Also:
-
-
Method Details
-
ensureTaskTypeAllowed
Blocks the task type at execution time, unless the allow list permits it or is not active.- Parameters:
taskType- the value ofcamunda:type, e.g.shellactivityId- the activity that uses the task type, for the message- Throws:
ProcessEngineException- if the task type must be blocked
-
ensureScriptLanguageAllowed
Blocks the script language, unless the allow list permits it or is not active.- Parameters:
language- the name of the script language, e.g.groovy- Throws:
ProcessEngineException- if the script language must be blocked
-
getViolationMessage
- Returns:
- the message of a blocked use, with the same code as the exception thrown at execution time
-
isBlocked
- Returns:
trueif the use ofnamemust be blocked. A violation in report mode is logged and returnsfalse. Anullname is not checked: there is nothing to execute, and the caller reports the missing name itself.
-