Comparing version 0.5.13 to 0.5.14
@@ -75,6 +75,6 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var start, context, result, taskId, state, mutation; | ||
var _a; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
var start, context, result, taskId, _a, mutation; | ||
var _b; | ||
return __generator(this, function (_c) { | ||
switch (_c.label) { | ||
case 0: | ||
@@ -98,10 +98,13 @@ start = this.process.nodes[0]; | ||
case 1: | ||
result = _b.sent(); | ||
result = _c.sent(); | ||
taskId = this.findNextTaskId(start._id); | ||
ctx.updateContextState(context, (_a = {}, _a["outputs.start"] = result, _a)); | ||
ctx.updateContextState(context, (_b = {}, _b["outputs.start"] = result, _b)); | ||
ctx.updateContextState(context, { created: Date.now() }); | ||
ctx.addEvent(context, { task: taskId, subtask: null }); | ||
// create inital state in db | ||
_a = context; | ||
return [4 /*yield*/, this.modifier.createProcess(context.state)]; | ||
case 2: | ||
state = _b.sent(); | ||
// create inital state in db | ||
_a.state = _c.sent(); | ||
mutation = Journal_1.squashMutations(context.state, context.journal); | ||
@@ -111,7 +114,7 @@ mutation.message = 'start.init.running'; | ||
case 3: | ||
_b.sent(); | ||
return [4 /*yield*/, this.emittNotifier(state)]; | ||
_c.sent(); | ||
return [4 /*yield*/, this.emittNotifier(context.state)]; | ||
case 4: | ||
_b.sent(); | ||
return [2 /*return*/, state]; | ||
_c.sent(); | ||
return [2 /*return*/, context.state]; | ||
} | ||
@@ -118,0 +121,0 @@ }); |
{ | ||
"name": "gent-core", | ||
"version": "0.5.13", | ||
"version": "0.5.14", | ||
"description": "Library for simple business processes implementation", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82007
1838