Kajona\Workflows\System\WorkflowsHandlerInterface

A single workflow has to implement this interface.

A handler should be capable to fulfill the following semantic contract:

- handler is created and attached to a new workflow -> nothing to do
handler is marked as NEW

- transition from new to scheduled:
- initialize() is called, the handler can update it's data (and the data of the workflow)
- schedule() is called, the handler can set the next date the workflow should be triggered
handler is marked as SCHEDULED

- execution of workflow and handler, run the handlers main logic
execute is called. depending on the return value, the following scenarios are possible:
- true: handler is marked as EXECUTED and
- false:
- schedule() is called
- handler remains marked as SCHEDULED
- number of executions is increased

Please note:
Do NOT call updateObjectToDb on the workflow-instance.
This call is done at the end of every transition. Otherwise the data saved in the objects may get
invalid!