Class RestExternalWorkerFailureBuilder
java.lang.Object
org.flowable.external.client.impl.RestExternalWorkerFailureBuilder
- All Implemented Interfaces:
ExternalWorkerJobFailureBuilder
public class RestExternalWorkerFailureBuilder
extends Object
implements ExternalWorkerJobFailureBuilder
- Author:
- Filip Hrisafov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.slf4j.Loggerprotected final com.fasterxml.jackson.databind.node.ObjectNodeprotected final RestInvokerprotected final AcquiredExternalWorkerJob -
Constructor Summary
ConstructorsConstructorDescriptionRestExternalWorkerFailureBuilder(AcquiredExternalWorkerJob workerJob, RestInvoker restInvoker, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionThe failure details that should be passed to the Flowable application.Provide fail information based on the exception.voidfail()Execute the failure of the job.The failure message that should be passed to the Flowable application.retries(int retries) How many times should the job be retried.retryTimeout(Duration retryTimeout) How long should the Flowable application wait before making this job available for execution.protected void
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
workerJob
-
restInvoker
-
request
protected final com.fasterxml.jackson.databind.node.ObjectNode request
-
-
Constructor Details
-
RestExternalWorkerFailureBuilder
public RestExternalWorkerFailureBuilder(AcquiredExternalWorkerJob workerJob, RestInvoker restInvoker, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
error
Description copied from interface:ExternalWorkerJobFailureBuilderProvide fail information based on the exception. TheThrowable.getMessage()will be used as the failure message and the exception stacktrace will be used as the details.- Specified by:
errorin interfaceExternalWorkerJobFailureBuilder- Parameters:
exception- the exception that should be used to provide the message and details- See Also:
-
message
Description copied from interface:ExternalWorkerJobFailureBuilderThe failure message that should be passed to the Flowable application.- Specified by:
messagein interfaceExternalWorkerJobFailureBuilder- Parameters:
message- the failure message
-
details
Description copied from interface:ExternalWorkerJobFailureBuilderThe failure details that should be passed to the Flowable application.- Specified by:
detailsin interfaceExternalWorkerJobFailureBuilder- Parameters:
details- the failure details
-
retries
Description copied from interface:ExternalWorkerJobFailureBuilderHow many times should the job be retried. This can be used to increase / decrease the existing retries of a job. When nothing is set then the Flowable application is going to decrease the retries by 1.- Specified by:
retriesin interfaceExternalWorkerJobFailureBuilder- Parameters:
retries- the new retry count for the job
-
retryTimeout
Description copied from interface:ExternalWorkerJobFailureBuilderHow long should the Flowable application wait before making this job available for execution. This can be used to set a specific period after which the execution of a job would be successful.- Specified by:
retryTimeoutin interfaceExternalWorkerJobFailureBuilder- Parameters:
retryTimeout- the period that the Flowable application should wait before making this job available
-
fail
public void fail()Description copied from interface:ExternalWorkerJobFailureBuilderExecute the failure of the job.- Specified by:
failin interfaceExternalWorkerJobFailureBuilder
-
sendRequest
protected void sendRequest()
-