Skip to content

Commit 2c6e265

Browse files
committed
docs, samples
1 parent c40f3e3 commit 2c6e265

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build Status](https://travis-ci.org/danielgerlag/workflow-es.svg?branch=master)](https://travis-ci.org/danielgerlag/workflow-es)
44

5-
Workflow ES is a workflow / durable task library for Node.js (or modern browsers). It supports pluggable persistence and concurrency providers to allow for multi-node clusters.
5+
Workflow ES is a workflow / saga library for Node.js (or modern browsers). It supports pluggable persistence and concurrency providers to allow for multi-node clusters.
66

77
## Installing
88

core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build Status](https://travis-ci.org/danielgerlag/workflow-es.svg?branch=master)](https://travis-ci.org/danielgerlag/workflow-es)
44

5-
Workflow ES is a workflow / durable task library for Node.js (or modern browsers). It supports pluggable persistence and concurrency providers to allow for multi-node clusters.
5+
Workflow ES is a workflow / saga library for Node.js (or modern browsers). It supports pluggable persistence and concurrency providers to allow for multi-node clusters.
66

77
## Installing
88

core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"test": "jasmine"
1111
},
1212
"keywords": [
13-
"workflow"
13+
"workflow", "saga"
1414
],
1515
"author": {
1616
"email": "[email protected]",

core/src/models/execution-pointer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ export class ExecutionPointer {
1414
public eventData: any;
1515
public outcome: any;
1616
public stepName: string;
17-
public retryCount: number;
17+
public retryCount: number = 0;
1818
public children: string[] = [];
1919
public contextItem: any;
2020
public predecessorId: string;
2121
public scope: string[] = [];
22-
public status: number;
22+
public status: number = 0;
2323
}
2424

2525
export var PointerStatus = {

core/src/models/workflow-step.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export abstract class WorkflowStepBase {
1616
public outcomes: Array<StepOutcome> = [];
1717
public children: Array<number> = [];
1818
public errorBehavior : number;
19-
public retryInterval : number;
19+
public retryInterval : number = 60000;
2020
public compensationStepId : number;
2121

2222
public inputs: Array<(step: StepBody, data: any) => void> = [];

samples/node.js/javascript/12-saga.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const workflow_es = require("workflow-es");
2-
//const workflow_mongo = require("workflow-es-mongodb");
2+
const workflow_mongo = require("workflow-es-mongodb");
33

44

55
class SayHello extends workflow_es.StepBody {
@@ -57,14 +57,17 @@ class Saga_Workflow {
5757
.saga(saga => saga
5858
.startWith(DoSomething)
5959
.then(DoSomethingBad)
60-
)
60+
)
6161
.compensateWith(UndoSomething)
6262
.then(SayGoodbye);
6363
}
6464
}
6565

6666
async function main() {
6767
var config = workflow_es.configureWorkflow();
68+
//let mongoPersistence = new workflow_mongo.MongoDBPersistence("mongodb://127.0.0.1:27017/workflow-node");
69+
//await mongoPersistence.connect;
70+
//config.usePersistence(mongoPersistence);
6871
var host = config.getHost();
6972

7073
host.registerWorkflow(Saga_Workflow);

0 commit comments

Comments
 (0)