Skip to main content

IScheduledCrossOrderedTasks

Asset Tokenization Studio Team

Scheduled Cross-Ordered Tasks Interface

Defines the external API for querying and triggering cross-ordered scheduled tasks.

Cross-ordered tasks coordinate execution ordering across scheduled task queues. Trigger functions may mutate queue state and execute due downstream tasks through the implementation.

Methods​

getScheduledCrossOrderedTasks​

function getScheduledCrossOrderedTasks(uint256 _pageIndex, uint256 _pageLength) external view returns (struct ScheduledTask[] scheduledTask_)

Returns a paginated list of queued cross-ordered scheduled tasks.

Pagination bounds and ordering are defined by the implementation's scheduled task store.

Parameters​

NameTypeDescription
_pageIndexuint256Zero-based page index to query.
_pageLengthuint256Maximum number of scheduled tasks to return.

Returns​

NameTypeDescription
scheduledTask_ScheduledTask[]Cross-ordered scheduled tasks contained in the requested page.

initializeScheduledCrossOrderedTasks​

function initializeScheduledCrossOrderedTasks() external nonpayable

Initialises the scheduled-cross-ordered-tasks capability on the token.

Callable once; subsequent calls revert with FacetAlreadyRegistered. Requires DEFAULT_ADMIN_ROLE. Called by the factory during deployment.

scheduledCrossOrderedTaskCount​

function scheduledCrossOrderedTaskCount() external view returns (uint256)

Returns the number of queued cross-ordered scheduled tasks.

Reads only the cross-ordered task queue and does not filter by due timestamp.

Returns​

NameTypeDescription
_0uint256Number of scheduled cross-ordered tasks currently queued.

triggerPendingScheduledCrossOrderedTasks​

function triggerPendingScheduledCrossOrderedTasks() external nonpayable returns (uint256)

Triggers all currently due cross-ordered scheduled tasks.

Mutates scheduled task queues and may trigger one due downstream task per cross-ordered task. A failing task reverts the entire call.

Returns​

NameTypeDescription
_0uint256Number of cross-ordered tasks processed from the queue.

triggerScheduledCrossOrderedTasks​

function triggerScheduledCrossOrderedTasks(uint256 _max) external nonpayable returns (uint256)

Triggers due cross-ordered scheduled tasks up to a requested maximum.

Mutates scheduled task queues and may trigger one due downstream task per cross-ordered task. Passing zero may be treated by implementations as no explicit limit.

Parameters​

NameTypeDescription
_maxuint256Maximum number of due cross-ordered tasks to process.

Returns​

NameTypeDescription
_0uint256Number of cross-ordered tasks processed from the queue.

Events​

ScheduledCrossOrderedTasksInitialized​

event ScheduledCrossOrderedTasksInitialized()

Emitted once when the scheduled-cross-ordered-tasks capability is initialised on a token.

Fires exclusively from initializeScheduledCrossOrderedTasks.

TaskExecutionFailed​

event TaskExecutionFailed(bytes32 indexed actionId, bytes32 indexed taskType, uint256 scheduledTimestamp)

Emitted when execution of a scheduled task fails.

Parameters​

NameTypeDescription
actionId indexedbytes32Corporate action identifier or task type associated with the failed task.
taskType indexedbytes32Scheduled task category or dispatch type that failed.
scheduledTimestampuint256Timestamp at which the failed task was scheduled to become due.