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/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/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 53ab3430f3..bae437569b 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,7 @@ 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; @@ -481,6 +482,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS { if(!details.isEventComplete()) { + ((HashMap) rmNodeValues.get("properties")).put("combineDispositionStepConditions", nodeService.getProperty(dispositionService.getNextDispositionAction(nodeRef).getDispositionActionDefinition().getNodeRef(), PROP_COMBINE_DISPOSITION_STEP_CONDITIONS)); ((HashMap) rmNodeValues.get("properties")).put("incompleteDispositionEvent", details.getEventName()); break; } 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 a3b3212b7c..3c02c90627 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,7 +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_DISPOSITION_EVALUATOR_COMBINATION = QName.createQName(RM_URI, "dispositionEvaluatorCombination"); + 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..be367e060e 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; @@ -165,6 +167,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 66dd4b2617..19357a8680 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,11 +133,11 @@ public class DispositionActionDefinitionPost extends DispositionAbstractBase json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and"); } -// if (json.has("evaluatorCombination")) -// { -// props.put(RecordsManagementModel.PROP_DISPOSITION_EVALUATOR_COMBINATION, -// json.getBoolean("evaluatorCombination") ? "and" : "or"); -// } + if (json.has("combineDispositionStepConditions")) + { + props.put(RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS, + json.getBoolean("combineDispositionStepConditions")); + } if (json.has("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 b11c71770b..510118f047 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,11 +131,11 @@ public class DispositionActionDefinitionPut extends DispositionAbstractBase json.getBoolean("eligibleOnFirstCompleteEvent") ? "or" : "and"); } -// if (json.has("evaluatorCombination")) -// { -// props.put(RecordsManagementModel.PROP_DISPOSITION_EVALUATOR_COMBINATION, -// json.getBoolean("evaluatorCombination") ? "and" : "or"); -// } + if (json.has("combineDispositionStepConditions")) + { + props.put(RecordsManagementModel.PROP_COMBINE_DISPOSITION_STEP_CONDITIONS, + json.getBoolean("combineDispositionStepConditions")); + } if (json.has("location")) {