define(["require","exports","tslib"],function(e,r,t){"use strict";function o(){function e(e){e=Error.call(this,e),this.name=e.name,this.message=e.message,this.stack=e.stack}return e.prototype=Error.prototype,e}Object.defineProperty(r,"__esModule",{value:!0});var i,n=(i=o(),t.__extends(s,i),s);function s(){return null!==i&&i.apply(this,arguments)||this}r.ActivityError=n;var a,c=(a=n,t.__extends(p,a),p);function p(){return null!==a&&a.apply(this,arguments)||this}(r.ActivityCancellationError=c).prototype.message="[WF: activity cancellation error] The activity was cancelled.",c.prototype.code="WF: activity cancellation error";var d,c=(d=n,t.__extends(l,d),l);function l(e,r){var t=d.call(this)||this;return t.code=e||"WF: activity error",t.message="["+t.code+"] "+(r||"Some errors occurred."),t}r.GenericActivityError=c;var v,c=(v=o(),t.__extends(u,v),u);function u(){return null!==v&&v.apply(this,arguments)||this}(r.ProgramStartError=c).prototype.code="WF: start error",c.prototype.message="[WF: start error] The given workflow program contains no start point and none was given in the options.";var h,c=(h=o(),t.__extends(m,h),m);function m(){return null!==h&&h.apply(this,arguments)||this}(r.UnspecifiedError=c).prototype.code="WF: unspecified error",c.prototype.message="[WF: unspecified error] The given workflow program completed with an unspecified error.";var y,c=(y=n,t.__extends(g,y),g);function g(e,r,t){var o=y.call(this)||this;return o.action=r,o.error=t,o}(r.ActivityBindingError=c).prototype.code="WF: binding error",c.prototype.message="[WF: binding error] The given workflow program contains some activities which are not valid.";var _,c=(_=o(),t.__extends(f,_),f);function f(e){var r=_.call(this)||this;return r.error=e,r}(r.EngineRuntimeError=c).prototype.code="WF: runtime error",c.prototype.message="[WF: runtime error] The workflow engine experienced an internal error.";var x,c=(x=o(),t.__extends(E,x),E);function E(e){var r=x.call(this)||this;return r.error=e,r}(r.ProgramParserError=c).prototype.code="WF: parser error",c.prototype.message="[WF: parsing error] The given workflow program could not be parsed.";var F,c=(F=n,t.__extends(W,F),W);function W(e,r,t,o){var i=F.call(this)||this;return i.activityId=e,i.inputName=r,i.expression=t,i.error=o,i.code="WF: expression evaluation error",i.message="["+i.code+"] The given expression could not be evaluated.",t&&(i.message+=' "'+t+'"'),o&&o.message&&(i.message+=" "+o.message),i}r.ExpressionEvaluationError=c;var w,c=(w=n,t.__extends(T,w),T);function T(e,r,t,o){var i=w.call(this)||this;return i.activityId=e,i.inputName=r,i.expression=t,i.error=o,i.code="WF: expression syntax error",i.message="["+i.code+"] The given expression could not be parsed.",t&&(i.message+=' "'+t+'"'),o&&o.message&&(i.message+=" "+o.message),i}r.ExpressionSyntaxError=c;var A,c=(A=n,t.__extends(b,A),b);function b(e,r,t,o){var i=A.call(this)||this;return i.activityId=e,i.accessorName=r,i.error=t,i.code="WF: expression accessor error",i.message="["+i.code+"] The requested accessor could not be resolved.",i.error=t,i.errors=o,i}r.ExpressionAccessorError=c;var k,c=(k=n,t.__extends(I,k),I);function I(e,r,t){var o=k.call(this)||this;return o.activityId=e,o.type=r,o.error=t,o.code="WF: activity activation error",o.message="["+o.code+"] The requested facility could not be activated.",o.error=t,o}r.ActivityActivationError=c;var N,c=(N=n,t.__extends(P,N),P);function P(e,r){var t=N.call(this)||this;return t.activityId=e,t.code="WF: aggregate error",t.message="["+t.code+"] The activity experienced multiple errors.",t.errors=r,t}r.AggregateActivityError=c;var q,c=(q=n,t.__extends(S,q),S);function S(e,r){var t=q.call(this)||this;return t.inputName=e,t.assertion=r,t}(r.ActivityInputError=c).prototype.code="WF: activity input error",c.prototype.message="[WF: activity input error] The activity has invalid inputs.";var j,t=(j=n,t.__extends(B,j),B);function B(e){var r=j.call(this)||this;return r.message="[WF: activity not implemented] The "+e+" activity has not been implemented.",r}(r.ActivityNotImplementedError=t).prototype.code="WF: activity not implemented"});