Chapter 44. Case event listener The CaseEventListener listener is used to initiate notifications for case-related events and operations that are invoked on a case instance. Implement the case event listener by overriding the methods as needed for your particular use case. You can configure the listener using the deployment descriptors located in Business Central in Menu Design PROJECT_NAME Settings Deployments . When a new project is created, a kie-deployment-descriptor.xml file is generated with default values. CaseEventListener methods public interface CaseEventListener extends EventListener { default void beforeCaseStarted(CaseStartEvent event) { }; default void afterCaseStarted(CaseStartEvent event) { }; default void beforeCaseClosed(CaseCloseEvent event) { }; default void afterCaseClosed(CaseCloseEvent event) { }; default void beforeCaseCancelled(CaseCancelEvent event) { }; default void afterCaseCancelled(CaseCancelEvent event) { }; default void beforeCaseDestroyed(CaseDestroyEvent event) { }; default void afterCaseDestroyed(CaseDestroyEvent event) { }; default void beforeCaseReopen(CaseReopenEvent event) { }; default void afterCaseReopen(CaseReopenEvent event) { }; default void beforeCaseCommentAdded(CaseCommentEvent event) { }; default void afterCaseCommentAdded(CaseCommentEvent event) { }; default void beforeCaseCommentUpdated(CaseCommentEvent event) { }; default void afterCaseCommentUpdated(CaseCommentEvent event) { }; default void beforeCaseCommentRemoved(CaseCommentEvent event) { }; default void afterCaseCommentRemoved(CaseCommentEvent event) { }; default void beforeCaseRoleAssignmentAdded(CaseRoleAssignmentEvent event) { }; default void afterCaseRoleAssignmentAdded(CaseRoleAssignmentEvent event) { }; default void beforeCaseRoleAssignmentRemoved(CaseRoleAssignmentEvent event) { }; default void afterCaseRoleAssignmentRemoved(CaseRoleAssignmentEvent event) { }; default void beforeCaseDataAdded(CaseDataEvent event) { }; default void afterCaseDataAdded(CaseDataEvent event) { }; default void beforeCaseDataRemoved(CaseDataEvent event) { }; default void afterCaseDataRemoved(CaseDataEvent event) { }; default void beforeDynamicTaskAdded(CaseDynamicTaskEvent event) { }; default void afterDynamicTaskAdded(CaseDynamicTaskEvent event) { }; default void beforeDynamicProcessAdded(CaseDynamicSubprocessEvent event) { }; default void afterDynamicProcessAdded(CaseDynamicSubprocessEvent event) { }; }

Commands:
public interface CaseEventListener extends EventListener { default void beforeCaseStarted(CaseStartEvent event) { }; default void afterCaseStarted(CaseStartEvent event) { }; default void beforeCaseClosed(CaseCloseEvent event) { }; default void afterCaseClosed(CaseCloseEvent event) { }; default void beforeCaseCancelled(CaseCancelEvent event) { }; default void afterCaseCancelled(CaseCancelEvent event) { }; default void beforeCaseDestroyed(CaseDestroyEvent event) { }; default void afterCaseDestroyed(CaseDestroyEvent event) { }; default void beforeCaseReopen(CaseReopenEvent event) { }; default void afterCaseReopen(CaseReopenEvent event) { }; default void beforeCaseCommentAdded(CaseCommentEvent event) { }; default void afterCaseCommentAdded(CaseCommentEvent event) { }; default void beforeCaseCommentUpdated(CaseCommentEvent event) { }; default void afterCaseCommentUpdated(CaseCommentEvent event) { }; default void beforeCaseCommentRemoved(CaseCommentEvent event) { }; default void afterCaseCommentRemoved(CaseCommentEvent event) { }; default void beforeCaseRoleAssignmentAdded(CaseRoleAssignmentEvent event) { }; default void afterCaseRoleAssignmentAdded(CaseRoleAssignmentEvent event) { }; default void beforeCaseRoleAssignmentRemoved(CaseRoleAssignmentEvent event) { }; default void afterCaseRoleAssignmentRemoved(CaseRoleAssignmentEvent event) { }; default void beforeCaseDataAdded(CaseDataEvent event) { }; default void afterCaseDataAdded(CaseDataEvent event) { }; default void beforeCaseDataRemoved(CaseDataEvent event) { }; default void afterCaseDataRemoved(CaseDataEvent event) { }; default void beforeDynamicTaskAdded(CaseDynamicTaskEvent event) { }; default void afterDynamicTaskAdded(CaseDynamicTaskEvent event) { }; default void beforeDynamicProcessAdded(CaseDynamicSubprocessEvent event) { }; default void afterDynamicProcessAdded(CaseDynamicSubprocessEvent event) { }; }