Skip to content

Spike: evaluate running multiple workflow actions in one Action Center execution #36818

Closed as not planned

Description

@rjvelazco

Research Question

Can a user select several workflow actions in the Content Drive Action Center and have them run together over the same selection — and if so, what does "together" actually mean given that a contentlet can only occupy one workflow step at a time?

The Action Center ships with single-select (see the linked task), but the design mock and the product expectation are that multiple bulk actions can be triggered at once. This spike decides whether that is achievable, and at what cost.

Timebox

4h

Acceptance Criteria

  • Document whether multiple workflow actions can be applied to the same contentlet in one user operation, and state plainly whether the blocker is the data model, the API surface, or both
  • Evaluate sequential execution with re-validation: fire action A, re-query POST /api/v1/workflow/contentlet/actions/bulk, drop any subsequently-selected action no longer available, continue. Assess correctness, number of round trips, and how confusing the result is to a user
  • Define what the UI reports when a later action becomes invalid mid-run — partial success is the normal outcome, not an error case
  • Assess whether a backend endpoint accepting an ordered list of action ids is feasible and worthwhile, or whether it would just move the same sequencing problem server-side
  • Cover the interaction with per-item results: today bulk/fire returns aggregate successCount / skippedCount / fails[], with no per-action-per-item breakdown, which multi-action reporting would need
  • Produce a recommendation: implement sequential-with-revalidation, request a backend endpoint, or keep single-select and adjust the design
  • If the recommendation implies backend work, capture it precisely enough to file as its own ticket

Context

Findings already established that the spike should start from rather than rediscover:

A contentlet occupies exactly one workflow step at a time. workflow_task carries ALTER TABLE workflow_task ADD CONSTRAINT unique_workflow_task UNIQUE (webasset, language_id), and the task's status column holds a single current step id (task.setStatus(processor.getNextStep().getId()) in WorkflowAPIImpl). findTaskByContentlet returns one task, and there is no scheme column on it. So even when a content type has several schemes assigned, a contentlet is only ever "in" one of them.

Consequences. Firing action A writes A's nextStep to that single row. A second action fired "at the same time" would target the same row, and its precondition — being in the step that exposes it — may no longer hold. This is a data-model property, not merely a missing endpoint.

No endpoint accepts multiple actions. FireBulkActionsForm takes a single workflowActionId; /actions/default/fire/{systemAction} takes a single system action. Concurrency does exist, but across contentlets: distributeWorkAndProcess partitions a batch across the BULK_ACTIONS_THREAD_POOL. One action over many items is genuinely parallel; several actions over one item is not.

Useful side effect worth confirming in the spike: because each contentlet sits in exactly one step, the per-scheme counts in the dialog partition the selection — they never overlap. Select 5 items and see Editorial (2) and System (3) and those are disjoint subsets. This is also why a mixed selection partially skips, reported via skippedCount and skipReason.

Precedent. The legacy bulk-actions dialog (view_bulk_actions_inc.jsp) is strictly one action per click — one button per action, click fires it. No multi-select was ever offered there.

Links

  • Parent epic: [EPIC] CD: Workflow Actions #33999
  • Legacy implementation: dotCMS/src/main/webapp/html/portlet/ext/contentlet/view_bulk_actions_inc.jsp
  • Relevant backend: WorkflowAPIImpl.distributeWorkAndProcess, WorkflowHelper.findBulkActions, WorkflowActionUtils.filterBulkActions
  • Unique constraint migration: Task05200WorkflowTaskUniqueKey

Activity

  1. added
    Type : Spike
    on Jul 30, 2026
  2. added theissue type on Jul 30, 2026
  3. rjvelazco commented on Aug 3, 2026

    @rjvelazco
    MemberAuthor

    We are going to deliver this with action execution as per discussed with @fmontes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team : ScoutType : SpikedotCMS : Workflow

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions