Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Custom Action button to show Start Workflow

Avatar

Level 1

Hi All,

Can we create custom action button like "Start Workflow" which show Start Workflow modal within the sites.html window itself? We have this option under Page Information when we are editing a page. Any suggestion on how we can achieve this.

1513298_pastedImage_0.png

1513299_pastedImage_1.png

1 Reply

Avatar

Level 4

Hi,

You need to overlay sites component. The path for the sites component is "/libs/wcm/core/content/sites/jcr:content/actions/selection".

You can add new option here, however its dialog so you can try adding like below code snippet.

<workflow
   granite:class="aem-ajax-call"
   jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/button"
   text="Start Workflow"
   title="Start Workflow"
   variant="actionBar">

   <granite:data
   jcr:primaryType="nt:unstructured"
   box-confirmation-message=""
   box-failure-message=""
   box-success-message=""
   box-url="/bin/workflow-servlet"/>

</workflow>

We have used AJAX call to invoke, you can use any alternate or suitable for you.

Hope this helps!

Thanks!