public List < String > getNotifierSpecs ( Long taskId , Long processInstanceId , String outcome ) throws ObserverException { String noticesAttr = null ; EventServices eventManager = ServiceLocator . getEventServices ( ) ; try { if ( processInstanceId != null ) { Process process = eventManager . findProcessByProcessInstanceId ( processInstanceId ) ; if ( process != null && process . getActivities ( ) != null ) { TaskTemplate taskVO = TaskTemplateCache . getTaskTemplate ( taskId ) ; for ( Activity activity : process . getActivities ( ) ) { if ( taskVO . getLogicalId ( ) . equals ( activity . getAttribute ( TaskAttributeConstant . TASK_LOGICAL_ID ) ) ) { noticesAttr = activity . getAttribute ( TaskAttributeConstant . NOTICES ) ; break ; } } } } if ( ! StringHelper . isEmpty ( noticesAttr ) ) { return parseNoticiesAttr ( noticesAttr , outcome ) ; } return getNotifierSpecs ( taskId , outcome ) ; // For compatibility } catch ( Exception ex ) { logger . severeException ( ex . getMessage ( ) , ex ) ; return null ; } }
Return a list of notifier class name and template name and version pairs Get the template name and notifier class names based on the process activity attributes to get the relevant values for in flight and new processes