From 82766b1e834efaff0ed186a59b9185de9793ddc2 Mon Sep 17 00:00:00 2001 From: Lukas Giger Date: Thu, 31 Oct 2024 12:57:44 +0100 Subject: [PATCH] replace `IvyAsyncRunner` with `IvyAsyncExecutor` --- .../connectivity/rest/aynch/SignalInvoker.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/connectivity/connectivity-demos/src/com/axonivy/connectivity/rest/aynch/SignalInvoker.java b/connectivity/connectivity-demos/src/com/axonivy/connectivity/rest/aynch/SignalInvoker.java index 3a37a4b6a..0b0cbf879 100644 --- a/connectivity/connectivity-demos/src/com/axonivy/connectivity/rest/aynch/SignalInvoker.java +++ b/connectivity/connectivity-demos/src/com/axonivy/connectivity/rest/aynch/SignalInvoker.java @@ -4,14 +4,14 @@ import ch.ivyteam.ivy.environment.Ivy; import ch.ivyteam.ivy.process.model.value.SignalCode; -import ch.ivyteam.util.threadcontext.IvyAsyncRunner; +import ch.ivyteam.ivy.request.async.IvyAsyncExecutor; /** * Fires a signal to the BPM Engine when the result of an asynchronous REST * request is available. * *

- * Async callback methods use the {@link IvyAsyncRunner} to avoid + * Async callback methods use the {@link IvyAsyncExecutor} to avoid * environment not available exceptions. *

* @@ -25,7 +25,7 @@ public class SignalInvoker implements InvocationCallback { private final SignalCode successSignal; private final SignalCode errorSignal; - private final IvyAsyncRunner asyncRunner; + private final IvyAsyncExecutor asyncExecutor; public SignalInvoker(String successSignal) { @@ -36,19 +36,19 @@ public SignalInvoker(String successSignal, String errorSignal) { this.successSignal = new SignalCode(successSignal); this.errorSignal = new SignalCode(errorSignal); - this.asyncRunner = new IvyAsyncRunner(); + this.asyncExecutor = IvyAsyncExecutor.create(); } @Override public void completed(String response) { - asyncRunner.run(() -> Ivy.wf().signals().send(successSignal, response)); + asyncExecutor.run(() -> Ivy.wf().signals().send(successSignal, response)); } @Override public void failed(Throwable throwable) { - asyncRunner.run(() -> Ivy.wf().signals().send(errorSignal, throwable)); + asyncExecutor.run(() -> Ivy.wf().signals().send(errorSignal, throwable)); } }