Class DefaultBpmnHttpActivityDelegate
java.lang.Object
org.flowable.http.common.impl.BaseHttpActivityDelegate
org.flowable.engine.impl.bpmn.http.DefaultBpmnHttpActivityDelegate
- All Implemented Interfaces:
FutureJavaDelegate<BaseHttpActivityDelegate.ExecutionData>
public class DefaultBpmnHttpActivityDelegate
extends BaseHttpActivityDelegate
implements FutureJavaDelegate<BaseHttpActivityDelegate.ExecutionData>
- Author:
- Filip Hrisafov, Joram Barrez
-
Nested Class Summary
Nested classes/interfaces inherited from class BaseHttpActivityDelegate
BaseHttpActivityDelegate.ExecutionData, BaseHttpActivityDelegate.RequestData -
Field Summary
Fields inherited from class BaseHttpActivityDelegate
disallowRedirects, 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_SECURE_HEADERS_INVALID, HTTP_TASK_REQUEST_URL_REQUIRED, httpClient, ignoreException, requestBody, requestBodyEncoding, requestHeaders, requestMethod, requestSecureHeaders, requestTimeout, requestUrl, responseVariableName, resultVariablePrefix, saveRequestVariables, saveResponseParameters, saveResponseParametersTransient, saveResponseVariableAsJson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterExecution(DelegateExecution execution, BaseHttpActivityDelegate.ExecutionData result) Method invoked with the result fromFutureJavaDelegate.execute(DelegateExecution, AsyncTaskInvoker).protected ExpressioncreateExpression(ExpressionManager expManager, Object value) protected List<FieldDeclaration> createFieldDeclarations(List<FieldExtension> fieldList, ProcessEngineConfigurationImpl processEngineConfiguration) protected FlowableHttpClientprotected HttpRequestHandlercreateHttpRequestHandler(FlowableHttpRequestHandler handler, ProcessEngineConfigurationImpl processEngineConfiguration) protected HttpResponseHandlercreateHttpResponseHandler(FlowableHttpResponseHandler handler, ProcessEngineConfigurationImpl processEngineConfiguration) protected ScriptHttpHandlercreateScriptHttpHandler(ExpressionManager expressionManager, ScriptInfo scriptInfo) execute(DelegateExecution execution, AsyncTaskInvoker taskInvoker) Perform the execution of the delegate, potentially on another thread.protected voidpropagateError(VariableContainer container, String code) Methods inherited from class BaseHttpActivityDelegate
createRequest, getRequestHeaders, getRequestSecureHeaders, parseRequestHeaders, prepareAndExecuteRequest, saveResponseFields, validateRequest
-
Constructor Details
-
DefaultBpmnHttpActivityDelegate
public DefaultBpmnHttpActivityDelegate() -
DefaultBpmnHttpActivityDelegate
-
-
Method Details
-
createHttpClient
- Specified by:
createHttpClientin classBaseHttpActivityDelegate
-
execute
public CompletableFuture<BaseHttpActivityDelegate.ExecutionData> execute(DelegateExecution execution, AsyncTaskInvoker taskInvoker) Description copied from interface:FutureJavaDelegatePerform the execution of the delegate, potentially on another thread. The result of the future is passed in theFutureJavaDelegate.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
AsyncTaskInvokeris 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 giventaskInvoker.- Specified by:
executein interfaceFutureJavaDelegate<BaseHttpActivityDelegate.ExecutionData>- Parameters:
execution- the execution that can be used to extract datataskInvoker- the task invoker that can be used to execute expensive operation on another thread- Returns:
- the output data of the execution
-
afterExecution
public void afterExecution(DelegateExecution execution, BaseHttpActivityDelegate.ExecutionData result) Description copied from interface:FutureJavaDelegateMethod invoked with the result fromFutureJavaDelegate.execute(DelegateExecution, AsyncTaskInvoker). This should be used to set data on theDelegateExecution. This is on the same thread asFutureJavaDelegate.execute(DelegateExecution, AsyncTaskInvoker)and participates in the process transaction.- Specified by:
afterExecutionin interfaceFutureJavaDelegate<BaseHttpActivityDelegate.ExecutionData>- Parameters:
execution- the execution to which data can be setresult- the execution data
-
createHttpRequestHandler
protected HttpRequestHandler createHttpRequestHandler(FlowableHttpRequestHandler handler, ProcessEngineConfigurationImpl processEngineConfiguration) -
createExpression
-
createHttpResponseHandler
protected HttpResponseHandler createHttpResponseHandler(FlowableHttpResponseHandler handler, ProcessEngineConfigurationImpl processEngineConfiguration) -
createScriptHttpHandler
protected ScriptHttpHandler createScriptHttpHandler(ExpressionManager expressionManager, ScriptInfo scriptInfo) -
createFieldDeclarations
protected List<FieldDeclaration> createFieldDeclarations(List<FieldExtension> fieldList, ProcessEngineConfigurationImpl processEngineConfiguration) -
propagateError
- Specified by:
propagateErrorin classBaseHttpActivityDelegate
-