Package com.avoka.fc.core.service.fluent
Class FluentJobActionService
java.lang.Object
com.avoka.fc.core.service.fluent.AbstractFluentService
com.avoka.fc.core.service.fluent.FluentJobActionService
- All Implemented Interfaces:
IFluentService
,IServiceDefinitionAware
,IUnitTestableService
,IJobActionService
Provides a Fluent Job Action service.
- Since:
- 5.0.0
-
Field Summary
Modifier and TypeFieldDescriptionprotected JobEventLogService
The JobEventLog service.protected int
The maximum number of error retry attempts, default 0.protected Integer
The execute retry delay in minutes.Fields inherited from interface com.avoka.fc.core.service.fluent.IFluentService
PARAM_ACTION_PROPERTIES, PARAMS_FILEDATA, PARAMS_FILENAME, PARAMS_FORM, PARAMS_FORM_XML, PARAMS_FUNC_PARAM, PARAMS_JOB, PARAMS_JOB_ACTION, PARAMS_PARAMS, PARAMS_REQUEST, PARAMS_ROWS, PARAMS_SVC_DEF, PARAMS_TEST_PARAMS, PARAMS_TXN, PARAMS_USER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(ActionContext actionContext) Execute the action and return the result.Return the maximum number of error retry attempts should be performed.Return the minimum action execute retry delay in minutes.void
setMaxErrorRetryAttempts
(Integer attempts) Set the maximum number of action attempts.void
setRetryDelayMins
(Integer delayMins) Set the minimum action execute retry delay in minutes.validateProperties
(ActionStepProperties actionStepProperties, Client client) Validate the action service using the given action step service properties, returning null if valid or an error string otherwise.Methods inherited from class com.avoka.fc.core.service.fluent.AbstractFluentService
createExceptionAndLog, getCause, getClient, getCommitChanges, getExecutionTimeout, getFunctionTrigger, getGroovyScript, getGroovyServiceLog, getLogger, getRequestUser, getServiceDefinition, getServiceNameAndVersion, getServiceTimeout, getSlf4jLogger, getTestLogOutput, invoke, isExceptionDebugLoggingEnabled, isGroovyDebugLogging, isGroovyLoggingEnabled, runUnitTest, setCommitChanges, setExceptionDebugLoggingEnabled, setExecutionTimeout, setGroovyDebugLogging, setGroovyLoggingEnabled, setGroovyScript, setLogger, setServiceDefinition
-
Field Details
-
jobEventLogService
The JobEventLog service. -
maxErrorRetryAttempts
protected int maxErrorRetryAttemptsThe maximum number of error retry attempts, default 0. -
retryDelayMins
The execute retry delay in minutes.
-
-
Constructor Details
-
FluentJobActionService
public FluentJobActionService()
-
-
Method Details
-
execute
Execute the action and return the result.- Specified by:
execute
in interfaceIJobActionService
- Parameters:
actionContext
- the job action execution context (required)- Returns:
- the action result
- See Also:
-
validateProperties
Validate the action service using the given action step service properties, returning null if valid or an error string otherwise.- Specified by:
validateProperties
in interfaceIJobActionService
- Parameters:
actionStepProperties
- the action step properties (required)client
- the Job Controller client (required)- Returns:
- null
- See Also:
-
getMaxErrorRetryAttempts
Description copied from interface:IJobActionService
Return the maximum number of error retry attempts should be performed.- Specified by:
getMaxErrorRetryAttempts
in interfaceIJobActionService
- Returns:
- the maximum number of error retry attempts should be performed
- See Also:
-
setMaxErrorRetryAttempts
Set the maximum number of action attempts.- Parameters:
attempts
- the maximum number of error retry attempts should be performed
-
getRetryDelayMins
Description copied from interface:IJobActionService
Return the minimum action execute retry delay in minutes.- Specified by:
getRetryDelayMins
in interfaceIJobActionService
- Returns:
- the minimum action execute retry delay in minutes.
- See Also:
-
setRetryDelayMins
Set the minimum action execute retry delay in minutes.- Parameters:
delayMins
- the retry delay in minutes
-
getErrorType
- Specified by:
getErrorType
in interfaceIFluentService
- Returns:
- the service error type to be used to classify the error logging records
- See Also:
-