DocumentWorkflow hints map "requests" in 12.6.6

I have updated our site from 12.3.0 to 12.6.6. Everything seems to have gone well, except for an issue I have run into with a custom document workflow.

We have created a Maker-checker [1] workflow that extends DocumentWorkflowImpl. The purpose is to prevent anyone publishing content last modified by themselves, even for an admin user. This is achieved by comparing the LastModifiedUser with the “workflow user”. If they are the same publishing is prevented by modifying values in the “requests” map in the hints map, described in the document workflow documentation [2]. We set “acceptRequest” and “rejectRequest” to false. This worked well for us in 12.3.0.

In 12.6.6 it seems the “requests” map is not there at all.

This is the entire hints map if I print it in 12.6.6

[{commitEditableInstance=false, versionRestoreTo=true, disposeEditableInstance=false, branch=true, checkModified=true, delete=false, listVersions=true, isLive=true, restoreVersion=true, copy=true, listBranches=true, getBranch=false, move=false, unlock=false, depublish=true, depublishBranch=true, hints=true, reintegrateBranch=false, requestDelete=false, version=true, publishBranch=false, requestDepublication=true, restoreVersionToBranch=true, rename=false, publish=false, obtainEditableInstance=true, retrieveVersion=true, previewAvailable=true, requestPublication=false, checkoutBranch=false, removeBranch=false, status=true}]

Compared to what I get in 12.3.0:

[{commitEditableInstance=false, move=false, depublish=false, versionRestoreTo=true, hints=true, disposeEditableInstance=false, requests={11c79647-5682-432a-b23a-8b5f298b03cb={rejectRequest=true, acceptRequest=true, cancelRequest=true}}, checkModified=true, delete=false, requestDelete=false, version=true, listVersions=true, requestDepublication=false, isLive=true, restoreVersion=true, rename=false, publish=false, obtainEditableInstance=false, retrieveVersion=true, copy=true, previewAvailable=true, requestPublication=false, status=true}]

Was the requests map removed in 12.6.6, or does it point to some other problem on my end?

The following extract from the document workflow documentation [2] points to a possible reason I’m not seeing the requests, but I’m not sure what would exclude it in 12.6.6 and not in 12.3.0

If a user is not authorized for an operation, then the hints method will not return any value. If the operation is meaningless for the current document the hints method will also not return a value (eg. it makes no sense to unpublish a document which isn’t published). If no value is available for an operation it is disabled by default.

I hope someone can point me in the right direction.

[1] https://en.wikipedia.org/wiki/Maker-checker
[2] https://documentation.bloomreach.com/12/library/concepts/workflow/document-workflow.html

Hi Andre,
The ‘requests’ entry in the hints map should still be there, these are still read from below the handle and fed to the SCXML processing. Maybe you can verify that on a clean 12.6.7 archetype project?

The SCXML part did change between 12.3 and 12.6 so maybe there are some customizatons to be re-applied? See also https://documentation.bloomreach.com/12/library/upgrade-minor-versions/upgrade-12.5-to-12.6.html

Cheers, Jeroen

Thanks Jeroen,

I have tried creating a clean project with th 12.6.7 archetype, but getting a “The desired archetype does not exist” error. I don’t think the open source CMS has been released yet.

I did however create a clean project of 12.6.6 and added my custom class that extends DocumentWorkflowImpl, which then makes it the only change to the project.

The “requests” entry is still missing from the hints map.

If by customization of SCXML you are referring to changes to: /hippo:configuration/hippo:modules/scxmlregistry/hippo:moduleconfig/hipposcxml:definitions/documentworkflow
we have made no changes to that. The only other change we made was to add our custom class to “hipposys:classname” in:
/hippo:configuration/hippo:workflows/default/handle

Perhaps a snippet from the custom class code may point to the problem?

@Override
public Map<String, Serializable> hints() throws WorkflowException {
	log.debug("hints()");
	Map<String, Serializable> hints = super.hints();
	log.debug("hints: {}", Arrays.asList(hints).toString());

	for (String hint : hints.keySet()) {
		log.debug("Hint key [{}], value [{}]", hint, hints.get(hint));
	}

	... 
}

This outputs:

[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:137] hints()
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:139] hints: [{branch=true, checkModified=true, checkoutBranch=false, commitEditableInstance=false, copy=true, delete=true, depublish=false, depublishBranch=false, disposeEditableInstance=false, getBranch=false, hints=true, isLive=false, listBranches=true, listVersions=true, move=true, obtainEditableInstance=true, previewAvailable=true, publish=true, publishBranch=true, reintegrateBranch=false, removeBranch=false, rename=true, requestDelete=true, requestDepublication=false, requestPublication=true, restoreVersion=true, restoreVersionToBranch=true, retrieveVersion=true, status=true, unlock=false, version=true, versionRestoreTo=true}]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [branch], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [checkModified], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [checkoutBranch], value [false]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [commitEditableInstance], value [false]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [copy], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [delete], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [depublish], value [false]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [depublishBranch], value [false]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [disposeEditableInstance], value [false]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [getBranch], value [false]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [hints], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [isLive], value [false]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [listBranches], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [listVersions], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [move], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [obtainEditableInstance], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [previewAvailable], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [publish], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [publishBranch], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [reintegrateBranch], value [false]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [removeBranch], value [false]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [rename], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [requestDelete], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [requestDepublication], value [false]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [requestPublication], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [restoreVersion], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [restoreVersionToBranch], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [retrieveVersion], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [status], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [unlock], value [false]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [version], value [true]
[INFO] [talledLocalContainer] 01.11.2019 13:49:57 DEBUG http-nio-8080-exec-5 [MakerCheckerDocumentWorkflowImpl.hints:142] Hint key [versionRestoreTo], value [true]