Class RestExternalWorkerCompletionBuilder
java.lang.Object
org.flowable.external.client.impl.RestExternalWorkerCompletionBuilder
- All Implemented Interfaces:
ExternalWorkerJobCompletionBuilder
public class RestExternalWorkerCompletionBuilder
extends Object
implements ExternalWorkerJobCompletionBuilder
- Author:
- Filip Hrisafov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.slf4j.Loggerprotected final com.fasterxml.jackson.databind.ObjectMapperprotected final com.fasterxml.jackson.databind.node.ObjectNodeprotected final RestInvokerprotected final AcquiredExternalWorkerJob -
Constructor Summary
ConstructorsConstructorDescriptionRestExternalWorkerCompletionBuilder(AcquiredExternalWorkerJob workerJob, RestInvoker restInvoker, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected <V> ExternalWorkerJobCompletionBuilderaddVariableToRequest(String name, String type, V value, Function<V, com.fasterxml.jackson.databind.JsonNode> valueMapper) voidExecute the completion of the job using a BPMN error without an error code.voidExecute the completion of the job using a BPMN error using the given error code.voidExecute the completion of the job using a CMMN termination.voidcomplete()Execute the completion of the job.convertAndAddJsonVariable(String name, Object value) Provide a variable value of any type that would be converted to a json variable and passed to the Flowable application when completing the job.protected com.fasterxml.jackson.databind.JsonNodeconvertToJson(Object value) protected voidsendRequest(String action) Provide aJsonNodethat would be passed as a json variable to the Flowable application when completing the job.Provide aBooleanvariable that would be passed to the Flowable application when completing the job.Provide aDoublevariable that would be passed to the Flowable application when completing the job.Provide anIntegervariable that would be passed to the Flowable application when completing the job.Provide aLongvariable that would be passed to the Flowable application when completing the job.Provide aShortvariable that would be passed to the Flowable application when completing the job.Provide aStringvariable that would be passed to the Flowable application when completing the job.Provide anInstantvariable that would be passed to the Flowable application when completing the job.Provide aLocalDatevariable that would be passed to the Flowable application when completing the job.variable(String name, LocalDateTime value) Provide aLocalDateTimevariable that would be passed to the Flowable application when completing the job.Provide aDatevariable that would be passed to the Flowable application when completing the job.
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
workerJob
-
restInvoker
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
request
protected final com.fasterxml.jackson.databind.node.ObjectNode request
-
-
Constructor Details
-
RestExternalWorkerCompletionBuilder
public RestExternalWorkerCompletionBuilder(AcquiredExternalWorkerJob workerJob, RestInvoker restInvoker, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
variable
Description copied from interface:ExternalWorkerJobCompletionBuilderProvide aStringvariable that would be passed to the Flowable application when completing the job.- Specified by:
variablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
variable
Description copied from interface:ExternalWorkerJobCompletionBuilderProvide aShortvariable that would be passed to the Flowable application when completing the job.- Specified by:
variablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
variable
Description copied from interface:ExternalWorkerJobCompletionBuilderProvide anIntegervariable that would be passed to the Flowable application when completing the job.- Specified by:
variablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
variable
Description copied from interface:ExternalWorkerJobCompletionBuilderProvide aLongvariable that would be passed to the Flowable application when completing the job.- Specified by:
variablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
variable
Description copied from interface:ExternalWorkerJobCompletionBuilderProvide aDoublevariable that would be passed to the Flowable application when completing the job.- Specified by:
variablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
variable
Description copied from interface:ExternalWorkerJobCompletionBuilderProvide aBooleanvariable that would be passed to the Flowable application when completing the job.- Specified by:
variablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
variable
Description copied from interface:ExternalWorkerJobCompletionBuilderProvide aDatevariable that would be passed to the Flowable application when completing the job.- Specified by:
variablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
variable
Description copied from interface:ExternalWorkerJobCompletionBuilderProvide anInstantvariable that would be passed to the Flowable application when completing the job.- Specified by:
variablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
variable
Description copied from interface:ExternalWorkerJobCompletionBuilderProvide aLocalDatevariable that would be passed to the Flowable application when completing the job.- Specified by:
variablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
variable
Description copied from interface:ExternalWorkerJobCompletionBuilderProvide aLocalDateTimevariable that would be passed to the Flowable application when completing the job.- Specified by:
variablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
variable
public ExternalWorkerJobCompletionBuilder variable(String name, com.fasterxml.jackson.databind.JsonNode value) Description copied from interface:ExternalWorkerJobCompletionBuilderProvide aJsonNodethat would be passed as a json variable to the Flowable application when completing the job.- Specified by:
variablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
convertAndAddJsonVariable
Description copied from interface:ExternalWorkerJobCompletionBuilderProvide a variable value of any type that would be converted to a json variable and passed to the Flowable application when completing the job.- Specified by:
convertAndAddJsonVariablein interfaceExternalWorkerJobCompletionBuilder- Parameters:
name- the name of the variablevalue- the value of the variable
-
addVariableToRequest
protected <V> ExternalWorkerJobCompletionBuilder addVariableToRequest(String name, String type, V value, Function<V, com.fasterxml.jackson.databind.JsonNode> valueMapper) -
convertToJson
-
complete
public void complete()Description copied from interface:ExternalWorkerJobCompletionBuilderExecute the completion of the job.- Specified by:
completein interfaceExternalWorkerJobCompletionBuilder
-
bpmnError
public void bpmnError()Description copied from interface:ExternalWorkerJobCompletionBuilderExecute the completion of the job using a BPMN error without an error code.- Specified by:
bpmnErrorin interfaceExternalWorkerJobCompletionBuilder- See Also:
-
bpmnError
Description copied from interface:ExternalWorkerJobCompletionBuilderExecute the completion of the job using a BPMN error using the given error code.- Specified by:
bpmnErrorin interfaceExternalWorkerJobCompletionBuilder- See Also:
-
cmmnTerminate
public void cmmnTerminate()Description copied from interface:ExternalWorkerJobCompletionBuilderExecute the completion of the job using a CMMN termination.- Specified by:
cmmnTerminatein interfaceExternalWorkerJobCompletionBuilder
-
sendRequest
-