diff --git a/pom.xml b/pom.xml index b6ef6d47be..e91a141ffe 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.alfresco alfresco-rm pom - 2.7.1-SNAPSHOT + 3.0.0-SNAPSHOT Alfresco Records Management @@ -24,7 +24,7 @@ scm:git:https://git.alfresco.com/records-management/records-management.git scm:git:https://git.alfresco.com/records-management/records-management.git https://git.alfresco.com/records-management/records-management - V2.7.0 + HEAD diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index 9537d46a7d..1033c353a4 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-rm - 2.7.1-SNAPSHOT + 3.0.0-SNAPSHOT diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml index 630c15608d..36080c3d8e 100644 --- a/rm-automation/rm-automation-community-rest-api/pom.xml +++ b/rm-automation/rm-automation-community-rest-api/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-rm-automation - 2.7.1-SNAPSHOT + 3.0.0-SNAPSHOT diff --git a/rm-community/pom.xml b/rm-community/pom.xml index af2b7ee9ec..9e3e1d0779 100644 --- a/rm-community/pom.xml +++ b/rm-community/pom.xml @@ -8,7 +8,7 @@ org.alfresco alfresco-rm - 2.7.1-SNAPSHOT + 3.0.0-SNAPSHOT diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/content/rmEventConfigBootstrap.json b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/content/rmEventConfigBootstrap.json index 3e2a07df1b..41a44c405e 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/content/rmEventConfigBootstrap.json +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/bootstrap/content/rmEventConfigBootstrap.json @@ -70,7 +70,12 @@ "eventType" : "rmEventType.simple", "eventName" : "case_complete", "eventDisplayLabel" : "rmevent.case_complete" - } + }, + { + "eventType": "rmEventType.simple", + "eventName": "declassification_review", + "eventDisplayLabel": "rmevent.declassification_review" + } ] } diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml index b49c740fb9..dc0e5277b3 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/model/recordsModel.xml @@ -242,6 +242,12 @@ + + Disposition Evaluator Combination + d:boolean + false + + rma:filePlanComponent diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml index 3c12a64720..2cc9710263 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml @@ -20,6 +20,7 @@ + diff --git a/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/rma/dispositionactiondefinition.lib.ftl b/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/rma/dispositionactiondefinition.lib.ftl index f46011ed82..e0af3c2c06 100644 --- a/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/rma/dispositionactiondefinition.lib.ftl +++ b/rm-community/rm-community-repo/config/alfresco/templates/webscripts/org/alfresco/rma/dispositionactiondefinition.lib.ftl @@ -37,6 +37,7 @@ <#if action.period??>"period": "${action.period}", <#if action.periodProperty??>"periodProperty": "${action.periodProperty}", <#if action.location??>"location": "${action.location}", + <#if action.combineDispositionStepConditions??>"combineDispositionStepConditions": "${action.combineDispositionStepConditions?string}", <#if action.events??>"events": [<#list action.events as event>"${event}"<#if event_has_next>,], "eligibleOnFirstCompleteEvent": ${action.eligibleOnFirstCompleteEvent?string} } diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml index 8de405183e..0f2cb1c749 100644 --- a/rm-community/rm-community-repo/pom.xml +++ b/rm-community/rm-community-repo/pom.xml @@ -9,7 +9,7 @@ org.alfresco alfresco-rm-community - 2.7.1-SNAPSHOT + 3.0.0-SNAPSHOT diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java index 70ea9f0cb4..da2a7234a3 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java @@ -28,6 +28,8 @@ package org.alfresco.module.org_alfresco_module_rm.jscript.app; import static org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel.READ_RECORDS; +import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS; +import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.PROP_RS_DISPOSITION_EVENTS; import static org.alfresco.service.cmr.security.AccessStatus.ALLOWED; import java.util.ArrayList; @@ -38,6 +40,9 @@ import java.util.Map; import org.alfresco.model.ContentModel; import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService; import org.alfresco.module.org_alfresco_module_rm.capability.impl.ViewRecordsCapability; +import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction; +import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService; +import org.alfresco.module.org_alfresco_module_rm.event.EventCompletionDetails; import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind; import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService; import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel; @@ -99,6 +104,11 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS /** site service */ private SiteService siteService; + /** + * Disposition service + */ + private DispositionService dispositionService; + /** Indicators */ private List indicators = new ArrayList(); @@ -230,6 +240,14 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS this.jsonConversionComponentCache = jsonConversionComponentCache; } + /** + * @param dispositionService the disposition service + */ + public void setDispositionService(DispositionService dispositionService) + { + this.dispositionService = dispositionService; + } + /** * The initialise method */ @@ -456,6 +474,22 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS // Set the actions array setActions(rmNodeValues, nodeRef); + + //Add details of the next incomplete event in the disposition schedule + if(dispositionService.getNextDispositionAction(nodeRef) != null) + { + for(EventCompletionDetails details: dispositionService.getNextDispositionAction(nodeRef).getEventCompletionDetails()) + { + if(!details.isEventComplete()) + { + HashMap properties = ((HashMap) rmNodeValues.get("properties")); + properties.put("combineDispositionStepConditions", nodeService.getProperty(dispositionService.getNextDispositionAction(nodeRef).getDispositionActionDefinition().getNodeRef(), PROP_COMBINE_DISPOSITION_STEP_CONDITIONS)); + properties.put("incompleteDispositionEvent", details.getEventName()); + break; + } + } + } + return rmNodeValues; } diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java index 1d8d24403c..f7211b7d33 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/RecordsManagementModel.java @@ -99,6 +99,7 @@ public interface RecordsManagementModel extends RecordsManagementCustomModel QName PROP_DISPOSITION_PERIOD_PROPERTY = QName.createQName(RM_URI, "dispositionPeriodProperty"); QName PROP_DISPOSITION_EVENT = QName.createQName(RM_URI, "dispositionEvent"); QName PROP_DISPOSITION_EVENT_COMBINATION = QName.createQName(RM_URI, "dispositionEventCombination"); + QName PROP_COMBINE_DISPOSITION_STEP_CONDITIONS = QName.createQName(RM_URI, "combineDispositionStepConditions"); QName PROP_DISPOSITION_LOCATION = QName.createQName(RM_URI, "dispositionLocation"); QName PROP_DISPOSITION_ACTION_GHOST_ON_DESTROY = QName.createQName(RM_URI, "dispositionActionGhostOnDestroy"); diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java index c5161ee2f0..a07f4f7b0f 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionAbstractBase.java @@ -27,6 +27,8 @@ package org.alfresco.module.org_alfresco_module_rm.script; +import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -49,6 +51,8 @@ import org.springframework.extensions.webscripts.WebScriptRequest; */ public class DispositionAbstractBase extends AbstractRmWebScript { + + public final static String COMBINE_DISPOSITION_STEP_CONDITIONS = "combineDispositionStepConditions"; /** * Parses the request and providing it's valid returns the DispositionSchedule object. * @@ -165,6 +169,11 @@ public class DispositionAbstractBase extends AbstractRmWebScript model.put("events", eventNames); } + if(getNodeService().getProperty(actionDef.getNodeRef(), PROP_COMBINE_DISPOSITION_STEP_CONDITIONS) != null) + { + model.put("combineDispositionStepConditions", getNodeService().getProperty(actionDef.getNodeRef(), PROP_COMBINE_DISPOSITION_STEP_CONDITIONS)); + } + return model; } diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java index b6f0569841..1fcfcb06b9 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPost.java @@ -133,6 +133,12 @@ public class DispositionActionDefinitionPost extends DispositionAbstractBase json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and"); } + if (json.has(COMBINE_DISPOSITION_STEP_CONDITIONS)) + { + props.put(RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS, + json.getBoolean(COMBINE_DISPOSITION_STEP_CONDITIONS)); + } + if (json.has("location")) { props.put(RecordsManagementModel.PROP_DISPOSITION_LOCATION, diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java index 235be742d2..8d826d6a1a 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/DispositionActionDefinitionPut.java @@ -96,7 +96,6 @@ public class DispositionActionDefinitionPut extends DispositionAbstractBase * * @param actionDef The action definition to update * @param json The JSON to use to create the action definition - * @param schedule The DispositionSchedule the action definition belongs to * @return The updated DispositionActionDefinition */ protected DispositionActionDefinition updateActionDefinition(DispositionActionDefinition actionDef, @@ -132,6 +131,12 @@ public class DispositionActionDefinitionPut extends DispositionAbstractBase json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and"); } + if (json.has(COMBINE_DISPOSITION_STEP_CONDITIONS)) + { + props.put(RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS, + json.getBoolean(COMBINE_DISPOSITION_STEP_CONDITIONS)); + } + if (json.has("location")) { props.put(RecordsManagementModel.PROP_DISPOSITION_LOCATION, diff --git a/rm-community/rm-community-rest-api-explorer/pom.xml b/rm-community/rm-community-rest-api-explorer/pom.xml index bb55ff6dd1..cded13c0aa 100644 --- a/rm-community/rm-community-rest-api-explorer/pom.xml +++ b/rm-community/rm-community-rest-api-explorer/pom.xml @@ -7,7 +7,7 @@ org.alfresco alfresco-rm-community - 2.7.1-SNAPSHOT + 3.0.0-SNAPSHOT