Not able to drag & drop the custom workflow step | Community
Skip to main content
Level 6
September 26, 2021

Not able to drag & drop the custom workflow step

  • September 26, 2021
  • 3 replies
  • 3012 views

Hello Community - I am not able to drag & drop the custom workflow step in the workflow model. Not sure what is happening. Can someone advise on this?

 

customworkflowstep XML:

 

<?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"
jcr:description="This is a custom workflow step for test project."
jcr:primaryType="cq:Component"
jcr:title="Test Workflow Step"
sling:resourceSuperType="cq/workflow/components/model/process"
allowedParents="[*/parsys]"
componentGroup="Test Utility"/>

 

cq_editConfig.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root 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"
cq:dialogMode="floating"
jcr:primaryType="cq:EditConfig">
<cq:formParameters
jcr:description="custom workflow step."
jcr:primaryType="nt:unstructured"
jcr:title="Custom Workflow Step"
PROCESS="com.test.aem.core.workflows.CustomWorkflowStep"
PROCESS_AUTO_ADVANCE="true"/>
<cq:listeners
jcr:primaryType="cq:EditListenersConfig"
afterdelete="CQ.workflow.flow.Step.afterDelete"
afteredit="CQ.workflow.flow.Step.afterEdit"
afterinsert="CQ.workflow.flow.Step.afterInsert"
afterMove="REFRESH_PAGE"/>
</jcr:root>

 

cq_dialog.xml:

 

<?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:primaryType="nt:unstructured"
jcr:title="Test Workflow Step"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/tabs">
<items jcr:primaryType="nt:unstructured">
<common
cq:hideOnEdit="true"
jcr:primaryType="nt:unstructured"
jcr:title="Common"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"/>
<process
cq:hideOnEdit="true"
jcr:primaryType="nt:unstructured"
jcr:title="Process"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"/>
<processcommon
jcr:primaryType="nt:unstructured"
jcr:title="Common"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<basic
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<title
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
disabled="false"
fieldLabel="Title"
name="./jcr:title"/>
<description
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
disabled="false"
fieldLabel="Description"
name="./jcr:description"/>
</items>
</basic>
<advanced
jcr:primaryType="nt:unstructured"
jcr:title="Advanced Settings"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<advance
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
fieldDescription="Check if your handler will advance to the next step."
fieldLabel="Handler Advance"
name="./metaData/PROCESS_AUTO_ADVANCE"
text="Handler Advance"
value="true"/>
</items>
</advanced>
</items>
</column>
</items>
</processcommon>
<processargs
jcr:primaryType="nt:unstructured"
jcr:title="Arguments"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<arguments
jcr:primaryType="nt:unstructured"
jcr:title="Step Arguments"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<brand
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Brand"
name="./metaData/BRAND"/>
<multinational
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
checked="{Boolean}false"
fieldDescription="is your brand present in multiple conuntries."
name="./metaData/MULTINATIONAL"
text="Is Multinational"
uncheckedValue="{Boolean}false"
value="{Boolean}true"/>
<countries
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
fieldDescription="Add sites for countries."
fieldLabel="Countries">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
name="./metaData/COUNTRIES"/>
</countries>
</items>
</arguments>
</items>
</column>
</items>
</processargs>
</items>
</content>
</jcr:root>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Ravi_Joshi
Level 4
September 26, 2021

Hi @test1234567 ,

 

If you are not able to locate your component in model parsys. Most probably that is because your model is using default design from libs where your component group is not allowed. To allow your component group I will will suggest to follow below steps :

 

1. Copy the node (Overlay) from "/libs/settings/wcm/designs/default" to "/apps/settings/wcm/designs/default". You can change name "default" to anything as per need.

 

2. Go to "/apps/settings/wcm/designs/default/jcr:content/model/flow" and locate the multivalued property "components" and add "group:Test Utility" there. (Here Test Utility is your component group for the workflow custom step model).

 

3. Finally, Go to your workflow model and open properties. There in the advance tab change the design path to "/apps/settings/wcm/designs/default" and save.

 

4. Now try to drag and drop your component it should appear.

 

Hope this helps. And me know if you face any issue.

 

Thanks,

Ravi Joshi

Level 6
September 26, 2021

@ravi_joshi - I have already followed the steps you have provided. It is not letting me to drag the process step in the modal.

Ravi_Joshi
Level 4
September 26, 2021

@test1234567 Okay. I have tested the same in my local aem 6.5 it is loading fine. Can you check whether the below java file throwing any error or not. "com.test.aem.core.workflows.CustomWorkflowStep". Check error.log after drag and drop of the component.

 

Sanjay_Bangar
Community Advisor
Community Advisor
September 26, 2021

Hi @test1234567 ,

                          Your workflow process step is it showing for drag n drop.

I think you need workflow component in the workflow group.

 

Kr,

Sanjay

Level 6
September 26, 2021

@sanjay_bangar - The workflow process step is available but I am not able to drag the process step.

 

lukasz-m
Community Advisor
Community Advisor
September 26, 2021

Hi @test1234567, did you try to add your custom step to the workflow model by clicking on parsys and using + sign (instead of using d&d)? Are there any errors in the browser console or in the server error.log correlated with d&d operation?

Level 6
September 27, 2021

@lukasz-m - In the parsys, Insert component, the custom workflow step is not appearing in the list. Moreover I dont see any errors in the console/error.log while dragging the custom workflow step.

Level 6
September 29, 2021

@test1234567- thanks, could you please try to change Test Utility into group:Test Utility in your design configuration - inside components property.


@lukasz-m - I am able to drag and drop the workflow step in the model. The issue is with the group name. I didn't add the prefix "group:" before the group name. Thanks for your inputs. Also one more thing, I have a dialog participant step in the workflow model. Basically I wanted to assign the task to the user who initiated the workflow rather than assign it to any group. Can you tell me is there a way to do that? Screenshot attached.