paed01 / bpmn-engine

BPMN 2.0 execution engine. Open source javascript workflow engine.
MIT License
860 stars 166 forks source link

ExclusiveGateway, sequenceFlow with custom conditionExpression language. #173

Closed py6jlb closed 1 year ago

py6jlb commented 1 year ago

Hello! I found the aircall-expression-parser lib, but I don't understand how to replace the standard resolver. I use bpmn-engine with bpmn-elements. And maybe you add example how add own extended sequenceFlow element, and use it with bpmn-engine.

paed01 commented 1 year ago
import { Engine } from 'bpmn-engine';
import { resolveExpression } from '@aircall/expression-parser';

const engine = new Engine({
  /* ...otherRequiredOptions */
  expressions: {
    resolveExpression,
  },
});
py6jlb commented 1 year ago

Thanks, very helpful. And you can also see an example of how to use the extended definition(https://github.com/paed01/bpmn-elements/blob/master/docs/Extend.md) together with bpmn-engine.