AEM 64 - Touch UI show Project specific Workflow Models in Assets Toolbar Create action


Show project specific workflow models in the dialog activated by Create -> Workflow action of Assets toolbar. The full list of workflows (Product and Project) are still available from Timeline -> Start workflow dropdown

Demo | Package Install | Github

Assets Toolbar Start Workflow

Timeline Start Workflow (Product)


1) Login to CRXDE Lite, create folder (nt:folder) /apps/eaem-touchui-show-custom-wfs-in-start-wf

2) Create clientlib (type cq:ClientLibraryFolder) /apps/eaem-touchui-show-custom-wfs-in-start-wf/clientlib and set property categories of String type to dam.gui.actions.coral and dependencies String[] to lodash

3) Create file ( type nt:file ) /apps/eaem-touchui-show-custom-wfs-in-start-wf/clientlib/js.txt, add the following


4) Create file (type nt:file) /apps/eaem-touchui-show-custom-wfs-in-start-wf/clientlib/show-custom-wfs.js, add the following code. #3 with prefix value set to EAEM, the dropdown shows all models having name starting with EAEM

(function ($, $document) {
    var WORKFLOW_DIALOG_CLASS = "cq-common-admin-timeline-toolbar-actions-workflow",

    $document.on('foundation-contentloaded', handleWorkflowList);

    function handleWorkflowList(event){
        var $target = $(;


        var $wfSelect = $target.find("coral-select");


        _.each($wfSelect[0].items.getAll(), function(item){


    function canShow(text){
            return true;

        return (text.trim().indexOf(SHOW_MODELS_WITH_PREFIX) == 0);
}(jQuery, jQuery(document),;

Solution - 2

Thank you Xiaoyu Chen for the solution below

Say customer has three major groups content editors, content publishers and DAM editors. Each group can only see the workflow they can initiate...

1) Make sure all project workflow models are created in a separate folder to facilitate the ACL controls, for instance /etc/workflow/models/lbg

2) Create a workflow user group, deny all access to /etc/workflow/models/*. Give read only access to /etc/workflow/models/lbg folder (but not models inside the folder)

3) Create content editors group and allow read access to the /etc/workflow/models/lbg/one-specific-workflow. Add multiple rules if you want them to see multiple workflows.

4) Similar setup for other groups.

 Once these are configured, when an editor uses the “create workflow” s/he will only see the workflow s/he has read access to...

Optionally use netcentric actools to define ACLs -

No comments:

Post a Comment