Dev.Actions Module RC2
So, apparently today we have the Dev.Actions module (RC2)
At the moment, the module is installed in the system, but does nothing.
1. First of all, the module requires installation (already done):
During module installation, the following are created:
- execution agent (performs all necessary actions according to the specified schedule in the settings)
- execution agent check
- actions table link
- action items statistic table link
The module is located: local/modules/dev.actions But all its services, for simplicity, are here: local/lib/Automation/Planned/ModuleConfig.php
Classes are responsible for maintaining ORM tables: local/lib/ORM/ActionsTable.php local/lib/ORM/ActionsStatTable.php
- Supports automatic addition of new columns
2. Setup and management:
Depending on the placement and customization of files in the specified sections, a settings tab is automatically created in the module:
local/lib/Automation/Planned/Actions local/lib/Automation/Planned/ModuleSupports
- The names speak for themselves
Module settings Panel
Zone A: active - activation of this action agent - slice actions on different agents with sequential execution (straight recommend) once - run this action for the CRM entity only once restart - urgent one-time launch regardless of other conditions (turns off to default state immediately after execution) log - writing logs to a file structure - local/log/Dev/Automation/Planned
Zone B: test - user testing mode (automatically turns off if it was enabled in tandem with restart mode) test id - entity id to test (must be used in test mode) in this case, it is the id of the crm_company (client) test users - these users will be added to tasks observers for easier control (must be used in test mode)
Zone C: days: setting the days of the week to run this action time to start [min]: at this time, the action execution will be launched time to start [max]: time limit to run this action repeat [sec]: after how many seconds to repeat this action. In the case of 0 or 86400 (24 hours), the action is performed once The following settings may differ in different activities. Their output and further use is determined by the programmer during the customization of actions. filter[Active?]: Receive system CPM entities only in the ACTIVE? status YES (or another) filter[Assigned Ignore]: ignore entities with specified responsible persons
3. Programming or customization:
At the moment, the executable code is built in such a way as to provide the ability to port existing code with a minimum amount of modifications.
For correct work, you should always have two own files with the same names, as in the example: class: local/lib/Automation/Planned/ModuleSupports/DailyMMChecks.php trait: local/lib/Automation/Planned/Actions/DailyMMChecks.php
DailyMMChecks class must be implemented by the ModuleSupportConfig interface. To work correctly, it must use a trait with the same name and use the ModuleConfig trait:
DailyMMChecks trait must use a Actions trait and ModuleConfig trait too:
gitlab release: https://gitlab.vidaselect.com/yuriyurev/bitrix.vidaselect.com/-/tags/v.1.8.3