@PermitAll public class HttpClientTask extends AbstractAsynchronousExecutionTask implements AsynchronousExecutionTask
String type of httpMethod to execute. Possible values: GET, POST, PUT, DELETE String request payload - text that will be sent in http request String request content typeReferenceHolder object. It is the String reference where the
output from the http call (response payload) will be storedReferenceHolder object. HTTP response code will be stored into this referenceExecutableTask.Result| Constructor and Description |
|---|
HttpClientTask() |
| Modifier and Type | Method and Description |
|---|---|
java.io.Serializable |
collectDataForExecution(TaskContext context)
Collects data from task context for asynchronous execution.
|
boolean |
executeAsynchronously(TaskContext context)
Determines, based on current task context (params, metadata, etc.) if the exeuction
should be done asynchronously.
|
java.lang.Class<? extends AbstractAsynchronousExecutionTask> |
getImplementationClass() |
java.io.Serializable |
processDataAsynchronously(java.io.Serializable data)
Process data collected in
AsynchronousExecutionTask.collectDataForExecution(com.whitestein.lsps.engine.lang.TaskContext). |
void |
processExecutionResult(TaskContext context,
java.io.Serializable result)
This method is called after the asynchronous execution has been done
|
processInput, start, terminateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessInput, start, terminatepublic java.lang.Class<? extends AbstractAsynchronousExecutionTask> getImplementationClass()
getImplementationClass in class AbstractAsynchronousExecutionTaskComponentService.public java.io.Serializable collectDataForExecution(TaskContext context) throws ErrorException
AsynchronousExecutionTaskAsynchronousExecutionTask.processDataAsynchronously(java.io.Serializable) method asynchronously.collectDataForExecution in interface AsynchronousExecutionTaskcollectDataForExecution in class AbstractAsynchronousExecutionTaskErrorExceptionpublic void processExecutionResult(TaskContext context, java.io.Serializable result) throws ErrorException
AsynchronousExecutionTaskprocessExecutionResult in interface AsynchronousExecutionTaskprocessExecutionResult in class AbstractAsynchronousExecutionTaskresult - result of asynchronous call of method AsynchronousExecutionTask.processDataAsynchronously(java.io.Serializable)ErrorExceptionpublic java.io.Serializable processDataAsynchronously(java.io.Serializable data)
AsynchronousExecutionTaskAsynchronousExecutionTask.collectDataForExecution(com.whitestein.lsps.engine.lang.TaskContext). This execution is done asynchronously
outside of process model. The result of this execution is afterwards sent back to task (AsynchronousExecutionTask.processExecutionResult(com.whitestein.lsps.engine.lang.TaskContext, java.io.Serializable))
so that the computed results can be processed and any necessary changes in model instance can be done.
This method should not throw ErrorException since it is not executed in model instance context.processDataAsynchronously in interface AsynchronousExecutionTaskprocessDataAsynchronously in class AbstractAsynchronousExecutionTaskdata - data to processpublic boolean executeAsynchronously(TaskContext context) throws ErrorException
AsynchronousExecutionTaskAsynchronousExecutionTask.processDataAsynchronously(java.io.Serializable) will be
executed outside model instance (thus not blocking transaction, model execution, etc.}. If
false it will be called directly.executeAsynchronously in interface AsynchronousExecutionTaskexecuteAsynchronously in class AbstractAsynchronousExecutionTaskErrorExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.