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

[bug]: All the old instances of diagram [before upgrade] failing at end step [Flows 22.1 to 22.2 Migration Issue] #688

Open
SatyaCoder007 opened this issue Oct 30, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@SatyaCoder007
Copy link

Flows for APEX version

23.1 (latest)

Oracle Database version

21c

Oracle APEX version

23.1

Have you used the BPMN-Linter in Flow Designer to Validate your Diagram?

Yes

What happened?

I migrated the flow for Apex version from 22.2 to 23.1. After the migration, all the old instance of the diagram failing at end step.

Steps to reproduce

Screenshot 2023-10-30 at 5 05 16 PM
Screenshot 2023-10-30 at 5 05 32 PM

Expected behaviour

End step should complete without any error.

@SatyaCoder007 SatyaCoder007 added the bug Something isn't working label Oct 30, 2023
@SatyaCoder007 SatyaCoder007 changed the title [bug]: All the old instances of diagram failing at end step [bug]: All the old instances of diagram [Before upgarde] failing at end step Oct 30, 2023
@SatyaCoder007 SatyaCoder007 changed the title [bug]: All the old instances of diagram [Before upgarde] failing at end step [bug]: All the old instances of diagram [before upgarde] failing at end step Oct 30, 2023
@SatyaCoder007
Copy link
Author

All the instances which were created after the upgrade, all are working fine and end step is completing successfully. However, resetting the old instances are working fine. In the prod instance we can't reset the flow. We need some solution so that it shouldn't fail at end step.

@rallen2010 rallen2010 changed the title [bug]: All the old instances of diagram [before upgarde] failing at end step [bug]: All the old instances of diagram [before upgrade] failing at end step [Flows 22.1 to 22.2 Migration Issue] Nov 1, 2023
@rallen2010 rallen2010 self-assigned this Nov 1, 2023
@rallen2010
Copy link
Collaborator

This is a 22.1 to 22.2 migration problem that has surfaced on a double migration from 22.1 -> 22.2 -> 23.1.

In 22.2 we added the call activities feature which required additional columns in flow_subflows to record subflow state regarding its parentage so that subProcesses and callActivities can return to their correct calling object when the subProcess or CallActivity completes.

During the migration from 22.1 to 22.2, we add the column sbfl_calling_sbfl to flow_subflows table in the migration script feature-172.sql. Then set it to ‘0’ for anything that’s not inside a subprocess (so where process_level = 0). Then there is an update for subflows that were in a subprocess to correctly set their sbfl_calling_sbfl. That should have set sbfl_calling_sbfl for all subflows & we should have then added a not null constraint on the column.

It appears that in your case, some subflows were not updated - so the ‘where’ conditions on the 2 updates do not cover all cases.

If you do the update again, it would be interesting to

select count(*) from flow_subflows where sbfl_calling_sbfl is null;

after the update. If this is > 0, there is a problem….

Migration should probably check that all rows are not null, and then add a not null constraint onto flow_subflows.sbfl_calling_sbfl.
Scratch install should also have this not null constraint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants