Skip to content

TryTask: wrong jsonPosition generation when using the catch.do field #1414

Closed

Description

@wmedvede

What happened:

The attached workflows try-catch-with-retry and try-catch-with-retry-and-do, are basically the same, with the only difference that the second, incorporates the do construct in the catch.

see:

      catch:
        do:
          - executeAfterFailingTask:
              set:
                setAfterFailingTask: "No problem"

All the rest is the same, however, when the first workflow is executed, we can observe the following jsonPositions generated:

try-catch-with-retry:

The attemptTask gets this jsonPosition:

OnTaskStarted task: attemptTask taskId: do/0/attemptTask/do taskType: TRY iteration: 1 isRetrying: false retryAttempt: 0

and the child task failingTask gets this position:

OnTaskStarted task: failingTask taskId: do/0/attemptTask/do/0/failingTask taskType: RAISE iteration: 1 isRetrying: false retryAttempt: 0

try-catch-with-retry-and-do

The attemptTask gets this jsonPosition:

OnTaskStarted task: attemptTask taskId: do/0/attemptTask/do/do taskType: TRY iteration: 1 isRetrying: false retryAttempt: 0

and the child task failingTask gets this position:

OnTaskStarted task: failingTask taskId: do/0/attemptTask/do/0/failingTask taskType: RAISE iteration: 1 isRetrying: false retryAttempt: 0

and the task inside the do gets this position:

OnTaskStarted task: executeAfterFailingTask taskId: do/0/attemptTask/do/do/0/executeAfterFailingTask taskType: SET iteration: 1 isRetrying: false retryAttempt: 0

The following situations are observed:

  1. The "attemptTask, which has basically the same name, and is located in the same position in both workflwos gets the following jsonPositions:

try-catch-with-retry: -> do/0/attemptTask/do

try-catch-with-retry-with-do: -> do/0/attemptTask/do/do

Doesn't look consistent.

  1. The child task failingTask however gets the same jsonPosition in both cases: do/0/attemptTask/do/0/failingTask

What you expected to happen:

The "attemptTask" should have the same jsonPosition in both cases.

Also, considering that in the model we have that the TryTask has:

public List getTry() {
    return this._try;
}

the positon could be do/0/attemptTask/try instead

How to reproduce it:

Anything else we need to know?:

Environment:

  • Specification version used:

test-try-catch-wity-retry.yaml

test-try-catch-wity-retry-and-do.yaml

Activity

  1. changed the title [-]RetryTask: wrong jsonPosition generation when using the catch.do field[/-] [+]TryTask: wrong jsonPosition generation when using the catch.do field[/+] on Jun 1, 2026
  2. self-assigned this
    on Jun 1, 2026
  3. added 11 commits that reference this issue on Jun 2, 2026
    e7feb85
    77c97d7
    eb00c64
    20118b8
    df68b6f
    cee2c7e
    308d9c9
    66cccf0
    ca9903e
    74475bb
    45ef451
  4. added a commit that references this issue on Jun 3, 2026
    e5e2147
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions