public class DefaultBpmnHttpActivityDelegate extends BaseHttpActivityDelegate implements FutureJavaDelegate<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 |
|---|
DefaultBpmnHttpActivityDelegate() |
DefaultBpmnHttpActivityDelegate(FlowableHttpClient httpClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterExecution(DelegateExecution execution,
BaseHttpActivityDelegate.ExecutionData result)
Method invoked with the result from
FutureJavaDelegate.execute(DelegateExecution, AsyncTaskInvoker). |
protected List<FieldDeclaration> |
createFieldDeclarations(List<org.flowable.bpmn.model.FieldExtension> fieldList,
ProcessEngineConfigurationImpl processEngineConfiguration) |
protected FlowableHttpClient |
createHttpClient() |
protected HttpRequestHandler |
createHttpRequestHandler(org.flowable.bpmn.model.FlowableHttpRequestHandler handler,
ProcessEngineConfigurationImpl processEngineConfiguration) |
protected HttpResponseHandler |
createHttpResponseHandler(org.flowable.bpmn.model.FlowableHttpResponseHandler handler,
ProcessEngineConfigurationImpl processEngineConfiguration) |
CompletableFuture<BaseHttpActivityDelegate.ExecutionData> |
execute(DelegateExecution execution,
AsyncTaskInvoker taskInvoker)
Perform the execution of the delegate, potentially on another thread.
|
protected void |
propagateError(VariableContainer container,
String code) |
createRequest, getRequestHeaders, prepareAndExecuteRequest, saveResponseFields, validateRequestpublic DefaultBpmnHttpActivityDelegate()
public DefaultBpmnHttpActivityDelegate(FlowableHttpClient httpClient)
protected FlowableHttpClient createHttpClient()
createHttpClient in class BaseHttpActivityDelegatepublic CompletableFuture<BaseHttpActivityDelegate.ExecutionData> execute(DelegateExecution execution, AsyncTaskInvoker taskInvoker)
FutureJavaDelegateFutureJavaDelegate.afterExecution(DelegateExecution, Object) in order to store
the data on the execution on the same thread as the caller of this method.
IMPORTANT: the execution should only be used to read data before creating the future.
The execution 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 FutureJavaDelegate<BaseHttpActivityDelegate.ExecutionData>execution - the execution that can be used to extract datataskInvoker - the task invoker that can be used to execute expensive operation on another threadpublic void afterExecution(DelegateExecution execution, BaseHttpActivityDelegate.ExecutionData result)
FutureJavaDelegateFutureJavaDelegate.execute(DelegateExecution, AsyncTaskInvoker).
This should be used to set data on the DelegateExecution.
This is on the same thread as FutureJavaDelegate.execute(DelegateExecution, AsyncTaskInvoker) and participates in the process transaction.afterExecution in interface FutureJavaDelegate<BaseHttpActivityDelegate.ExecutionData>execution - the execution to which data can be setresult - the execution dataprotected HttpRequestHandler createHttpRequestHandler(org.flowable.bpmn.model.FlowableHttpRequestHandler handler, ProcessEngineConfigurationImpl processEngineConfiguration)
protected HttpResponseHandler createHttpResponseHandler(org.flowable.bpmn.model.FlowableHttpResponseHandler handler, ProcessEngineConfigurationImpl processEngineConfiguration)
protected List<FieldDeclaration> createFieldDeclarations(List<org.flowable.bpmn.model.FieldExtension> fieldList, ProcessEngineConfigurationImpl processEngineConfiguration)
protected void propagateError(VariableContainer container, String code)
propagateError in class BaseHttpActivityDelegateCopyright © 2020 Flowable. All rights reserved.