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

Business keys are mandatory with MS SQL Server #2

Open
janihaglund opened this issue May 24, 2020 · 1 comment
Open

Business keys are mandatory with MS SQL Server #2

janihaglund opened this issue May 24, 2020 · 1 comment

Comments

@janihaglund
Copy link
Contributor

One must set uniqueBusinessKey for <bpm:process-factory /> as MS SQL Server doesn't allow multiple NULL values on unique indexes.

These issue can be reproduced by running test for https://github.com/alfameCom/mule-bpm-module/tree/mssql-verification/examples/passive-splitter-example

@janihaglund
Copy link
Contributor Author

Updated on this issue.

It seems this can be overcome by creating index as follows:
CREATE UNIQUE INDEX MULE_UNIQ_BUSINESS_KEY ON ACT_HI_PROCINST(BUSINESS_KEY_) WHERE BUSINESS_KEY_ IS NOT NULL

In stead of the default implementation in place now https://github.com/alfameCom/mule-bpm-module/blob/mssql-verification/mule-bpm-module/src/main/resources/db/mule-bpm-flowable/migrations/V2__Insert_unique_process_instance_constrant.sql

Flyway V3 with SQL Server specific alter implementation should be implemented.

Additional notice on H2 MS SQL Server comparability mode: the filtered index above does not work. Testing with https://www.testcontainers.org/modules/databases/mssqlserver/ seems to be the next step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant