Create Action Dispatcher

1. In the navigation, click on “Create AD”:

CreateAD

You will see an already prefilled Action Dispatcher, called “ProBinder”:

CreateAD

2. Cleanup the editor:

3. Enter Action Dispatcher Module Code that allows you to log things:

exports.writeLog = ( msg ) ->
    log msg

4. Click “save” to store your first Action Dispatcher

The system will respond with the message Module Logger successfully stored! Found following function(s): writeLog:

CreateAD_Done

-> Congratulations you stored your first Action Dispatcher!


By the way, what does the Action Dispatcher’s module code mean:

  • The module provides one choosable action which is called writeLog. In a Rule it will be called Logger -> writeLog. This is achieved by attaching the function writeLog to the system internal exports object.
  • The action writeLog will receive one argument which we call msg in the scope of the writeLog function.
  • Whenever the action writeLog is executed, it will use the system function log to create a log entry of the retrieved argument msg, which should be a message in string form.