Skip to content

Instantly share code, notes, and snippets.

@paulbares
Created June 3, 2020 12:28
Show Gist options
  • Save paulbares/8e22b36c162de217ba2fcec9ff8eb6f8 to your computer and use it in GitHub Desktop.
Save paulbares/8e22b36c162de217ba2fcec9ff8eb6f8 to your computer and use it in GitHub Desktop.
tasklistener
@Override
public void notify(DelegateTask delegateTask) {
String taskId = delegateTask.getId(); // This is our business_id
// Only support 2 types of event for the time being.
switch (delegateTask.getEventName()) {
case TaskListener.EVENTNAME_CREATE:
// Extract the candidate users and groups.
Set<String>[] candidates = extractCandidates(delegateTask.getCandidates());
// TODO send new notification to subscribers
break;
case TaskListener.EVENTNAME_COMPLETE:
// TODO send completed notification to subscribers
break;
default:
return; // do nothing
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment