Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Workflow Dialog won't appear when executing against DAM asset.

Avatar

Level 1

Greetings,

I have a custom workflow that I would like to execute against DAM assets.  The workflow includes a Dynamic Participant Step with a dialog.  If I test the workflow against a Page, I'm able to see the dialog appear and interact with it as expected.

johnagordon83_0-1654108003680.png

 

However, when I execute against DAM assets, I see no dialog.

Steps:

  1. Navigate to a DAM asset (ex. http://localhost:4502/assets.html/content/dam/tnc/nature/en/photos)
  2. Hover over asset and then click on checkmark that appears to select it.
  3. In the upper left, select Create -> Workflow.
  4. Choose the workflow in question and give it a title.
  5. Press start, then Proceed.
  6. In the upper left corner, open the timeline for this asset.
  7. Notice 'Dynamic Participant' highlighted in yellow.  Click on it, and then click advance.
  8. In the dropdown that appears, select the workflow and click advance.
  9. The workflow now completes without ever presenting a dialog to the user.

johnagordon83_1-1654108751228.png

 

Is there a mechanism by which I can make a dialog appear in this context?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @johnagordon83 

I have tried using on OOTB workflow and below is my finding - Can you try it refreshing page? I can see dialog after

 

Screen Shot 2022-06-01 at 4.52.13 PM.png

refreshing page -> ClickAdvance -> Dialog is visible.

Considering your custom workflow if it still have same issue, you might have to look for script which is responsible to show pop up and have to override it accordingly.

Hope that helps!


Regards,
Santosh

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @johnagordon83 

I have tried using on OOTB workflow and below is my finding - Can you try it refreshing page? I can see dialog after

 

Screen Shot 2022-06-01 at 4.52.13 PM.png

refreshing page -> ClickAdvance -> Dialog is visible.

Considering your custom workflow if it still have same issue, you might have to look for script which is responsible to show pop up and have to override it accordingly.

Hope that helps!


Regards,
Santosh

Avatar

Level 1

I can see the same thing as you after refreshing.  The problem is, the dialog shown here doesn't appear to be the custom dialog I configured because it doesn't include a checkbox labeled 'Report Only'.  I feel reasonably confident I configured the dialog properly because it works when I run this workflow against a page.  I'm running this as an admin user.  I'm not seeing any errors in server logs or console.  I tried to swap out Dynamic Participant Step for Dialog Participant Step, but still I did not see the 'Report Only' checkbox.  I'm starting to believe AEM does not use the custom dialog in this context, but rather some default one.

 

Custom Dialog Markup

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    jcr:primaryType="nt:unstructured"
    jcr:title="Remove Unused Assets Chooser"
    sling:resourceType="cq/gui/components/authoring/dialog">
    <content
        jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/foundation/container">
        <layout
            jcr:primaryType="nt:unstructured"
            sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
            margin="{Boolean}false"/>
        <items jcr:primaryType="nt:unstructured">
            <columns
                jcr:primaryType="nt:unstructured"
                sling:resourceType="granite/ui/components/foundation/container">
                <items jcr:primaryType="nt:unstructured">
                    <report-only
                        jcr:primaryType="nt:unstructured"
                        sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
                        checked="{Boolean}true"
                        name="reportOnly"
                        text="Report Only (Do not update/replace)"
                        uncheckedValue="{Boolean}false"
                        value="{Boolean}true"/>
                </items>
            </columns>
        </items>
    </content>
</jcr:root>

 

Workflow Transitions

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    jcr:isCheckedOut="{Boolean}false"
    jcr:primaryType="cq:WorkflowModel"
    jcr:uuid="dfcfad9f-da90-4f03-94b2-7aba5be5eece"
    sling:resourceType="cq/workflow/components/model"
    description="Removes image media assets that are not referenced by any pages"
    title="TNC Remove Unused Assets Workflow">
    <metaData
        cq:generatingPage="/conf/global/settings/workflow/models/admin/tnc-remove-unused-assets-workflow/jcr:content"
        cq:lastModified="{Long}1654100337568"
        cq:lastModifiedBy="admin"
        jcr:primaryType="nt:unstructured"/>
    <nodes jcr:primaryType="nt:unstructured">
        <node0
            jcr:primaryType="cq:WorkflowNode"
            title="Start"
            type="START">
            <metaData jcr:primaryType="nt:unstructured"/>
        </node0>
        <node1
            jcr:primaryType="cq:WorkflowNode"
            title="Dynamic Participant"
            type="DYNAMIC_PARTICIPANT">
            <metaData
                jcr:primaryType="nt:unstructured"
                DIALOG_PATH="/conf/global/settings/workflow/dialogs/remove-unused-assets-chooser/cq:dialog"
                DYNAMIC_PARTICIPANT="/libs/workflow/scripts/initiator-participant-chooser.ecma"/>
        </node1>
        <node2
            jcr:primaryType="cq:WorkflowNode"
            description="Removes image media assets that are not referenced by any pages"
            title="Remove Unused Assets Process"
            type="PROCESS">
            <metaData
                jcr:primaryType="nt:unstructured"
                PROCESS="com.tnc.aem.workflows.RemoveUnusedAssetsWorkflowStep"
                PROCESS_AUTO_ADVANCE="true"/>
        </node2>
        <node3
            jcr:primaryType="cq:WorkflowNode"
            title="End"
            type="END">
            <metaData jcr:primaryType="nt:unstructured"/>
        </node3>
    </nodes>
    <transitions jcr:primaryType="nt:unstructured">
        <node0_x0023_node1
            jcr:primaryType="cq:WorkflowTransition"
            from="node0"
            rule=""
            to="node1">
            <metaData jcr:primaryType="nt:unstructured"/>
        </node0_x0023_node1>
        <node1_x0023_node2
            jcr:primaryType="cq:WorkflowTransition"
            from="node1"
            rule=""
            to="node2">
            <metaData jcr:primaryType="nt:unstructured"/>
        </node1_x0023_node2>
        <node2_x0023_node3
            jcr:primaryType="cq:WorkflowTransition"
            from="node2"
            to="node3">
            <metaData jcr:primaryType="nt:unstructured"/>
        </node2_x0023_node3>
    </transitions>
</jcr:root>

 

Avatar

Community Advisor

HI @johnagordon83 

 

A couple of questions:

  1. Are you trying it as an admin? 
  2. What logic does your custom step have? Is it logging any error in this scenario?
  3. Did u try using OOTB workflows?

Check the error.log or console error to find any issues.

 

Thanks,

Kiran Vedantam.