public abstract class AbstractRuleEngineJob extends AbstractJobPerformable<RuleEngineCronJobModel> implements RuleEngineJobPerformable<RuleEngineCronJobModel>
JobPerformable for rule engine tasks| Modifier and Type | Field and Description |
|---|---|
protected static PerformResult |
ABORTED_RESULT |
protected static PerformResult |
FAILURE_RESULT |
protected static PerformResult |
SUCCESS_RESULT |
flexibleSearchService, modelService, sessionService| Constructor and Description |
|---|
AbstractRuleEngineJob() |
clearAbortRequestedIfNeeded, isPerformable, setFlexibleSearchService, setModelService, setSessionServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisPerformableprotected static final PerformResult SUCCESS_RESULT
protected static final PerformResult FAILURE_RESULT
protected static final PerformResult ABORTED_RESULT
public PerformResult perform(RuleEngineCronJobModel cronJob)
JobPerformableServicelayerJob. Implement here your execution logic. It can be called
synchronous or asynchronous. So be aware of thread-safety. Method will return a result object saying if the
execution has reached end and if it was successful.perform in interface JobPerformable<RuleEngineCronJobModel>perform in class AbstractJobPerformable<RuleEngineCronJobModel>cronJob - the related CronJob in whose context the execution will be performed.PerformResult that indicates whether the execution was successfully executed
or not and has finished or not.public boolean isAbortable()
JobPerformableisAbortable in interface JobPerformable<RuleEngineCronJobModel>isAbortable in class AbstractJobPerformable<RuleEngineCronJobModel>public boolean isPerformable(RuleEngineCronJobModel cronJob)
RuleEngineJobPerformableisPerformable in interface RuleEngineJobPerformable<RuleEngineCronJobModel>cronJob - - cron job instancetrue in case cron job can be performed, false - otherwiseprotected abstract java.util.Optional<RuleCompilerPublisherResult> performInternal(RuleEngineCronJobModel cronJob, CronJobProgressTracker tracker)
protected CronJobProgressTracker createCronJobProgressTracker(RuleEngineCronJobModel cronJob)
protected abstract java.lang.String getJobName()
protected PerformResult getPerformResult(RuleEngineCronJobModel cronJob, RuleCompilerPublisherResult result)
protected boolean hasErrors(RuleCompilerPublisherResult result)
protected boolean hasPublisherErrors(RuleCompilerPublisherResult result)
protected void onError(RuleEngineCronJobModel cronJob, RuleCompilerPublisherResult ruleResults)
protected void logCompilerErrorMessages(RuleEngineCronJobModel cronJob, RuleCompilerPublisherResult ruleResults)
protected void logPublisherErrorMessages(RuleEngineCronJobModel cronJob, RuleCompilerPublisherResult ruleResults)
protected void logToDatabase(RuleEngineCronJobModel cronJob, java.lang.String error)
protected void logOnJobStart()
protected void logOnSuccessfulJobFinish()
protected void logOnFailedJobFinish()
protected void setTrackerProgress(CronJobProgressTracker tracker, double progress)
protected RuleMaintenanceService getRuleMaintenanceService()
public void setRuleMaintenanceService(RuleMaintenanceService ruleMaintenanceService)
protected RuleEngineJobExecutionSynchronizer getRuleEngineJobExecutionSynchronizer()
public void setRuleEngineJobExecutionSynchronizer(RuleEngineJobExecutionSynchronizer ruleEngineJobExecutionSynchronizer)
protected ModelService getModelService()
Copyright © 2018 SAP SE. All Rights Reserved.