https://github.com/retro/tasquencer
https://github.com/retro/tasquencer
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/retro/tasquencer
- Owner: retro
- Created: 2023-03-22T00:10:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-22T07:53:33.000Z (9 months ago)
- Last Synced: 2025-05-05T01:05:53.376Z (about 1 month ago)
- Language: TypeScript
- Size: 1.43 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Tasquencer
A BPM library for Node based on the concepts from https://yawlfoundation.github.io/.
- Implemented with a "code-first" approach
- Minimal - implements only the flow control concepts, everything else should be implemented in user space codeExample:
```typescript
const workflowDefinition = Builder.workflow<{
shouldBookFlight: boolean;
shouldBookCar: boolean;
}>()
.withName('or-split-join')
.startCondition('start')
.task('register', Builder.emptyTask().withSplitType('or'))
.task('book_flight', Builder.emptyTask())
.task('book_hotel', Builder.emptyTask())
.task('book_car', Builder.emptyTask())
.task('pay', Builder.emptyTask().withJoinType('or'))
.endCondition('end')
.connectCondition('start', (to) => to.task('register'))
.connectTask('register', (to) =>
to
.task('book_flight', ({ context }) =>
Effect.succeed(context.shouldBookFlight)
)
.task('book_car', ({ context }) => Effect.succeed(context.shouldBookCar))
.defaultTask('book_hotel')
)
.connectTask('book_flight', (to) => to.task('pay'))
.connectTask('book_hotel', (to) => to.task('pay'))
.connectTask('book_car', (to) => to.task('pay'))
.connectTask('pay', (to) => to.condition('end'));
```Still very much a work in progress, but public API is stable.