Documentation

TaskManager

Bitrix\Rpa\Integration\Bizproc\TaskManager - Middleware class between rpa and bizpoc workflow module.

Module bizproc attempts to connect in the constructor. When its fails, throws exception.

Methods

Method Description Available from version
public function onItemStageUpdate(Item $item, int $stageId, int $userId): bool Attempts to execute tasks automatically. Returns true when task was completed automatically.
public function getItemTaskParticipants(Item $item, int $taskUserStatus = null): array Returns array of task participants of item $item with status $taskUserStatus.
public function getItemFaces(int $typeId, int $itemId): array Returns array of descriptions of users for rendering sequence of assigning/executing item tasks with ID $itemId of process $typeId.
public function getIncompleteItemTasks(Item $item, int $userId = null): array Return array of descriptions for incomplete item tasks $item for the user $userId (when it was passed, otherwise for all tasks).
public function getTaskById(int $taskId): ?array Returns task data by its ID $taskId.
public function getTaskUsers(int $taskId): array Returns task user data with ID $taskId.
public function countTypeStageRobots(int $typeId, int $stageId): int Returns number of automation rules at a stage with ID $stageId of process $typeId.
public function getTypeStageTasks(int $typeId, int $stageId): array Returns information on tasks at the stage with ID $stageId of process $typeId.
public function getUserIncompleteTasksByType(array $typeIds = [], int $userId = null): array Returns user $userId task data from the list of process IDs $typeIds.

When $userId is not set, performs calculation for current user.

When $typeIds is empty, performs search by all processes.

public function getUserIncompleteTasksForType(int $typeId, int $userId = null): array Similar to previous method, returns user $userId task data, but for a specific process with ID $typeId.
public function getUserTotalIncompleteCounter(int $userId = null): int Returns counter of incomplete user ID $userId tasks.

When $userId is not passed, calculates for current user.

public function getUserItemIncompleteCounter(Item $item, int $userId = null): int Returns counter of incomplete tasks at the item $item of user with ID $userId. When $userId is not passed, calculates for current user.
public function getTimelineTasks(Item $item, $userId = null): array Returns task description for item $item timeline for the user with ID $userId. When $userId is not passed, calculates for current user.


© «Bitrix24», 2001-2024
Up