Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support migration mapping for error event sub processes #23850

Merged
merged 4 commits into from
Oct 24, 2024

Conversation

pedesen
Copy link
Contributor

@pedesen pedesen commented Oct 22, 2024

Description

  • support mapping of error event sub processes including containing error start events
  • add test coverage

Checklist

Related issues

closes #23804

@github-actions github-actions bot added the component/operate Related to the Operate component/team label Oct 22, 2024
@pedesen pedesen force-pushed the fe-23804-migrate-error-elements branch from 25a4d3c to 03e57b4 Compare October 22, 2024 15:52
@pedesen pedesen force-pushed the fe-23804-migrate-error-elements branch from 03e57b4 to 7e51f54 Compare October 22, 2024 15:55
@pedesen pedesen marked this pull request as ready for review October 22, 2024 16:22
Comment on lines +718 to +735
/**
* Business rule task
*/
await processInstancePage.diagram.clickFlowNode('Business rule task 2');
await processInstancePage.diagram.showMetaData();

/**
* Expect that the incident for the business rule task has been migrated.
* The target task "Business rule task 2" has a different called decision "invalid2"
* which is expected to be overwritten with the decision key "invalid".
*/
await expect(
processInstancePage.metadataModal.getByText(
"Expected to evaluate decision 'invalid', but no decision found for id 'invalid'",
),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just moved this to the end of the tests, since it caused some issues when it was executed first.

Comment on lines +663 to +677
* Expect that the script task incident has been migrated.
* The target task "Script task 2" has a FEEL expression which would be
* evaluated immediately which is expected to be overwritten with the incident.
*/
await expect(
processInstancePage.metadataModal.getByText(
"Expected to evaluate decision 'invalid', but no decision found for id 'invalid'",
),
processInstancePage.metadataModal.getByText('expected worker failure'),
).toBeVisible();

await processInstancePage.metadataModal
.getByRole('button', {name: /close/i})
.click();
await processInstancePage.diagram.clickFlowNode('Script task 2'); // deselect Script task 2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just moved the business rule section to the end of the tests, nothing else was changed related to script task or business rule task

Comment on lines +697 to +719
* Task G
*/
await processInstancePage.diagram.clickFlowNode('Send task 2');
await processInstancePage.diagram.clickFlowNode('Task G');
await processInstancePage.diagram.showMetaData();

/**
* Expect that the active send task with task worker "foo" has been migrated.
* The target task "Send task 2" has the task type "failingTaskWorker", which would
* end up in an incident state. This is expected to be overwritten with the "foo" worker type.
* Expect that Task G has been migrated. The target Task G is following an error event "error2"
* which is never thrown. Without a successful migration Task G would not be active.
*/
await expect(
processInstancePage.metadataModal.getByText('expected worker failure'),
processInstancePage.metadataModal.getByText('endDate'),
).toBeVisible();
await expect(
processInstancePage.metadataModal.getByText('"endDate": "null"'),
).not.toBeVisible();

await processInstancePage.metadataModal
.getByRole('button', {name: /close/i})
.click();
await processInstancePage.diagram.clickFlowNode('Task G'); // deselect Script task 2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The part related to Task G was added.

@@ -60,6 +60,7 @@
<bpmn:outgoing>Flow_1eim29b</bpmn:outgoing>
<bpmn:outgoing>Flow_08q3qdg</bpmn:outgoing>
<bpmn:outgoing>Flow_17wkkw8</bpmn:outgoing>
<bpmn:outgoing>Flow_13sckg7</bpmn:outgoing>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff: Error event sub process was moved inside a sub process to isolate the error handling.

image

@@ -118,6 +118,7 @@
<bpmn:outgoing>Flow_1w3h29f</bpmn:outgoing>
<bpmn:outgoing>Flow_1lx7h0o</bpmn:outgoing>
<bpmn:outgoing>Flow_1ggtty0</bpmn:outgoing>
<bpmn:outgoing>Flow_030xtpk</bpmn:outgoing>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff: error event sub process was added:

image

@@ -145,6 +145,7 @@
<bpmn:outgoing>Flow_1ixacpg</bpmn:outgoing>
<bpmn:outgoing>Flow_0796mcu</bpmn:outgoing>
<bpmn:outgoing>Flow_0t0hay3</bpmn:outgoing>
<bpmn:outgoing>Flow_0hc14mk</bpmn:outgoing>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff: error event sub process was added:

image

@pedesen
Copy link
Contributor Author

pedesen commented Oct 23, 2024

@Szik Please test with this image: registry.camunda.cloud/team-operate/camunda-operate:branch-fe-23804-migrate-error-elements

@pedesen pedesen requested a review from Szik October 23, 2024 15:45
@pedesen pedesen added this pull request to the merge queue Oct 24, 2024
Merged via the queue into main with commit 3871a6e Oct 24, 2024
55 checks passed
@pedesen pedesen deleted the fe-23804-migrate-error-elements branch October 24, 2024 15:02
github-merge-queue bot pushed a commit that referenced this pull request Oct 25, 2024
… sub processes (#24054)

# Description
Backport of #23850 to `stable/8.6`.

relates to #23804
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/operate Related to the Operate component/team version:8.6.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I can migrate error boundary event and error event sub process
3 participants