From 55ce9265cfd6280308b2801543406fc2fb27287f Mon Sep 17 00:00:00 2001 From: ElManu <3786123+manu88@users.noreply.github.com> Date: Mon, 3 Oct 2022 11:18:54 +0200 Subject: [PATCH] expose ExtendLock in task context --- processor/processor.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/processor/processor.go b/processor/processor.go index ca32864..2876f34 100644 --- a/processor/processor.go +++ b/processor/processor.go @@ -82,6 +82,14 @@ func (c *Context) Complete(query QueryComplete) error { }) } +// Extend the lock for a new duration +func (c *Context) ExtendLock(newDurationMS int) error { + return c.client.ExternalTask.ExtendLock(c.Task.Id, camundaclientgo.QueryExtendLock{ + NewDuration: &newDurationMS, + WorkerId: &c.Task.WorkerId, + }) +} + // HandleBPMNError handle external task BPMN error func (c *Context) HandleBPMNError(query QueryHandleBPMNError) error { return c.client.ExternalTask.HandleBPMNError(c.Task.Id, camundaclientgo.QueryHandleBPMNError{