Allow configurable auto-decline delay on Review steps (VH/CI) — same as existing PendingApproval timeout for Resource Owners (PR)

What is a one sentence summary of your feature request?

Add a configurable automatic decline timeout on Review activities (Review_VH, Review_CI) in workflows, similar to the existing 15-day automatic decline on PR validation steps.

Please describe your idea in detail. What is your problem, why do you feel this idea is the best solution, etc.

Currently, Usercube natively supports an automatic decline mechanism for the PR (Propriétaire de Ressource) (Resource Owner) validation step (step 1/1), which automatically refuses pending requests after 15 calendar days. However, no equivalent timeout mechanism exists for Review-type activities such as Review_VH (Hierarchical Validator) or Review_CI (Identity Correspondent).

In our rights management workflows (e.g., Workflow_Directory_User_Manage_Rights_US_CI), when a request reaches the Review_VH or Review_CI step, it stays in Review-ReviewPending state indefinitely if the reviewer does not act. This leads to a growing backlog of stale pending requests that clutter the review queues, create confusion for end users who never receive a final answer, and generate unnecessary alerts.

Our proposal:

---- Option A ----
Extend the PolicyAutomationRule or introduce a new attribute on elements to support automatic decline on Review activities. For example, either:

← New WorkflowState value in PolicyAutomationRule →
'PolicyAutomationRule Policy=“Default” WorkflowState=“ReviewPending” HoursToWait=“504” Decision=“Decline” EntityType=“Directory_User”/>

----Option B ----
Add a configurable AutoDeclineDelay attribute (in calendar days) on <-Activity> elements with Template=“Review” in the workflow XML configuration.

← New attribute on Activity →
'Activity Identifier=“Review_VH” Template=“Review” AutoDeclineDelay=“504” />

When the ActivityInstance in Review-ReviewPending state exceeds this delay, the platform would automatically execute the Review-ReviewPending-Decline transition, just as it does for PR validation. Ideally, this should also:

  • Log an automatic decline comment (e.g., “Automatically declined: no response within 21 days.”)
  • Trigger the same notification mechanism as a manual decline so the requester is informed
  • Be configurable per activity (different thresholds for VH vs. CI if needed)
    This feature would bring consistency between the PR validation timeout (already supported) and Review activity timeouts, and would eliminate the need for external workarounds.

How do you currently solve the challenges you have by not having this feature?

We currently use the native ‘PolicyAutomationRule’ for the Resource Owner (PR) step, which automatically declines requests in PendingApproval state after 336 hours (14 days). This works well and requires no custom development.

However, for the Review activities (VH / CI) in manual workflows where no such native mechanism exists, we will develop a custom PowerShell script (AutoDecline_PendingReviews.ps1) .

The script:

  1. Connects to the Usercube API using a service account (OpenID client credentials, same method as other automation scripts in the product)
  2. Queries all non-completed workflow instances for our rights management workflows
  3. Checks whether the current activity is a Review step (Review_VH or Review_CI) in Review-ReviewPending state
  4. Calculates the age of the pending review from the ActivityInstance.CreationDate
  5. If the age exceeds 21 calendar days, sends a Review-ReviewPending-Decline transition via the API with an automatic decline comment

Ideally, this feature should work similarly to the existing in Policy.xml, but applied to Review activities in manual workflows — not just the role approval workflow states. comment