diff --git a/src/core/actions/package.json b/src/core/actions/package.json index 6791c0a..ed2afad 100644 --- a/src/core/actions/package.json +++ b/src/core/actions/package.json @@ -1,6 +1,6 @@ { "name": "@wbce/orbits-core", - "version": "0.0.20", + "version": "0.0.21", "description": "Flow for DevOps - a simple way to write state machine", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/core/actions/src/action-manager.ts b/src/core/actions/src/action-manager.ts index 4f722e4..ebcd25e 100644 --- a/src/core/actions/src/action-manager.ts +++ b/src/core/actions/src/action-manager.ts @@ -243,8 +243,7 @@ export class Action{ } else{ this.dbDoc.$isDeleted(true); - } - + } }) } diff --git a/src/core/actions/src/workflow-manager.ts b/src/core/actions/src/workflow-manager.ts index cf00db1..ca6cd46 100644 --- a/src/core/actions/src/workflow-manager.ts +++ b/src/core/actions/src/workflow-manager.ts @@ -272,14 +272,14 @@ export class Workflow extends Action{ } return Promise.all(svgdsPromise) }).then(()=>Promise.resolve());//le then est une question de typage pour conformite mongoose + }).finally(()=>{ + return this.resyncWithDb(); }) }).finally(()=>{ this.docsToSaveAtStepStart = []; if(this.dBSession){ return this.dBSession.endSession() } - }).finally(()=>{ - return this.resyncWithDb(); }).then(()=>{ this.internalLog(`state changed`); this.internalLog(`step started : ${this.dbDoc.bag.currentStepIndex}`);