Documentation

bizproc.workflow.instances

bizproc.workflow.instances returns list of launched workflows.

Important: this method is available for the administrator only.

Parameter Description Value by default
SELECT

Array of record fields to be returned by the method. Only those fields that are necessary can be specified.

Accessible fields:

ID - workflow ID;

OWNED_UNTIL - time for blocking of a workflow. Process is considered as unresponsive, if the difference of blocking time with the current time is more than 5 minutes;

MODULE_ID - module ID (as per document);

ENTITY - entity ID (as per document);

DOCUMENT_ID - document ID;

STARTED - workflow launch date;

STARTED_BY - who launched the workflow;

TEMPLATE_ID - workflow template ID.

['ID', 'MODIFIED', 'OWNED_UNTIL']

FILTER

Array type {"filtered_field": "filter value" [, ...]}. List of filtered fields is the same, as for the SELECT parameter.

Type of filtration can be specified in front of the name of filtered field:

  • "!" - not equal;
  • "<" - less;
  • "<=" - less or equal;
  • ">" - more;
  • ">=" - more or equal.
ORDER

Array for result sorting. Array type {"sorting_field": 'sorting direction' [, ...]}. List of fields for sorting is the same, as for the SELECT parameter.

Sorting direction can have the following values:

  • asc - by ascension;
  • desc - by descension.

{'MODIFIED': 'desc'}

Example

BX24.callMethod(
   'bizproc.workflow.instances',
   {
      select: ['ID', 'MODIFIED', 'OWNED_UNTIL', 'MODULE_ID', 'ENTITY', 'DOCUMENT_ID', 'STARTED', 'STARTED_BY', 'TEMPLATE_ID'],
      order: {STARTED: 'DESC'},
      filter: {'>STARTED_BY': 0}
   },
   function(result)
   {
      if(result.error())
         alert("Error: " + result.error());
      else
         console.log(result.data());
   }
);

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