Documentation

bizproc.task.complete

This method completes workflow tasks. Presently, the tasks Document approval and Document review can be executed. Only your own task can be completed, as well as the task, not completed yet.

Parameters

Parameter Description Available from version
TASK_ID Task ID, required.
STATUS Target task status, required. List of accessible values:
  • 1 or yes - "Yes" response (approved)
  • 2 or no - "No" response (rejected)
  • 3 or ok - "Ok" response (reviewed)
  • 4 or cancel - "Cancellation" response (presently is not used)
COMMENT User comment, task parameters govern whether it is required or not.

Example

function completeTask(id, status, comment, cb)
    {
        var params = {
            TASK_ID: id,
            STATUS: status,
            COMMENT: comment
        };

        BX24.callMethod(
            'bizproc.task.complete',
            params,
            function(result)
            {
                if(result.error())
                    alert("Error: " + result.error());
                else if (cb)
                    cb();
            }
        );
    }


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-2021, «Bitrix Inc.», 2021