Workflow Events
You need to set up your project and environment go be able to handle Comala Document Management events.
You can have your app to listen to workflow related events using Confluence's Event Listeners.
Events
Event | Description |
---|---|
| Fired when the page of blogpost is approved. v7.0+ Replaces |
| Fired when the state of page or blog post is changed |
| Fired when the state of a page of blog post has expired |
| Fired when the approval is assigned |
| Fired when the approval is unassigned |
| Fired when the page or blog post is approved Removed from Comala Document Management v7.0+ releases. Use |
| Fired when the page or blog post is rejected |
| Fired when a task is created |
| Fired when a task is updated |
| Fired when a task is completed |
| Fired when a task is closed (usually when the state changed and there are still open tasks) |
| Fired when a task is assigned |
| Fired when a task due date is expired |
Usage
Workflow events are handled the same way as Confluence events
public class WorkflowEventLogger implements EventListener {
private static final Logger log = Logger.getLogger(WorkflowEventLogger.class);
public void handleEvent(Event event) {
if (log.isDebugEnabled()) {
log.debug(event.toString());
}
}
public Class[] getHandledEventClasses() {
return new Class[] {
// State Events
StateChangeEvent.class,
StateExpireEvent.class,
ContentAssignEvent.class,
// Approval event
ContentApproveEvent.class,
ContentRejectEvent.class,
// Tasks Events
TaskCreateEvent.class,
TaskCompleteEvent.class,
TaskCloseEvent.class,
TaskAssignEvent.class,
};
}
}