top_en
Main page

Bitrix24Care

Other actions in business processes

Rating:
This group contains all the remaining commands.

PHP Code
This action permits you to execute an arbitrary PHP code.

Attention! 1. This action is only available in Bitrix24 Self-hosted version.
2. Only a user with administrator’s rights can set PHP code.

Note: The code must be indicated with no opening or closing tags (<??>).

Action Parameters

Since the meaning of most fields is clear from their names, their description is omitted.

Examples of application

Setting a value for the variable

$this->SetVariable('Variable1', 12345);

where:

Variable1 – identifier of the variable to which a value will be assigned (12345 number). 

Entering several users to the User type variable

$this->SetVariable("user", array("user_1", "user_2"));

where:

array("user_1", "user_2") – an array of users in the format user_[user_identifier_in_the_system]

The use of PHP code and values of fields/variables to obtain the name of the infoblock element

$arFilter = Array("IBLOCK_ID" => {=Variable:Variable1_printable}, "ID" => {=Document:PROPERTY_1}); $dc = CIBlockElement::GetList(array(), $arFilter, array("NAME")); $br = $dc->Fetch(); $Pbrr = $br["NAME"]; $this -> SetVariable('Variable2', $Pbrr);

where:

{=Variable:Variable1_printable} – value of the variable containing the infoblock identifier; 

{=Document:PROPERTY_1} – field of the document containing the infoblock element identifier; 
Variable2 – identifier of the variable which will be assigned the calculated name of the infoblock element. 

Conversion of the document field format and its further use

Let us consider an example of conversion of the document field User to an understandable form in order to use it when sending a message:

  1. A variable to store the converted value of the document field should be created in the business process template;
  2. Let us indicate the following in the PHP code action:
    $rsUser = CUser::GetByID({=Document:PROPERTY_USER}); $arUser = $rsUser->Fetch(); $this->SetVariable('#Variable_name#', $arUser[NAME].' '.$arUser[SECOND_NAME].' '.$arUser[LAST_NAME]);
  3. After that, we have to use the result of this variable instead of the document field in the block used for notification.
Pause Execution
This action permits you to postpone the execution of the next action for a specified time.

Action Parameters

Mode:

  • Period – indicates the time period after which the business process will be resumed;
  • Time – indicates the specific time for resuming the business process.

Note: If in the Time mode, at the time of the action execution the indicated date occurs in the past (for example, the previous year was indicated and the execution of the action has started in the current year), the process will automatically go to the action that follows the pause in execution. In other words, the process will skip the action.
Action block
Action block is intended to group a set of actions into one block that can be 'folded' to save space.

Pay attention to this action. It permits you to significantly save labor resources by using standard action blocks when creating a business process template. Once created and set up, the action block can be saved in the group My Actions and used repeatedly.

Select employee
This action permits you to automatically select an employee for their further use in the process.
Note: This action determines the absence of an employee according to the entries displayed on the page Absence chart.

Action Parameters

Type:

  • any – random selection of a regular employee;
  • supervisor – selection of a supervisor for the indicated employee.
    Note: The supervisor selection option is used only in the product Bitrix24 Self-hosted.

From users – indicates users or groups from which one employee will be selected.

For user – indicates the user for whom a supervisor will be selected.

Supervisor Level (the more the higher) – selects the level of a supervisor for the indicated user.

If no Supervisor is determined, send to – indicates the users who will be selected in case it is impossible to select from the main users indicated above. For example, if the group indicated in the field From users contains no employees, someone from among reserved users will be selected.

Escalate to higher level if absent – permits you to automatically omit absent employees, for example, if they are on vacation.

If it is impossible to select the main supervisor, for example, if they are on vacation, and the option Escalate to higher level if absent is equal to Yes, the action will automatically continue selecting a supervisor but of a higher level. If the top level supervisor is also unavailable, the selection will be effected from among the employees indicated in the field If no Supervisor is determined, send to.

If the option Escalate to higher level if absent is equal to No, the action will terminate and, notwithstanding the absence, a supervisor of the relevant level will be selected.

If all supervisors are unavailable or the employee has no supervisor, the action will return an empty value.

Action Results

The results of this action can be obtained using the form Insert value - Additional results where they will be available immediately after adding the action to the template.

The following is available:

  • Selected Employee.
Log entry
This action permits you to add arbitrary entries to the report and log, accordingly.

Entries to the report can be conveniently used, for example, during business process debugging to save the data of a necessary stage to the report.

Action Parameters

Load log for use by business process – permits you to obtain the contents of the entire report as a part of a business process for further actions (e.g., sending by email) by using the form Insert value, the Additional results section. Otherwise, the report data will be impossible to obtain as a part of a business process and will be available only in the log.

The option Load log for use by business process can be useful at the stage of the completion of a business process in order to generate a final report without making excessive queries to the base.

Action Results

The results of this action can be obtained using the form Insert value - Additional results where they will be available immediately after adding the action to the template.

The following is available:

  • Log;
A specific variable will be created for each entry to the log in the section Additional results. If the option Load log for use by business process was marked for the action, it will help you to obtain the log which was already generated at the stage of this action. The log of each subsequent action will include the log of the previous actions. If the option was not marked, the variable will be empty.
Set Permission

This action permits establishing the rights of access to the document.

Action Parameters

"..." permission is granted to – setup of rights of the document for the indicated users/user groups.

Note: Different types of rights exist for different types of documents.
Overwrite existing permissions – permits you to not add rights but replace them. In this case, we work only with the rights that are set inside the business process.

If the document uses simplified (old) version of rights, they are set strictly from the outside (access settings to infoblocks/lists/etc.). The only option that permits establishing rights directly from the business process consists in establishing business processes rights for the document from the outside. In this case, it is possible to change rights during the execution of the process using the tab Access or the action Set Permission.

If extended rights of access are used, only new rights to the document can be added from the business process; the document will keep these rights even after the process is completed. The rights established from the outside cannot be redefined inside a business process.

Set Variables
This action permits changing the values of the variables set in template settings.

Action Parameters

Drop-down lists are used to select variables and set the necessary values for them.
Terminate business process
This action permits you to terminate the execution of a business process.

Please note that all consultations and assistance with business process setup are provided exclusively by local Bitrix24 partners.

This helped Thanks :) This didn't help Sorry :(
Could you please tell us why:
It's not what I'm looking for
It's too complicated

Did not find an answer to your question?

Send your question to the Bitrix24Care team
Access to technical support specialists requires commercial plan subscription and is not available to free account users. Free accounts are limited to self-support resources such as product manuals, helpdesk articles, video tutorials, and free webinars. Technical assistance, training, setup, customization and other value added services can also be purchased directly from local Bitrix24 partners