diff --git a/OpenFlow/src/Messages/Message.ts b/OpenFlow/src/Messages/Message.ts index a5e01b0e..4b25e404 100644 --- a/OpenFlow/src/Messages/Message.ts +++ b/OpenFlow/src/Messages/Message.ts @@ -4932,11 +4932,11 @@ export class Message { } else if (["failed", "successful", "retry", "processing"].indexOf(msg.state) == -1) { throw new Error("Illegal state " + msg.state + " on Workitem, must be failed, successful, processing or retry"); } - if (msg.errortype == "business" && msg.state == "retry" && msg.ignoremaxretries == false) msg.state = "failed"; + if (msg.errortype == "business" && msg.state == "retry" && msg.ignoremaxretries != true) msg.state = "failed"; // if (msg.errortype == "business" && msg.ignoremaxretries == false) msg.state = "failed"; if (msg.state == "retry") { if (NoderedUtil.IsNullEmpty(wi.retries)) wi.retries = 0; - if (wi.retries < wiq.maxretries || msg.ignoremaxretries) { + if ((wi.retries + 1) < wiq.maxretries || msg.ignoremaxretries) { wi.retries += 1; retry = true; wi.state = "new";