API - CommandChain

CommandChain class for the behaviors. This object when created will process the behaviors. This will be done in the way of Chain of Responsibility.

Methods

This method will run in the background and map all the behavior till they are ready to run.

Returns Promise: Return the CommandChain object when the behaviors have been processed.

This method will run a method in all the behaviors, however this will only be done when the CommandChain is enabled.

Parameters
Name Type Description
method String The name of the behavior method to run (eg: before.run)
context CommandContext The context of the behavior in which it has to run. (DCI)

Returns Promise: When all the behaviors have ran we will return a resolve of the context.