user_manager v0.2.0 UserManager.Notifications.NotificationRequestInitiator
receives requests to subscribe to a static notification
Summary
Functions
get subscribers for a particular workflow/workflow_response_code
list of workflows and the codes that notifications can be configured for
register a subscriber (pid) to revieve process.send events from the notification service
Functions
get subscribers for a particular workflow/workflow_response_code
## Examples
iex>{:ok, _} = UserManager.Notifications.NotificationRequestInitiator.register_static_notification(:create_user, :validation_error, self())
iex>Enum.count(UserManager.Notifications.NotificationRequestInitiator.get_subscribers(:create_user, :validation_error)) == 1
true
iex>Enum.count(UserManager.Notifications.NotificationRequestInitiator.get_subscribers(:create_user, :not_found)) == 0
true
list of workflows and the codes that notifications can be configured for
register a subscriber (pid) to revieve process.send events from the notification service
## Attributes
- workflow - the workflow to subscibe to
workflow_response_code - the workfow code to subscibe to
## Examples iex>{:ok, response} = UserManager.Notifications.NotificationRequestInitiator.registerstatic_notification(:create_user, :validation_error, self()) iex>{:notify_sub, w, tag, } = response iex>w :create_user iex>tag :validation_error
iex>UserManager.Notifications.NotificationRequestInitiator.register_static_notification(:never_find_me, :success, self())
iex>UserManager.Notifications.NotificationRequestInitiator.register_static_notification(:create_user, :not_found_me_ever_never, self())
iex>UserManager.Notifications.NotificationRequestInitiator.register_static_notification(:create_user, :success, nil)