2.1.1 • Published 5 years ago
flowbject v2.1.1
Flowbject
Flowbject is a high-level library whose aim is to help with writing state-machine flows. The concept is based on Amazon-State-Language.
It provides a more convenient way to write and manipulate states. The state-machine JSON extraction is encapsulated in hydrators and allows the integration of multiple API languages such as AWS-StepFunctions.
Installation
npm install flowbject
Usage
Here is an example how to build a state-machine and extract the language-specifications to AWS-StepFunctions.
import { StateMachine, Pass, AWSStepFunctionsHydratorManager } from "flowbject";
const stateMachine = new StateMachine({
autoLink: true,
comment: 'A Hello World example of the Amazon States Language using a Pass state'
});
const helloWorld = (new Pass('HelloWorld')).result.set('Hello World!')
stateMachine.states.add(helloWorld);
const manager = new AWSStepFunctionsHydratorManager();
const result = manager.extractStateMachine(stateMachine);
Results:
{
"Comment": "A Hello Worldexample of the Amazon States Language using a Pass state",
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Result": "Hello World!",
"End": true,
"Type": "Pass"
}
}
}
2.1.1
5 years ago
2.1.0
6 years ago
2.0.6
6 years ago
2.0.5
6 years ago
2.0.4
6 years ago
2.0.3
6 years ago
2.0.2
6 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.2.0-1
6 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago