Documentation

bizproc.workflow.template.list

bizproc.workflow.template.list returns list of templates for workflows, installed on the website.

Method Description
ID Workflow ID.
MODULE_ID Module ID (per document)
ENTITY Entity ID (per document)
DOCUMENT_TYPE Document Type
AUTO_EXECUTE autorun rule:
0 - without autorun
1 - when adding
2- when modifying
3 - adding + modification
NAME Template name
TEMPLATE Workflow template (array with description of activity pattern).
PARAMETERS Template parameters, array with description of properties.
VARIABLES Template variables, array with with description of properties.
CONSTANTS Template constants, array with description of properties.
MODIFIED Date when last modified.
IS_MODIFIED [Y\N] Specifies if flag was modified. Applicable for templates, supplied with the Bitrix24 On-premise editions (which have system code provided)
USER_ID ID of the user, who created/modified the template.
SYSTEM_CODE System code of the template. Used to identify standard types of templates, workflows in the Activity Stream, automation templates and etc.

Example

function getTemplates()
{
   BX24.callMethod(
      'bizproc.workflow.template.list',
      {
         select: [
            'ID',
            // 'MODULE_ID',
            // 'ENTITY',
            // 'DOCUMENT_TYPE',
            // 'AUTO_EXECUTE',
            'NAME',
            // 'TEMPLATE',
            // 'PARAMETERS',
            // 'VARIABLES',
            // 'CONSTANTS',
            'MODIFIED',
            'IS_MODIFIED',
            'USER_ID',
            'SYSTEM_CODE'
         ],
         filter: {MODULE_ID: 'crm', ENTITY: 'CCrmDocumentLead'}
      },
      function(result)
      {
         if(result.error())
            alert("Error: " + result.error());
         else
         {
            var templates = result.data();

            console.log(templates);
         }
      }
   );
}


User Comments

User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
© «Bitrix Inc.», 2001-2019, «Bitrix Inc.», 2019