abstract class Bitrix\Rpa\Command - base class for updating items.
To avoid excessive and redundant logic for elements, all checks, preparations, launch of automation rules and etc. are moved to to this class.
Its an abstract class that has three descendants:
public const ERROR_CODE_ITEM_MOVE_PERMISSION = 'RPA_ITEM_MOVE_ACCESS_DENIED';
public const ERROR_CODE_ITEM_MODIFY_PERMISSION = 'RPA_ITEM_MODIFY_ACCESS_DENIED';
public const ERROR_CODE_WRONG_STAGE = 'RPA_ITEM_WRONG_STAGE';
public const ERROR_CODE_MANDATORY_FIELD_EMPTY = 'RPA_MANDATORY_FIELD_EMPTY';
public const ERROR_CODE_ITEM_USER_HAS_TASKS = 'RPA_ITEM_USER_HAS_TASKS';
public const ERROR_CODE_ITEM_TASKS_NOT_COMPLETED = 'RPA_ITEM_TASKS_NOT_COMPLETED';
public const ERROR_CODE_ITEM_DELETE_PERMISSION = 'RPA_ITEM_DELETE_PERMISSION'.
These constants contain error codes that can be returned during command execution
|Method||Description||Available from version|
Receives an item and array of parameters
All this data has getters and setters. Passing to constructor is optional:
||Main command method.
This method performs the following:
During the moment of launching the automation rules other actions can be performed with the item that will raise new command instance.
All checks are enabled by default
All checks are executed sequentially, if they were not disabled. When an error occurs during one of checks, command interruption is terminated.
Separate set of methods is available for enabling/disabling
Additionally, you can disable automatic actions executed after modification are saved:
||Allows specifying event ID for \Bitrix\Rpa\Integration\PullManager.|
||Executes stage check. Defined in descendants.|
||Executes access permission check. Defined in descendants.|
||Executes check of launched tasks. Does nothing by default, defined only in Bitrix\Rpa\Command\Update.|
||Saves data into revision history table.|
||Executes field check. In Bitrix\Rpa\Command\Add this method is empty and fields are not changed when deleting.|
||Checks if all required fields from collection $userFieldCollection are filled.|
||Resets item's user field values from collection $userFieldCollection that cannot be edited.|
||Automatic task completion mode can be triggered during execution of method
In this case, further command execution does not have sense, because item was updated and modified again. And command execution must be terminated.
This method returns