0.5.25 • Published 6 months ago

@wooksjs/event-wf v0.5.25

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@wooksjs/event-wf

!!! This is work-in-progress library, breaking changes are expected !!!

The @wooksjs/event-wf is a component of the wooks event processing framework built on top of @prostojs/wf. It provides a way to manage complex workflows and processes using the underlying workflow engine.

The primary features of @wooksjs/event-wf include:

  • Support for conditional workflow branching based on dynamic conditions.
  • Support for parametric steps and workflows.
  • Support for user input requirements and interaction during the workflows.

Installation

To install @wooksjs/event-wf, you can use npm:

npm install wooks @wooksjs/event-wf

Quick Start

import { useRouteParams } from '@wooksjs/event-core'
import { createWfApp } from '@wooksjs/event-wf'

const app = createWfApp<{ result: number }>()

app.step('add', {
    input: 'number',
    handler: 'ctx.result += input',
})

app.step('add/:n', {
    handler: (ctx) => {
        ctx.result += Number(useRouteParams().get('n'))
    },
})

app.flow('adding', [
    { id: 'add', input: 5 },
    { id: 'add', input: 2 },
    {
        condition: 'result < 10',
        steps: [{ id: 'add', input: 3 }, { id: 'add', input: 4 }],
    },
])

app.flow('adding-parametric', [
    'add/5',
    'add/2',
    {
        condition: 'result < 10',
        steps: ['add/3', 'add/4'],
    },
])

app.run()

// Run the 'adding' workflow
app.start('adding', { result: 0 })

Documentation

For more detailed documentation, please visit wooks.moost.org.

Contributing

Contributions to the @wooksjs/event-wf project are welcome. If you find any bugs or have a feature request, please open an issue on the GitHub repository.

License

@wooksjs/event-wf is licensed under the MIT license.

0.5.25

6 months ago

0.5.20

6 months ago

0.5.18

7 months ago

0.5.19

6 months ago

0.5.17

7 months ago

0.5.16

7 months ago

0.5.15

7 months ago

0.5.14

7 months ago

0.5.13

12 months ago

0.5.10

12 months ago

0.5.11

12 months ago

0.5.12

12 months ago

0.4.37

1 year ago

0.4.36

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.5.6

12 months ago

0.5.5

1 year ago

0.5.0

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.8

12 months ago

0.5.7

12 months ago

0.5.9

12 months ago

0.4.35

1 year ago

0.4.33

1 year ago

0.4.34

1 year ago

0.4.31

1 year ago

0.4.32

1 year ago

0.4.30

1 year ago

0.4.28

1 year ago

0.4.29

1 year ago

0.4.27

1 year ago

0.4.26

1 year ago

0.4.25

1 year ago

0.4.24

1 year ago

0.4.23

1 year ago

0.4.22

1 year ago

0.4.20

1 year ago

0.4.21

1 year ago

0.4.19

1 year ago

0.4.18

1 year ago

0.4.17

1 year ago

0.4.15

1 year ago

0.4.16

1 year ago

0.4.14

1 year ago

0.4.13

2 years ago

0.4.12

2 years ago

0.4.10

2 years ago

0.4.11

2 years ago

0.4.9

2 years ago

0.4.8

2 years ago

0.4.7

2 years ago

0.4.6

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.12

2 years ago

0.3.11

2 years ago

0.3.10

2 years ago

0.3.9

2 years ago

0.3.8

2 years ago

0.3.7

2 years ago