Skip to content

Feature: support COMPLETE_TASK action type for ACTIONBUTTON in page/snippet MDL #155

@engalar

Description

@engalar

Problem

When building workflow user task pages via MDL, there is no way to create outcome buttons that complete the user task. The ACTIONBUTTON widget's Action: property supports SAVE_CHANGES, CANCEL_CHANGES, CLOSE_PAGE, DELETE, MICROFLOW, SHOW_PAGE, and CREATE_OBJECT THEN SHOW_PAGE, but not the Mendix built-in Complete task action.

This means workflow task pages created via mxcli cannot have functional outcome buttons — they must be manually added in Studio Pro.

Expected syntax

-- Complete user task with a specific outcome
ACTIONBUTTON btnApprove (
  Caption: 'Approve',
  Action: COMPLETE_TASK '协商新交期',
  ButtonStyle: Success
)

-- Or with parameterized outcome
ACTIONBUTTON btnOutcome (
  Caption: 'Complete',
  Action: COMPLETE_TASK $OutcomeName
)

Context

Workflow user task pages receive $WorkflowUserTask: System.WorkflowUserTask as a parameter. Each workflow defines named outcomes (e.g., '协商新交期', '取消订单', '升级处理'). In Studio Pro, buttons use the "Complete task" action with an outcome name to advance the workflow. Without this in MDL, workflow task pages are incomplete and require Studio Pro to add the final piece.

Workaround

Currently the only workaround is to create a Java action that calls Core.workflows().complete() and invoke it via a microflow, which is verbose and error-prone for something that should be a single action declaration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions