Documentation

bizproc.workflow.template.list

The method bizproc.workflow.template.list returns list of workflow templates, specified for a site. This method requires administrator access permissions.

Method Description
ID Workflow ID.
MODULE_ID Module ID (as per document)
ENTITY Entity ID (as per document)
DOCUMENT_TYPE Document type
AUTO_EXECUTE Autoexecution rules:
0 - without autoexecution
1 - when added
2- when modified
3 - added + modified
NAME Template name
TEMPLATE Workflow template (array with description of actions pattern).
PARAMETERS Template parameters, array with properties description.
VARIABLES Template variables, array with properties description.
CONSTANTS Template constants, array with properties description.
MODIFIED Date when last modified.
IS_MODIFIED [Y\N] When modified flag. Applicable for templates, provided in Bitrix24 Self-hosted editions (that have system code).
USER_ID ID of the user who created/modified the template.
SYSTEM_CODE Template system code that is applicable for identifying standard template types, activities, automation temples 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);
         }
      }
   );
}


© «Bitrix24», 2001-2022
Up