UNPKG

workflow-4-node

Version:

Workflow 4 Node is a .NET Workflow Foundation like framework for Node.js. The goal is to reach feature equivalence and beyond.

24 lines (18 loc) 437 B
"use strict"; let Activity = require("./activity"); let util = require("util"); let errors = require("../common/errors"); function Cancel() { Activity.call(this); this.force = false; } util.inherits(Cancel, Activity); Cancel.prototype.run = function(callContext, args) { if (this.force) { callContext.fail(new errors.Cancelled()); } else { callContext.cancel(); } }; module.exports = Cancel;