File tree Expand file tree Collapse file tree 3 files changed +5
-15
lines changed
http/src/main/java/io/serverlessworkflow/impl/executors/http
openapi/src/main/java/io/serverlessworkflow/impl/executors/openapi Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Original file line number Diff line number Diff line change 1515 */
1616package io .serverlessworkflow .impl .executors .http ;
1717
18- import static io .serverlessworkflow .impl .executors .http .HttpExecutor .client ;
19-
18+ import io .serverlessworkflow .api .types .UriTemplate ;
2019import io .serverlessworkflow .impl .TaskContext ;
2120import io .serverlessworkflow .impl .WorkflowContext ;
2221import io .serverlessworkflow .impl .WorkflowModel ;
@@ -32,6 +31,8 @@ public ExpressionURISupplier(WorkflowValueResolver<String> expr) {
3231
3332 @ Override
3433 public WebTarget apply (WorkflowContext workflow , TaskContext task , WorkflowModel node ) {
35- return client .target (expr .apply (workflow , task , node ));
34+ return HttpExecutor .getURISupplier (
35+ new UriTemplate ().withLiteralUriTemplate (expr .apply (workflow , task , node )))
36+ .apply (workflow , task , node );
3637 }
3738}
Original file line number Diff line number Diff line change 4747
4848public class HttpExecutor implements CallableTask <CallHTTP > {
4949
50- public static final Client client = ClientBuilder .newClient ();
50+ private static final Client client = ClientBuilder .newClient ();
5151
5252 private TargetSupplier targetSupplier ;
5353 private Optional <WorkflowValueResolver <Map <String , Object >>> headersMap ;
Original file line number Diff line number Diff line change 2424import io .serverlessworkflow .api .types .Headers ;
2525import io .serverlessworkflow .api .types .Query ;
2626import io .serverlessworkflow .api .types .ReferenceableAuthenticationPolicy ;
27- import io .serverlessworkflow .api .types .TaskTimeout ;
28- import io .serverlessworkflow .api .types .Timeout ;
29- import io .serverlessworkflow .api .types .TimeoutAfter ;
3027import io .serverlessworkflow .api .types .UriTemplate ;
3128import io .swagger .v3 .oas .models .media .Schema ;
3229import io .swagger .v3 .oas .models .parameters .Parameter ;
@@ -85,14 +82,6 @@ CallHTTP build() {
8582
8683 addTarget (endpoint );
8784
88- TaskTimeout taskTimeout = new TaskTimeout ();
89- Timeout timeout = new Timeout ();
90- taskTimeout .withTaskTimeoutDefinition (timeout );
91- TimeoutAfter timeoutAfter = new TimeoutAfter ();
92- timeout .setAfter (timeoutAfter );
93- timeoutAfter .withDurationExpression ("PT30S" );
94- callHTTP .setTimeout (taskTimeout );
95-
9685 return callHTTP ;
9786 }
9887
You can’t perform that action at this time.
0 commit comments