Created
June 3, 2020 12:28
-
-
Save paulbares/8e22b36c162de217ba2fcec9ff8eb6f8 to your computer and use it in GitHub Desktop.
tasklistener
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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