Skip to content

Commit

Permalink
refactor to prototype
Browse files Browse the repository at this point in the history
- add participant information to message flow
- add lane information to activity
  • Loading branch information
paed01 committed Jan 22, 2022
1 parent 91b5707 commit 975221c
Show file tree
Hide file tree
Showing 16 changed files with 2,160 additions and 1,570 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -32,3 +32,4 @@ coverage*

package-lock.json
.nyc_output
*.log
11 changes: 5 additions & 6 deletions API.md
Expand Up @@ -21,6 +21,7 @@ Result:
- `id`: Definition id
- `type`: Definition type
- `name`: Definition name
- `elements`: object with elements
- [`getActivities([scopeId])`](#getactivitiesscopeid): get activities
- `getActivityById(activityId)`: get activity by id
- `getAssociationById(associationId)`: get association by id
Expand Down Expand Up @@ -72,11 +73,9 @@ Get all definition activities or pass `scopeId` to get scoped activities. Where

### `getExtendContext()`

Get all definition activities or pass `scopeId` to get scoped activities. Where `scopeId` can be a process or a sub-process.

Returns object with:
- `scripts`: list of known scripts, can be mutated
- `timers`: list of known timers, can be mutated
Returns an ExtendContext instance:
- `scripts`: list of known scripts
- `timers`: list of known timers
- `addScript(name, script)`: function to add a script to the global context, can be retrieved by `getScripts([elementType])` or `getScriptsByElementId(elementId)`
- `addTimer(name, timer)`: function to add a timer to the global context, can be retrieved by `getScripts([elementType])` or `getScriptsByElementId(elementId)`

Expand All @@ -95,7 +94,7 @@ Arguments:

#### addTimer(name, timer)

Add known script.
Add known timer.

Arguments:
- `name`: name of script
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
@@ -1,10 +1,26 @@
Changelog
=========

<<<<<<< HEAD
# 1.1.1

- add support for `bpmn:dataStore`
- remove dataStore prop if none
=======
# 2.0.0

Handle participants add add participant information to message flows. To reduce CPU footprint the api is prototyped.

## Breaking:
- returned api is prototyped
- second argument passed to extendFn and result of `getExtendContext` is now an instance of ExtendContext. Hence, you are not able to deconstruct `addScript` and/or `addTimers` functions anymore.

## Additions:
- add participant id and name to `bpmn:MessageFlow`
- elements are exposed in new api elements property
- expose participants in elements property
- add lane information to activity
>>>>>>> refactor to prototype
# 1.1.0

Expand Down

0 comments on commit 975221c

Please sign in to comment.