- save context changes before suspend and apply to new context after resume.
- fix resume from the same step when out variables are present.
- use GraalVM JS's Nashorn compatibility mode.
- use GraalVM JS as the default JavaScript runtime.
- new EngineListener method
onUnhandledException
.
- forms: interpolate labels.
- fixed the
ExecutionContext#CURRENT_FLOW_NAME_KEY
variable state whencopyAllCallActivityOutVariables
is enabled.
- boundary error events support for ScriptTasks.
- new variable
Execution#CURRENT_FLOW_NAME_KEY
: contains the name of the current flow.
- detect cycles in arrays when interpolating values.
- improved behavior of the
Interpolator
in case of circular references; - fixed
FormExtension
serialization issue - make it compatible with previously serialized versions.
- support for expressions in form names in
UserTask/FormExtension
.
- allow expressions in script names in
ScriptTask
.
ExecutionContext#suspend(String messageRef, Object payload)
replaced with#suspend(String messageRef, Object payload, boolean resumeFromSameStep)
.
- refactor
Interpolator
to make it more useful outside of the tasks.
- change the visibility the utility methods of
DefaultFormValidatorLocale
for easier subclassing.
- new version of
Engine#start
method: allow passing in predefinedVariables
.
- fixed the handling of the
execution#suspend()
flag when running aScriptTask
.
- ability to override the order of EL resolvers.
- fixed handling of Sets in
Interpolator
.
- support for custom form fields in form-based user tasks.
- implement
eval
andinterpolate
for read-only contexts; - if a task fails, ignore OUT expression evaluation errors.
- implemented
MapBackedExecutionContext#getVariableNames
and#toMap
allowing tasks to enumerate all available variables.
- exceptions thrown while resolving IN variables are now correctly handled and can trigger boundary error events.
- optional event payload (see
Event#getPayload
andExecutionContext#suspend(messageRef, payload)
).
- validate results of boolean expressions when branching.
- support for expressions in
CallActivity
targets.
- Element event's variables can now be retrieved using
InterceptorElementEvent#getVariables
.
- new method
ExecutionContextFactory#withOverrides
. Used to create contexts with variable overrides.
ExecutionContextFactory
moved tobpm-engine-api
.
ExecutionContext#getProcessDefinitionId
and#getElementId()
methods to provide additional process metadata for tasks and expressions.
ExecutionContext#suspend
to suspend a process from a task or an expresssion.
- support for
TerminateEvent
.
- support for custom field validators in the
DefaultFormValidator
.
- fixed handling of booleans in forms.
- allow users to supply their own
UuidGenerator
s inEngineBuilder
.
- added support for boolean form fields;
- fixed last expression result saving when using a JavaDelegate;
- cleaned up value removal and error handling in the LevelDB persistence provider.
io.takari.bpm.EngineListener
interface to handle internal events;Engine#resume
methods to resume a process and merge nested input data into the process' variables.
- preserve the order of variable definitions. This should fix the newly found issues with variable interpolation.
- fix the issue with non-standard
JavaDelegates
.
- pluggable
JavaDelegate
handlers.
- allow users to provide their own
ExecutionContext
implementations by introducingExecutionContextFactory
; - support different
ExecutionContext
variable names other thanexecution
.
ExpressionManager#interpolate
can now interpolate recursive values in the same Map object;- new
ExecutionContext#interpolate
method.
- small performance optimization of
ExpressionManager#interpolate
.
ScriptTask#copyAllVariables
andServiceTask#copyAllVariables
options: iftrue
, copies all variables of the current context in addition to any IN-variables set.
- fixed an issue with
ProcessDefintionBuilder#tieForks()
logic.
Configuration#copyAllCallActivityOutVariables
: enables implicit copying of CallActivity's variables back into the parent context.
- forms are capturing only relevant environment values now;
- fixed the issue with loops and parallel gateways.
- fixed handling of end events in
ProcessDefinitionBuilder
.
- form option values are now interpolated and can contain expressions.
- fixed an issue with interpolating immutable maps.
- default expression manager implementation switched to Glassfish EL 3.0.
FormValidatorLocale
now acceptsFormField
objects instead of just field names;DefaultFormValidatorLocale
now uses form field labels (if available).
- expose available task beans to
ScriptTasks
using the providedtasks
binding.
- prevent errors from copying in another event's state.
- handling of
BpmnError
thrown from aScriptTask
; Configuration#wrapAllExceptionsAsBpmnErrors
: iftrue
, then any non-BpmnError
exceptions will be wrapped as one (without an error reference).
- now the last handled error available immediately in
ExecutionContext
.
- script engine can now be selected based on an file extension of an external
script used in a
ScriptTask
;
Form#options
to store additional metadata for a form call;
- expose all context variables to a
ScriptTask
. Now those variables can be used directly, without the need inexecution.getVariable("myVar")
.
ExecutionContext#toMap
method. It returns all variables defined in the specified context with changes applied and preserving shadowed values.
- upgrade Maven wrapper to 3.5.0;
- upgrade the parent pom.
- new configuration parameter:
Configuration#interpolateInputVariables
. If set totrue
, then values of input variables (Engine#start
) will be evaluated using a configuredExpressionManager
.
- fix form defaults: copy existing values before calculating default field values.
FormField#allowedValue
allows to specify an allowed value for a field. The value can be of any (serializable) type, process usingExpressionManager#interpolate
and can contain expressions.
FormField#valueExpr
replaced withFormField#defaultValue
. This value will be processed usingExpressionManager#interpolate
and can contain expressions.
- new parent POM version;
ProcessDefinitionBuilder#script
method for addingScriptTask
elements;- new method in
ProcessDefinitionBuilder
to add user tasks. - support for form-based user tasks, a new
UserTask.Extension
and forms API.
- support for values interpolation in in/out variable mappings. Any string in source values
(including in deeply-nested collections) can be treated as an expression and eval'ed with
the current process context. This feature available only on the model API level for now:
see
VariableMapping#interpolateValue
.
- evaluation results of
ExpressionType.SIMPLE
tasks now are stored with theServiceTask.EXPRESSION_RESULT_VAR
key in the context. This can be turned off by settingConfiguration#setStoreExpressionEvalResultsInContext(false)
; - new methods in
ProcessDefinitionBuilder
to add tasks with IN/OUT variables mapping; - small improvements for
ProcessDefinitionHelper#dump
.
DefaultExpressionManager
now logs evaluation errors usingWARN
level.
- new element:
ScriptTask
. Allows execution of JSR-223 compatible scripts; - new extension point:
ResourceResolver
. Used for resolving external resources (e.g. scripts).
- new element:
UserTask
; - new extension point:
UserTaskHandler
interface to handleUserTask
elements. Default implementation will simply skip those elements.
- basic support for in/out variables in
ServiceTask
elements. - new
ProcessDefinitionBuilder
.
- initial implementation of the
EventService
API.
- serialization is working again (including the serialization benchmark).
- fixed the bug, preventing processes with multiple calls to a same activity from working with parallel or inclusive gateways.
- memory footprint optimizations.
- the new methods
ExecutionInterceptor#onScopeCreated
and#onScopeDestroyed
allow to monitor logical scopes creation and removal.
ExecutionInterceptor#onError(String, Throwable)
superseded byExecutionInterceptor(InterceptorErrorEvent)
.
- the
ProcessDefinitionHelper#dump
utility method to print a process structure as a String.
- the new
ExecutionInterceptor#onUnhandledError
method can be used to track unhandled errors in suspended processes. E.g., in situations when one ofEngine#resume
branches fails, but the process is not finished due to other events waiting.
- do not throw unhandled BPMN errors if a process is not finished.
- the
ExecutionContext#PROCESS_BUSINESS_KEY
variable is now usable again. - fixed
ExecutionInterceptor#onElement
not invoking for boundary event elements.
Configuration#throwExceptionOnErrorEnd
is removed. SeeConfiguration#unhandledBpmnErrorStrategy = PROPAGATE
.
- fixed the scoping issue with subprocesses and error propagation.
- minor logging improvements.
- avoid reloading a process definition on each
CallActivity
invocation. Enabled by theConfiguration#avoidDefinitionReloadingOnCall
flag. - the new method
AbstractEngine#run(ProcessInstance)
to run a process using a state's snapshot. Configuration#unhandledBpmnErrorStrategy
allows to specify the strategy for unhandled BPMN errors:EXCEPTION
- immediately throw an exception;PROPAGATE
- propagate an error to an higher level;IGNORE
- ignore an error and continue an execution.
BpmnError
now contains a process definition ID and an element ID of an error's source.
- a few uninformative log records moved to the
DEBUG
level.
EngineBuilder#wrapDefinitionProviderWith
now can be used to decorate definition providers with some additional functionality like caching (seeCachingIndexedProcessDefinitionProvider
).SourceAwareProcessDefinition
allows to store "source maps" - an additional metadata that links a process definition's source and resulting data structures.
- more tests.
- automatically cleanup free scopes. Reduces the memory footprint and strain on serialization.
IntermediateCatchEvent#messageRefExpression
can now be used to generate event names. The result of evaluation must be aString
.
EndEvent
now can collect the cause of an error with an expression. Such expressions must return an instance ofThrowable
.
ExecutionContext#ERROR_CODE_KEY
removed in favor of#LAST_ERROR_KEY
. The new key is used to retrieve latest handledBpmnError
.
ExecutionContext
now can be accessed from theScriptingExpressionManager
(just like in theDefaultExpressionManager
).SubProcess
now supports out variables.
Event#groupId
renamed toEvent#scopeId
. This may break deserialization of pre-existing data.
- Event scoping is completely rewritten in order to support more complex use cases.
- a convenience constructor:
Edge#(id, elementId, label, waypoints)
. - an optional ability to discard all changes to variables made in a subprocess with the
Subprocess#isUseSeparateContext
flag. - if the
Configuration#throwExceptionOnUnhandledBpmnError
flag is set then any unhandled (e.g. without a boundary error event)BpmnError
will throw anExecutionException
.
VariableMapping
now accepts asourceValue
in case if one needs to pass a raw value into a subprocess.
- additional behaviour tweaks now can be configured via
EngineBuilder#withConfiguration
. - introduced
Configuration#throwExceptionOnErrorEnd
. When enabled, the engine will throw anExecutionException
if process ends with an unhandled error end event. - now it is possible to override a thread pool used by boundary timer events with the
EngineBuilder#withThreadPool
method.
- a new constructor in the
DefaultExpressionManager
class allows customization of EL resolvers. - process definition's attributes now accessible as
ExecutionContext
variables.
- more fine-grained control over process deployment in
EngineRule
. - minor logging improvements.
ProcessDefinition
can now contain additional attributes (e.g. parser's metadata).
- clarify the javadoc on the
ProcessDefinitionProvider#getById
method: it returnsnull
if process is not found instead of throwing an exception.
- new interceptor's method
ExecutionInterceptor#onFailure(businessKey, errorRef)
, called for unhandled BPM errors.
io.takari.bpm.api.interceptors.ElementEvent
renamed toInterceptorElementEvent
.
- disabled caching for indexed instances of
ProcessDefinition
. It will stay disabled until the API provides a way to notify about process changes in an underlying definition store.
- fallback to the activiti's XML namespace when parsing a
ServiceTask
declaration. This change is to ensure compatibility with the latest version of Activiti's BPMN editor.
bpmnjs-compat
module moved to Orchestra as the default BPMN parser.
- fix for boundary error events handling: when no suitable error references are found, a default one is used.
BpmnError#getCause
and the corresponding constructor are added.
- initial support for JSR 223 (scripting for Java) in expressions.
- new method
ExecutionContext#eval
allows evaluation of expressions inJavaDelegate
tasks.
- improved performance of boundary events lookup and handling. About 5% improvement for the most of scenarios.
- complete rewrite of internal state management. API and semantics weren't changed.
- fixed more bugs related to deep nested process handling.
CallActivity#copyAllVariables
flag now can be used to copy all variables from the parent process to the called.
- a bug was preventing deeply-nested processes from handling events correctly.
- minor code and dependencies cleanup.
bpmnjs-compat
module: a bpmn.io compactible xml format parser (only a partial support for the current set of elements).InclusiveGateway
now supports expressions for outgoing flows. Some of outgoingSequenceFlow
can be "inactive" (have their expressions evaluated tofalse
).
io.takari.bpm.leveldb.LevelDbPersistenceManager
-- a serializer removed from its constructor. It wasn't used in any way, just a relic of the past.
- a bug was preventing standalone intermediate catch events from working.
- fix a potential classloader problem while initializing JUEL's ExpressionFactory.
First public release.