diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 4a79be9..77fd815 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -20,12 +20,47 @@ use phpOMS\Message\ResponseAbstract; use phpOMS\Views\View; /** - * Task class. + * Workflow class. * * @package Modules\Workflow * @license OMS License 1.0 * @link https://orange-management.org * @since 1.0.0 + * + * @todo Orange-Management/Modules#20 + * The workflow module can be used by other modules to register a workflow. + * The article management module for example could register a workflow for generating articles. + * This way multiple employees have to insert data and only after everything is done the article will be generated by the system itself. + * User permissions for creating an article would now get disabled and only allowed through this module. + * Other things that could be changing prices, customers etc. (essential tool for SOX and ISO and maybe even IFRS) + * This module would also make use of the task module to notify users that they have a task. + * At the same time actions such as changing a price could also create a workflow. + * If a user changes a price a workflow element for price changes gets triggered which now needs to be approved by authorized employees. + * Such modules now should add an additional tab for workflow steps. + * In this list a log of all workflows is displayed (pending, done, canceled). + * This way changes/events get forwarded to the workflow module and later the workflow decides what to do with these information + * (e.g. inserting these information into other modules etc). + * Instead of actually doing changes this can be extended further to only request something. + * E.g. a user could request a unlocking of a customer for invoicing by a simple button click and a credit manager only has to approve it. + * The workflow module now knows that the approval means to unlock the customer (maybe for only one invoice, limited time, value etc). + * + * @todo Orange-Management/Modules#22 + * Implement a way to support template settings. + * Different templates require different settings such as different type of permissions, default values, etc. + * Letting the user write config files would not be a problem (e.g. direct modification of json files) but how would this work with a settings ui where also predefined options are selectable. + * Many templates may be provided by other modules or 3rd party and not by inhouse developers. + * One solution could be to define a config layout where you can define predefined values, regex for validation etc? + * This would require a form builder that could build forms based on json objects. This however would be one large form and not split nicely over multiple forms. + * One more outer array could be used to create multiple forms. + * At the same time the application would have to register a form view/template at the beginning that could be used. + * + * @todo Orange-Management/Modules#23 + * Request/approval workflow + * For many things a request/approval workflow should be implemented. + * Users should be able to request permission changes which then have to be approved by group/department managers or the IT. + * Upon approval the workflow automatically grants these permissions and informs the user. + * This should be a selectable workflow from the template list but also get integrated into the modules. + * Modules should inform the user that he doesn't have sufficient permissions to perform certain tasks upon which he gets provided with a direct link for requesting these permissions. */ final class BackendController extends Controller {