Package com.avoka.tm.job
Class ActionResultBuilder
java.lang.Object
com.avoka.tm.job.ActionResultBuilder
Provides a job action invocation ActionResult builder.
Examples
The example below uses creates a ActionResult object to signal the job step action has successfully completed.
 import com.avoka.tm.job.*
 import com.avoka.tm.util.*
 import com.avoka.tm.vo.*
 import jakarta.servlet.http.*
 class FluentJobActionService {
       // Injected at runtime
       public Logger logger
       ActionResult invoke(SvcDef svcDef, Job job, JobAction jobAction, HttpServletRequest request, User user) {
           // Business logic ...
           String xml = Jobs.getStartTxnXml(job)
           Path path = new Path(xml)
           String refNumber = path.val('//Application/RefNumber')
           return new ActionResultBuilder()
               .setStatus('Completed')
               .setMessage('Action completed for: ' + refNumber)
               .build()
       }
 } - Since:
- 5.0.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Return a new job action result object based on the specified properties.setExpiryTime(Date expiryTime) Set the step action expiry time after which the job action should be cancelled.setMaxRetryAttempts(Integer maxRetryAttempts) Set the maximum number of time to attempt performing the step action.setMessage(String message) Set the job action result message for process auditing purposes.setNextRetryAttempt(Date nextRetryAttempt) Set the time to next retry performing step action.setNextRetryAttemptMins(int minutes) The next time in minutes to retry performing the action.Set the job action result route step.Set the job action result status.
- 
Constructor Details- 
ActionResultBuilderpublic ActionResultBuilder()
 
- 
- 
Method Details- 
setStatusSet the job action result status.- Parameters:
- status- the job action result status
- Returns:
- the job action result builder
 
- 
setRouteSet the job action result route step.- Parameters:
- route- the step name to route the job flow to
- Returns:
- the job action result builder
 
- 
setMessageSet the job action result message for process auditing purposes.- Parameters:
- message- the action result message for process auditing purposes
- Returns:
- the job action result builder
 
- 
setExpiryTimeSet the step action expiry time after which the job action should be cancelled.- Parameters:
- expiryTime- the step action expiry time after which the job action should be cancelled
- Returns:
- the job action result builder
 
- 
setMaxRetryAttemptsSet the maximum number of time to attempt performing the step action.- Parameters:
- maxRetryAttempts- the maximum number of time to attempt performing the step action
- Returns:
- the job action result builder
 
- 
setNextRetryAttemptSet the time to next retry performing step action.- Parameters:
- nextRetryAttempt- the time to next retry performing step action
- Returns:
- the job action result builder
 
- 
setNextRetryAttemptMinsThe next time in minutes to retry performing the action.- Parameters:
- minutes- the next time in minutes to retry performing the action
- Returns:
- the job action result builder
 
- 
buildReturn a new job action result object based on the specified properties.- Returns:
- a new job action result object based on the specified properties.
 
 
-