-
Notifications
You must be signed in to change notification settings - Fork 65
Events
Andy Byers edited this page Oct 5, 2017
·
1 revision
Janeway uses an event system that allows apps and plugins to register to be called when an event is fired. An example of this would be when a new submission is made.
event_logic.Events.ON_ARTICLE_SUBMITTED
This event is called whenever a new article is submitted, any app or plugin can register to have a function called when this event is triggered by the following method:
from events import logic as event_logic
event_logic.Events.register_for_event(event_logic.Events.ON_ARTICLE_SUBMITTED, plugins.my_submission_plugin.events.a_function)
The above is obviously an example, but you get the picture. By default an Event passes a set of keyword arguments for your function to use and these are documented inside events.logic.Events
Janeway uses the Event framework to handle raising of emails and entering Logs during its workflow process.
Wiki has moved to read the docs.