mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
15c73096971af59d44554d37c09439882afb1a79
Feature 2.4/rm 3266 foreground reject action in unfiled records not working RM-3266 - Documents get into a "hybrid" state when the Unfiled records inherited from File Plan rule rejects declared records. If we run the reject rule in foreground it will run in the same transaction with create-record. **CreateRecordAction** will move the file to RM site and add all the RM aspects to it (including rma:filePlanComponent) then **RejectAction** will move the file back to the collaboration site and remove all the RM aspects from it. Because the two actions run in the same transaction **FilePlanComponentAspect.onAddAspect** will run at the end of the transaction to set the property rma:rootNodeRef and apply the rma:filePlanComponent aspect on all the renditions. By setting the property rma:rootNodeRef the **rma:filePlanComponent** is added back on the node. When listing the files in the community site these nodes match the rmDocLibRecord template becuse they have **rma:filePlanComponent** aspect but we fail to list them because they are not records. The rejected files should match rmDocLibRejectedRecord template. I added an extra check in the onAddAspect method to make sure we don't add back RM properties if the aspect rma:filePlanComponent has been removed in the same transaction it has been added. Another solution that worked is changing the notification frequency of the onAddAspect method from **NotificationFrequency.TRANSACTION_COMMIT** to **NotificationFrequency.EVERY_EVENT** but I think it will affect the performance a lot more. See merge request !113
Configuring and starting Alfresco/Share: ---------------------------------------- - Clone the project (e.g. git clone git@gitlab.alfresco.com:records-management/records-management.git) - Import the project as a maven project - Start the Alfresco/Share instances with the following commands: mvn clean install -Pstart-repo mvn clean install -Pstart-share Configuring a different DB other than H2 (e.g. MySQL or PostgreSQL): -------------------------------------------------------------------- - Create a file called "local.properties" under src/main/resources in alfresco-rm-enterprise-repo - Add the following properties in this new file my.db.name -> The name of the database schema my.db.port -> The port number for your database (default port number for postgres is 5432 and for mysql it is 3306) - Run the following commands to start your Alfresco instance: to start Alfresco (using Postgres): mvn clean install -Pstart-repo,use-postgres to start Alfresco (using MySQL): mvn clean install -Pstart-repo,use-mysql Running integration test: ------------------------- In order to execute the integration tests run the following command (unit tests will be executed every time before you start Alfresco/Share): mvn clean install -Dskip.integrationtests=false Updating License Headers: ------------------------- In order to refesh out of date license source headers run the following command: mvn clean install -Dlicense.update.dryrun=false
Description
Languages
Java
96.2%
Fluent
1.1%
JavaScript
1%
HTML
0.5%
FreeMarker
0.4%
Other
0.6%