-
Notifications
You must be signed in to change notification settings - Fork 31
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
Deploying dependent document models from the same bundle are not loaded in the correct order #197
Comments
Dynamic Extensions already sorts the models based on their imports, before registering them. |
Given that the models are uploaded in correct order (DE does sort them, see previous reply):
It looks like the namespaces of 1. are added to the A possible solution is wrapping the registering of each model in a new transaction. |
A maybe larger problem is that workflow models have to be deployed with the |
I'm submitting a ... (check one with "x")
Expected Behavior
I create a dynamic extension jar with 2 document models in
/META-INF/alfresco/models/
, namedXYZModel.xml
andXYZWorkflowModel.xml
.The
XYZWorkflowModel.xml
imports a namespace defined inXYZModel.xml
.I expect that both models are registered and activated when I upload the jar in the dynamic extensions control panel.
Current Behavior
An exception is thrown when uploading the jar.
Reuploading the jar does not result in exceptions.
Both models are placed in the
Data Dictionary/Models
folder and the Model Active property is set for both models. However, theXYZWorkflowsModel.xml
model is not fully registered.Possible Solution
The listing of the jar file includes:
Note that the files are sorted in reverse alphabetical order, and I think they are read in the order they are present in the jar file.
I think dynamic extensions should catch the exception when setting the Model Active property and has to revert the property to
false
to accurately reflect the state of the active models.An other possibility is to have dynamic extensions resolve the dependencies between models and activate models in the right order.
Steps to Reproduce (for bugs)
./gradlew jar
to build the dynamic extensions jarbuild/libs/de-repro-197.jar
to the dynamic extensions control panel.Context
Your Environment
The text was updated successfully, but these errors were encountered: