Expand my Community achievements bar.

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!