Documentation

PullManager

Description and methods

Bitrix\Rpa\Integration\PullManager - class for push sending.

Can operate only after connecting the module pull. The module is connected in constructor.

The class has methods for subscription to pushes and push sending.

Methods

Method Description Available from version
public function isEnabled(): bool Returns true when module pull was successfully connected and pushes are operational.

Event subscription

Subscription methods return a tag on successful subscription. When there is no tag, subscription attempt has failed.

Method Description Available from version
public function subscribeOnTimelineUpdate(int $typeId, int $itemId): ?string Subscription to all timeline events with ID $itemId of process with ID $typeId.
public function subscribeOnKanbanUpdate(int $typeId): ?string Subscription to all kanban events of process with ID $typeId.
public function subscribeOnItemUpdatedEvent(int $typeId, int $itemId): ?string Subscription to event of item update with ID $itemIdof process with ID $typeId.
public function subscribeOnTaskCounters(): ?string Subscription to event of task counter update.

Push sending

Methods for push sending return true when push was sent out.

When method has $eventId, its a string event ID which will be passed to push.

Method Description Available from version
public function sendTimelineAddEvent(Timeline $timeline, string $eventId = ''): bool Sends push on adding $timeline entry.
public function sendTimelineUpdateEvent(Timeline $timeline, string $eventId = ''): bool Sends push on updating $timeline entry.
public function sendTimelinePinEvent(Timeline $timeline, string $eventId = ''): bool Sends push on updating attachment status flag of a timeline entry.
public function sendTimelineDeleteEvent(int $typeId, int $itemId, int $timelineId, string $eventId = ''): bool Sends push on deleting timelien entry with $timelineId of item $itemId of process $typeId.
public function sendItemAddedEvent(Item $item, string $eventId = ''): bool Sends push on adding item $item.
public function sendItemUpdatedEvent(Item $item, string $eventId = '', Item $historyItem = null): bool Sends push on updating item $item.
public function sendItemDeletedEvent(Item $item, string $eventId = ''): bool Sends push when deleting item $item.
public function sendRobotAddedEvent(int $typeId, int $stageId, array $data = []): bool Sends push when adding new automation rule with $data at the stage $stageId of process $typeId.
public function sendRobotUpdatedEvent(int $typeId, int $stageId, array $data = []): bool Sends push when updating automation rule with data $data at stage $stageId of process $typeId.
public function sendRobotDeletedEvent(int $typeId, int $stageId, string $robotName, string $eventId = ''): bool Sends push when deleting automation rule with name $robotName at the stage $stageId of process $typeId.
public function sendTypeUpdatedEvent(Type $type, string $eventId = ''): bool Sends push when adding new process $type.
public function sendStageAddedEvent(Stage $stage, string $eventId = ''): bool Sends push when adding new stage $stage.
public function sendStageUpdatedEvent(Stage $stage, string $eventId = ''): bool Sends push when updating stage $stage.
public function sendStageDeletedEvent(int $stageId, int $typeId, string $eventId = ''): bool Sends push when deleting stage with identifier $stageId of process $typeId
public function sendTaskCountersEvent(int $typeId, int $itemId, array $counters): bool< Sends push when updating counters of item $itemId of process $typeId.

Information about counters $counters must look as follows: Key - its a user ID, value - is a string '+1' when counter was increased and '-1'; when decreased.

public function addItemUpdateEventId(int $typeId, int $itemId, string $eventId): PullManager Adds event ID $eventId when updating item with ID $itemId of process with ID $itemId.

When automation is operating, sometimes its difficult to get into management flow to pass event ID directly into it.

For this ID not to get lost, it can be added using this method

.


© «Bitrix24», 2001-2022
Up