- delegate Signal within a process
- make sure message flow targeting process works as expected, successful but was not tested
- throw
RunError
ifTimerEventDefinition
timer value parsing fails, referencing the complaining activity in the error source property
Use @0dep/piso
to parse TimerEventDefinition duration and time date.
- previously a
TimerEventDefinition
timeDate date like2024-04-22
was parsed withDate.parse('2024-04-22')
, hence UTC. With piso a date without offset is considered a proper local date - invalid
TimerEventDefinition
type value throws and stops execution instead of stalling and await manual cancel - remove
ISODuration
export
- an activity discarded on enter, e.g. discarded by a BoundaryEvent, continued running, that arrogant behavior was unacceptable and stops now
- hoist process environment output to definition environment on process error
- major update of eslint
- use prettier for formatting rules, touched basically ALL files
- fix another lingering leave message. Now it was the definition execution that kept
process.leave
messages around for sentimental reasons
- found the real reason behind ever groving state size -
activity.leave
messages were not acked by process execution. Doh!
- introduce
disableTrackState
setting. Tracking of elements is done by counters, e.g. activity taken or discarded, sequence flow taken and discarded. Counters are saved when getting state. If you run really big flows the state will keep all elements just to be able to recover the number of times an element has been touched. Needless to say it the state will grow out of it's comfort zone. SettingdisableTrackState
to true will only return state for elements that are actually running
getState()
can return undefined
- export task-, events-, and gateway activity behaviors through
bpmn-elements/tasks
,bpmn-elements/events
, andbpmn-elements/gateways
respectively - refactor type definitions for three days to make the above type safe and VS-code happy. Why is it so freaking complicated? Ambient bla bla bla ts(4-digit-number)??? Looped through all 10.000 ts-typescript errors. Patches are inevitable and imminent
- use
Object.defineProperties
when feasible and skip pointless enumerable option on property
Memory issues running sequential multi-instance sub-process (MISP). All MISP executions are put in a list to be able to save state.
- remove MISP execution from execution reference list when iteration is completed, discarded, or errored
- fix boundary event not cancelling task if resumed before task was resumed
- a cancelled call activity should also cancel the called process even if resumed before called process was resumed later
- bump smqp@8
- update neglected type definition
- slim activity state by removing properties not needed for recover, might be breaking if state is inspected
- slim process state by removing properties not needed for recover, might be breaking if state is inspected
- introduce Lane behaviour
- add process
lanes
property with Lane instances - add activity
lane
property containing a reference to the process lane instance - add activity
parentElement
property referencing parent process or sub process
- drop iso8601-duration dependency and copy source (with licence). Export as
ISODuration
. Extend with repeat pattern parsing, e.g.R3/PT1H
that corresponds to three repetitions every one hour - expose
TimerEventDefinition.parse(timerType, value)
function for extension purposes - prototype and export built-in
Timers
- move outbound sequence flow evaluation logic from activity to sequence flow, where it belongs
- spread sequence flow evaluation result, if object, to sequence flow take message
- type declare execution scope
- allow type IScripts.register to return undefined
- fix type Logger declaration
- type declare element
getState
return states
- refactor compensation and transaction functionality
- fix event based gateway bug when/if a subsequent event completes immediately
- add somewhat expirimental activityStatus property to process and definition, tracked by Tracker that tracks executing, wait, and timer activity
- Turn into module with exports for node
- Add basic type declaration, still learning
- return Api instance for Message- and Association flows, as stated by type declaration
- allow process to start before receiving api messages, should fix issue #32
- fix resumed boundary event initialized twice even if it's completed
- fix process lingering completed activities after resume
- mitigate possible stack overflow error by not acking message before publishing a new one. Fix after fix #31
- fix resume on caught activity error throws #31
- fix resume when activity has formatting status, extensions were not re-activated
- fix InputOutputSpecification output now passed as dataOutput instead of dataInput, as it should
- refactor Extensions loading, bpmn io is now pushed to the end of the extensions list
- support non-interrupting BoundaryEvent with ISO8601 repeating interval timeCycle
- fix activity stuck in async formatting when resuming, preventing it to complete
- all processes will invoked with a cloned context and environment
- a cloned environment will no longer forward output
- remove output prop from process state. Not sure why it was there in the first place?
- remove mysterious options symbol from Environment
- fix double completion if resumed on error
Support Call activity
- prototype all behaviours
- add api fail function
- all Behaviours will be invoked with new
- unable to make activity throw if emitFatal is called within activity, unsure why?
- Signals are now broadcasted to multiple targets, previously it stopped at first catch
Isomorphism and state.
- Stop calling
setTimeout.call(owner, ...args)
in default Timers.js. Doesn't work in browsers and results inTypeError: Illegal invocation
. Hence, timeout callback context is no longer the owner of the timer. Altough, it works fine in nodejs. So feel free to build your own Timers and pass it as an option. - Removed sequence flow function
evaluateCondition
since it not used and was inconsistent. UsegetCondition().execute(...args)
instead. - Generate a slimmer state. Element broker state now only contains queues that have pending messages and sometimes an exchange with undelivered message. Not really breaking unless broker state was inspected for some reason
- Sequence flow with expression condition that throws will now terminate the run
- Association counters were flipped
- add basic support for bpmn:Property, bpmn:DataStore, and bpmn:DataStoreReference
- bump smqp to even less CPU intense version
- fix shake routing key pattern bug
- stop building with node 10 (mocha)
- bump smqp to less CPU intense version
Sequential loop trouble.
- Fix nasty bug in sequential multi-instance loop where it ran to infinity when cardinality is set to 0. Thank you @deelef for uncovering this!
- set cardinality to collection length if cardinality expression resolved to nothing
- Support
bpmn:Group
as dummy placeholder - Support
bpmn:Category
as dummy placeholder
Improved expression handling by @javierlopezaircall
- expression function call with string argument containing commas is now supported
Multi-/Standard-loop characteristics.
- Cardinality and/or a collection is now required if designing a parallel multi instance loop
- Start throwing error when cardinality is invalid, so no need for TS yet...
- Introduce new setting to control parallel loop batch size, defaults to 50
- Fixed bug where multi instance parallel loop stalled when more than 100 iterations where required
- wrestling with 4.4.1 edge case
- smqp retains undelivered execute.timer message in exchange when state is saved... eh, just fixed resume timers hard-to-explain-edge-case
improve expression handling
- cover false as expression function argument
- Fix multiple start events not completing process. Diverging flows to different ends stalled execution
- Bump
smqp@3.2
- For some anxious reason parallel join gateways were initialized over and over again when inbound flows were touched. This stops now. A recovered and resumed run can now continue instead of waiting for neurotic joins. Thankyou @mdwheele for this discovery.
- Stop throwing errors when failing to parse
timeDuration
ortimeDate
as it was before and still should've been before someone changed it
Timetracking
- New environment timers property with tracked
setTimeout
andclearTimeout
. Used by TimerEventDefinition and by inline scripts if necessary
Flaky formatting
- Add tests for formatting workaround by publishing directly to
format-run-q
- Support formatting failure by adding
errorRoutingKey
or just publish format message with routing key ending in.error
Outbound sequence flows again.
- Remove redundant outbound sequence flow logic in Inclusive- and ExclusiveGateway. Flag ExclusiveGateway that only one should be taken
- If no outbound sequence was taken when activity completes the activity will throw. As it did in the above gateways. This might break stuff, but I guess it actually should
- Wrap conditional sequence flow script error in an Activity error
- Return something else than undefined when calling definition run (!). The definition is returned.
- Formatting message on activity end resulted in nasty bug where outbound flows were affected and run stopped prematurely. This stops now.
- Make sure resumed activity wait events are emitted with a flag indicating that they are resumed -
content.isRecovered
. Can facilitate decisions regarding save state and stop. A more proper name would've beenisResumed
butisRecovered
was used bySignalTask
. No need for a breaking major for this small addition
Refactor scripts again
- ScriptTask now requires that a script is returned by Script handler can off course return a dummy function
- Conditional SequnceFlow respects script if returned by script handler
- All sequence flows with condition, regardless of language, can use script condition using register function. If condition language is stipulated then script is required.
- Outbound sequence flow with script condition requires
next(err, result)
to be called where result decides if it should be taken or discarded
- Outbound sequence flow conditions are evaluated for all activities, as well as default flow
- Process now also have
cancelActivity
function for facilitation
Transactions and compensation if cancelled.
- Add support for Transaction
- Add support for CancelEventDefinition
Diagram sequence flow order affects recover as per engine issue 105.
- Refactored outbound flow handling to an extent that flows are now taken and discarded before leaving the activity run
- As an effect of above - SequenceFlow pre flight event disappeared
- Bonus: Make EventBasedGateway behave as it should
- Resumed definition with multiple loopbacks ran towards infinity, thats now finit as expected since there is an end to the fun. Thankyou @aowakennomai for uncovering bug
- Publish
definition.resume
event when Definition is resumed
- Include input when throwing signal or message
Run a non-executable process.
- Add support for runnning a process that is NOT marked as executable by calling
definition.run({processId})
- Multiple start events were not resumed in an orderly fashion when recovered, process was stuck, but is no more
- Include occasional sub process sequence when shaking activities
TimerEventDefinition timeDate
and timeCycle
.
- Add support for TimerEventDefinition
timeDate
. Will behave liketimeDuration
unless the date is due - timeout - TimerEventDefinition
timeCycle
is recognized but no timer is started. The non-action is due to uncertainty regarding cycle format. The event definition is stalled and waits for cancel - New
cancelActivity
function is added to definition - TimerEventDefinition now recognises api cancel calls. Which comes in handy if a time cycle is identified and needs to continue
- a start event with form that is waiting for input can now also be signaled from definition
- Add shake functionality to definition to facilitate getting the run sequences of an activity or processes by calling
definition.shake([activityId])
- Bump to smqp@3
- Patch copyright year
Make it easier and possible to signal activities from definition by calling definition.signal(message)
.
- MessageEventDefinition and SignalEventDefinition will only listens for pre-execution messages if contained in a starting event
- Parallel looped ReceiveTask iterations all completed with one message, that was not intended and doesn't anymore. One message equals one completed iteration
- Bump to smqp@2.2
- Bump dev dependencies
- Bump to smqp@2
- Bump dev dependencies
- Patch
moddle-context-serializer
to relieve project from nasty bug where message flows sourcing from empty lane threw find of undefined
- Allow override of default expression handling and parsing
- Map BusinessRuleTask to ServiceTask
- Execute extensions when initiating process
- Recover now recovers environment as well
- getting state no longer throws if a placeholder activity is in activities
- Compensation is now supported, but only by association
- Fix weird code where context ignores passed SequenceFlow and MessageFlow Behaviour function when making new instances
- Expose SequenceFlow name in published events and in api
- Support StandardLoopCondition
- Support LinkEventDefinition
- Defensive resume #8
Focused on messaging.
- ReceiveTask expects referenced message, it can still be signaled
- IntermediateCatchEvent that lacks event definitions now expects to be signaled
- Catching MessageEventDefinition expects referenced message. or at least a matching message id
- IntermediateThrowEvent with MessageEventDefinition now throws Message
- Start activities conforming to the same flow is discarded when the flow reaches an end activity, unless a join is put in between
- allow a waiting UserTask to trigger an execution error
- catch signal fired before event execution
- Catching ErrorEventDefinition now catches BpmnErrors. Support for catching by error code and anonymous errors is still supported
- Event with throwing ErrorEventDefinition now throws non-fatal BpmnErrors
- Expose element name on Api
- Extension function
deactivate
is now actually called, called on leave and stop