Skip to content

Gracefully handle form key expression evaluation failures during task retrieval #142

@prajwolbhandari1

Description

@prajwolbhandari1

Description

When retrieving a task or task list, the engine currently attempts to evaluate the task’s form key expression. If this evaluation fails (for example due to missing variables or an invalid expression), the entire task or task list retrieval fails.

This behavior is undesirable because:

A single task with an invalid form key expression can block task list retrieval.
Form key evaluation should not be a hard requirement to fetch task metadata.
Instead, when a form key expression cannot be evaluated during task retrieval, the engine should fail gracefully by:

Leaving the form key as null or empty
Allowing the task or task list retrieval to succeed
This improves robustness and prevents UI/API failures caused by non‑critical expression issues.

Expected Behavior

Task and task list APIs return results even if the form key expression fails to evaluate
The affected task’s formKey field is null or omitted
No exception is propagated to the API consumer

Acceptance Criteria

Task retrieval (GET /task/{id}) succeeds even if form key expression evaluation fails
Task list retrieval (GET /task) succeeds even if one or more tasks have invalid form key expressions
Form key is returned as null or empty for tasks where evaluation fails
Existing valid form key behavior remains unchanged

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions