KMP PHP API Reference

RecommendationApprovalWorkflowSyncService
in package
uses LocatorAwareTrait

Restarts open award recommendation approvals against current configuration.

Table of Contents

Constants

ACTIVE_SYNC_FAILURE_REASON  : mixed = 'Active recommendation approval workflow restar...
APPROVAL_STATES  : mixed = ['Submitted', 'In Consideration', 'Awaiting Fee...

Properties

$lifecycleService  : RecommendationApprovalWorkflowLifecycleService
$workflowEngine  : WorkflowEngineInterface

Methods

__construct()  : mixed
countOutdatedRecommendations()  : int
Count active recommendations assigned to a process but running an older configuration.
findOutdatedRecommendationRunMap()  : array<int, array<string|int, int>>
Find active runs that differ from the process or workflow currently assigned to their recommendations.
restartRecommendation()  : array{status: string, cancelledRunCount?: int, newRunId?: int}
Restart all active runs for one eligible recommendation atomically.
syncApprovalProcess()  : ServiceResult
Restart only outdated active recommendation approvals assigned to one current process.
isEligibleForRestart()  : bool
Terminal, grouped, deleted, and bestowal-owned recommendations are never restarted.
isRunOutdated()  : bool
Determine whether one run predates the current process snapshot or workflow definition.
latestLegacyConfigurationChange()  : DateTime|null
Find the latest step change for pre-snapshot runs, including soft-deleted steps.
restartRecommendations()  : void
Restart selected recommendations and add their outcomes to a bulk summary.

Constants

Properties

Methods

countOutdatedRecommendations()

Count active recommendations assigned to a process but running an older configuration.

public countOutdatedRecommendations(int $approvalProcessId) : int
Parameters
$approvalProcessId : int
Return values
int

findOutdatedRecommendationRunMap()

Find active runs that differ from the process or workflow currently assigned to their recommendations.

public findOutdatedRecommendationRunMap(int $approvalProcessId[, array<string|int, mixed>|null $recommendationIds = null ]) : array<int, array<string|int, int>>
Parameters
$approvalProcessId : int
$recommendationIds : array<string|int, mixed>|null = null
Return values
array<int, array<string|int, int>>

Active run IDs keyed by recommendation ID.

restartRecommendation()

Restart all active runs for one eligible recommendation atomically.

public restartRecommendation(int $recommendationId, int $approvalProcessId, array<string|int, mixed> $expectedRunIds, int $actorId) : array{status: string, cancelledRunCount?: int, newRunId?: int}
Parameters
$recommendationId : int
$approvalProcessId : int
$expectedRunIds : array<string|int, mixed>
$actorId : int
Return values
array{status: string, cancelledRunCount?: int, newRunId?: int}

syncApprovalProcess()

Restart only outdated active recommendation approvals assigned to one current process.

public syncApprovalProcess(int $approvalProcessId, int $actorId) : ServiceResult

Active progress is never mapped into the replacement workflow. Each recommendation is isolated in its own transaction so a failed restart preserves its original workflow.

Parameters
$approvalProcessId : int

Approval process whose assigned recommendations may restart.

$actorId : int

Member performing the synchronization.

Return values
ServiceResult

latestLegacyConfigurationChange()

Find the latest step change for pre-snapshot runs, including soft-deleted steps.

private latestLegacyConfigurationChange(int $approvalProcessId) : DateTime|null
Parameters
$approvalProcessId : int
Return values
DateTime|null

restartRecommendations()

Restart selected recommendations and add their outcomes to a bulk summary.

private restartRecommendations(array<int, array<string|int, int>> $outdatedRunMap, int $approvalProcessId, int $actorId, array<string, mixed> &$summary) : void
Parameters
$outdatedRunMap : array<int, array<string|int, int>>

Run IDs keyed by recommendation ID.

$approvalProcessId : int

Current approval process ID.

$actorId : int

Synchronizing member ID.

$summary : array<string, mixed>

Bulk summary, updated in place.

On this page

Search results