Package org.bonitasoft.engine.work.audit
Class WorkExecutionAuditor
- java.lang.Object
-
- org.bonitasoft.engine.work.audit.WorkExecutionAuditor
-
@Component public class WorkExecutionAuditor extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WorkExecutionAuditor.ExecutionCountCheckConfig
static class
WorkExecutionAuditor.RegistrationDurationElapsedCheckConfig
-
Constructor Summary
Constructors Constructor Description WorkExecutionAuditor(EngineClock engineClock, AuditListener auditListener, WorkExecutionAuditor.RegistrationDurationElapsedCheckConfig registrationDurationElapsedCheckConfig, WorkExecutionAuditor.ExecutionCountCheckConfig executionCountCheckConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
detectAbnormalExecutionAndNotify(WorkDescriptor work)
Notify the listener in case of abnormal execution.void
notifySuccess(WorkDescriptor work)
Only notify if execution has been detected as abnormalvoid
setActivated(boolean activated)
-
-
-
Constructor Detail
-
WorkExecutionAuditor
public WorkExecutionAuditor(EngineClock engineClock, AuditListener auditListener, WorkExecutionAuditor.RegistrationDurationElapsedCheckConfig registrationDurationElapsedCheckConfig, WorkExecutionAuditor.ExecutionCountCheckConfig executionCountCheckConfig)
-
-
Method Detail
-
setActivated
@Value("${bonita.tenant.work.audit.activated:true}") public void setActivated(boolean activated)
-
detectAbnormalExecutionAndNotify
public void detectAbnormalExecutionAndNotify(WorkDescriptor work)
Notify the listener in case of abnormal execution. Cases considered as 'abnormal execution'- large number of executions after a duration threshold since registration has elapsed
- large duration since the work has been registered
- Parameters:
work
- the work descriptor to inspect
-
notifySuccess
public void notifySuccess(WorkDescriptor work)
Only notify if execution has been detected as abnormal
-
-