@tinyflow/instances

1.0.0 • Public • Published

Tinyflow Instances

A simple Tinyflow extension to manage instances.

Installation

The package is released at the npm registry as @tinyflow/instances.

You can follow the installation instructions in the main readme.

Usage

First register the extension:

import { Tinyflow } from '@tinyflow/core'
import { withInstances } from '@tinyflow/instances'

const removeExtension = Tinyflow.extend(withInstances())

// ...you may later remove this extension:
removeExtension()

After that, you can manage instances via the Tinyflow object:

let wf = Tinyflow.create({
  name: 'foo',
  steps: { one: {}, two: {} }
})

const instanceId = wf.id

// ... somewhere later in code
wf = Tinyflow.get(instanceId)

// or dispose the instance
Tinyflow.dispose(instanceId)

API Docs

See the full the API documentation as

Package Sidebar

Install

npm i @tinyflow/instances

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

61.2 kB

Total Files

18

Last publish

Collaborators

  • jkuester