Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
titleExample of inserting a new workflow action
INSERT INTO `LEK_workflow_action` (`workflow`,`trigger`,`inStep`,`byRole`,`userState`,`actionClass`,`action`,`parameters`,`position`)
VALUES ('default', 'doCronDaily', null, null, null, 'editor_Workflow_Actions', 'finishOverduedTasks', null, 0);

Example Content in the LEK_workflow_action table

Code Block
languagesql
MariaDB [icorrectT5]> select * from LEK_workflow_action;
+----+----------+--------------------------------------------------+-----------+--------+-----------+------------------------------+---------------------------+------------+----------+
| id | workflow | trigger                                          | inStep    | byRole | userState | actionClass                  | action                    | parameters | position |
+----+----------+--------------------------------------------------+-----------+--------+-----------+------------------------------+---------------------------+------------+----------+
|  1 | default  | handleAllFinishOfARole                           | lectoring | lector | finished  | editor_Workflow_Actions      | segmentsSetUntouchedState |            |        0 |
|  2 | default  | handleAllFinishOfARole                           | lectoring | lector | finished  | editor_Workflow_Actions      | taskSetRealDeliveryDate   |            |        1 |
|  3 | default  | handleAllFinishOfARole                           | NULL      | NULL   | finished  | editor_Workflow_Notification | notifyAllFinishOfARole    |            |        2 |
|  4 | default  | handleUnfinish                                   | NULL      | lector | NULL      | editor_Workflow_Actions      | segmentsSetInitialState   |            |        0 |
|  5 | default  | handleBeforeImport                               | NULL      | NULL   | NULL      | editor_Workflow_Actions      | autoAssociateTaskPm       |            |        0 |
|  6 | default  | handleImport                                     | NULL      | NULL   | NULL      | editor_Workflow_Notification | notifyNewTaskForPm        |            |        0 |
|  7 | default  | handleImport                                     | NULL      | NULL   | NULL      | editor_Workflow_Actions      | autoAssociateEditorUsers  |            |        1 |
|  8 | default  | handleUserAssociationAdded                       | NULL      | NULL   | NULL      | editor_Workflow_Notification | notifyNewTaskAssigned     |            |        0 |
| 45 | default  | handleDirect::notifyAllUsersAboutTaskAssociation | NULL      | NULL   | NULL      | editor_Workflow_Notification | notifyAllAssociatedUsers  |            |        0 |
| 51 | default  | doCronDaily                                      | NULL      | NULL   | NULL      | editor_Workflow_Actions      | deleteOldEndedTasks       | NULL       |        0 |
+----+----------+--------------------------------------------------+-----------+--------+-----------+------------------------------+---------------------------+------------+----------+



External Workflow Trigger

The TaskController provides a callable action to trigger workflow events via URL - if configured in the workflow action table.

Workflow Trigger in the application

...