public class DefaultCmmnHttpActivityDelegate extends BaseHttpActivityDelegate implements PlanItemFutureJavaDelegate<BaseHttpActivityDelegate.ExecutionData>
BaseHttpActivityDelegate.ExecutionDatadisallowRedirects, failStatusCodes, handleStatusCodes, HTTP_TASK_REQUEST_FIELD_INVALID, HTTP_TASK_REQUEST_HEADERS_INVALID, HTTP_TASK_REQUEST_METHOD_INVALID, HTTP_TASK_REQUEST_METHOD_REQUIRED, HTTP_TASK_REQUEST_URL_REQUIRED, httpClient, ignoreException, requestBody, requestBodyEncoding, requestHeaders, requestMethod, requestTimeout, requestUrl, responseVariableName, resultVariablePrefix, saveRequestVariables, saveResponseParameters, saveResponseParametersTransient, saveResponseVariableAsJson| Constructor and Description |
|---|
DefaultCmmnHttpActivityDelegate() |
DefaultCmmnHttpActivityDelegate(FlowableHttpClient httpClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterExecution(DelegatePlanItemInstance planItemInstance,
BaseHttpActivityDelegate.ExecutionData result)
Method invoked with the result from
PlanItemFutureJavaDelegate.execute(DelegatePlanItemInstance, AsyncTaskInvoker). |
protected FlowableHttpClient |
createHttpClient() |
protected HttpRequestHandler |
createHttpRequestHandler(FlowableHttpRequestHandler handler,
CmmnEngineConfiguration cmmnEngineConfiguration) |
protected HttpResponseHandler |
createHttpResponseHandler(FlowableHttpResponseHandler handler,
CmmnEngineConfiguration cmmnEngineConfiguration) |
CompletableFuture<BaseHttpActivityDelegate.ExecutionData> |
execute(DelegatePlanItemInstance planItemInstance,
AsyncTaskInvoker taskInvoker)
Perform the execution of the delegate, potentially on another thread.
|
protected void |
propagateError(VariableContainer container,
String code) |
createRequest, getRequestHeaders, prepareAndExecuteRequest, saveResponseFields, validateRequestpublic DefaultCmmnHttpActivityDelegate()
public DefaultCmmnHttpActivityDelegate(FlowableHttpClient httpClient)
protected FlowableHttpClient createHttpClient()
createHttpClient in class BaseHttpActivityDelegatepublic CompletableFuture<BaseHttpActivityDelegate.ExecutionData> execute(DelegatePlanItemInstance planItemInstance, AsyncTaskInvoker taskInvoker)
PlanItemFutureJavaDelegatePlanItemFutureJavaDelegate.afterExecution(DelegatePlanItemInstance, Object) in order to store
the data on the planItemInstance on the same thread as the caller of this method.
IMPORTANT: the planItemInstance should only be used to read data before creating the future.
The planItemInstance should not be used in the task that will be executed on a new thread.
The AsyncTaskInvoker is in order to schedule an execution on a different thread.
However, it is also possible to use a different scheduler, or return a future not created by the given taskInvoker.
execute in interface PlanItemFutureJavaDelegate<BaseHttpActivityDelegate.ExecutionData>planItemInstance - the planItemInstance that can be used to extract datataskInvoker - the task invoker that can be used to execute expensive operation on another threadpublic void afterExecution(DelegatePlanItemInstance planItemInstance, BaseHttpActivityDelegate.ExecutionData result)
PlanItemFutureJavaDelegatePlanItemFutureJavaDelegate.execute(DelegatePlanItemInstance, AsyncTaskInvoker).
This should be used to set data on the DelegatePlanItemInstance.
This is on the same thread as PlanItemFutureJavaDelegate.execute(DelegatePlanItemInstance, AsyncTaskInvoker) and participates in the case transaction.afterExecution in interface PlanItemFutureJavaDelegate<BaseHttpActivityDelegate.ExecutionData>planItemInstance - the planItemInstance to which data can be setresult - the execution dataprotected HttpRequestHandler createHttpRequestHandler(FlowableHttpRequestHandler handler, CmmnEngineConfiguration cmmnEngineConfiguration)
protected HttpResponseHandler createHttpResponseHandler(FlowableHttpResponseHandler handler, CmmnEngineConfiguration cmmnEngineConfiguration)
protected void propagateError(VariableContainer container, String code)
propagateError in class BaseHttpActivityDelegateCopyright © 2023 Flowable. All rights reserved.