Business Process Templates: Overview of Methods
A business process template is a logical scheme. It implements business logic through actions and operations in the business process designer.
Quick navigation: all methods and events
User documentation:
Add a Business Process Template
The method bizproc.workflow.template.add adds a template to Bitrix24 from a file with the .bpt extension. To obtain the file, configure the business process template and export it.
The resulting file can be used as a template in the desired Bitrix24.
User documentation
Application Context
The system ties the new template to an application. Templates created by the method bizproc.workflow.template.add can only be updated or deleted in the context of the application they were created with.
Template Connection to Document
Each template is linked to a base object whose data it manages. For example, a template may be linked to CRM deals. In this case, the base object will be a specific deal for which the business process is initiated.
The connection to the base object defines the launch context: you cannot start a process for a lead using a template for a deal.
The template is linked to the document through the DOCUMENT_TYPE parameter, which is an array of three elements:
- module identifier
- object type
- document type
For example, ['crm', 'CCrmDocumentLead', 'LEAD'].
The values in the array are interrelated. If the first element is 'crm', the others must correspond to CRM. It is important to ensure the correctness of the values.
Possible Values
Module Identifier. Indicates the scope of the business process template.
crm— CRMlists— Universal listsdisk— Bitrix24 Disk
Object Identifier. The object within the specified module. For example, in CRM, the object can be a lead or a deal.
CRM
CCrmDocumentLead— leadsCCrmDocumentContact— contactsCCrmDocumentCompany— companiesCCrmDocumentDeal— dealsBitrix\Crm\Integration\BizProc\Document\Quote— estimatesBitrix\Crm\Integration\BizProc\Document\SmartInvoice— invoicesBitrix\Crm\Integration\BizProc\Document\Dynamic— SPAs
Lists
BizprocDocument— processes in the news feedBitrix\Lists\BizprocDocumentLists— lists in groups
Disk
Bitrix\Disk\BizProcDocument
Document Type. Binding to a specific document of the specified object.
CRM
LEAD— leadsCONTACT— contactsCOMPANY— companiesDEAL— dealsQUOTE— estimatesSMART_INVOICE— invoicesDYNAMIC_XXX— SPAs, where XXX is the SPA identifier
Universal Lists
iblock_XXX— information block, where XXX is the information block identifier
Disk
STORAGE_XXX— disk storage, where XXX is the storage identifier
Get List of Templates
To obtain a list of all templates in the account, use the method bizproc.workflow.template.list. To get a list of application templates, specify the FILTER parameter with the SYSTEM_CODE field and the symbolic code of the application, for example, "SYSTEM_CODE": "rest_app_5".
Overview of Methods
Scope:
bizprocWho can execute the method: depending on the method
|
Method |
Description |
|
Add a business process template from a file |
|
|
Update a template |
|
|
Get a list of templates |
|
|
Delete a template |