@tinyflow/instances
v1.0.0
Published
Basic instances management for Tinyflow.
Downloads
1
Maintainers
Readme
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