Expand my Community achievements bar.

SOLVED

get running workflow on a page

Avatar

Level 1

How to get if there is any running workflow on a page programatically?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

  You can adapt your current resource to WorkflowStatus and get running workflow Information for current page,

 

e.g

 

final com.adobe.granite.workflow.status.WorkflowStatus wfState = resource.adaptTo(WorkflowStatus.class);
you Can use this method to check if any running workflow

wfState.isInRunningWorkflow(false)
and wfState.getWorkflows(false); to get running workflow information.

 

Thanks

Dipti Chauhan

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi,

  You can adapt your current resource to WorkflowStatus and get running workflow Information for current page,

 

e.g

 

final com.adobe.granite.workflow.status.WorkflowStatus wfState = resource.adaptTo(WorkflowStatus.class);
you Can use this method to check if any running workflow

wfState.isInRunningWorkflow(false)
and wfState.getWorkflows(false); to get running workflow information.

 

Thanks

Dipti Chauhan

Avatar

Community Advisor

There are many different ways to run a workflow on a page programmatically. 

  1. Trigger workflow automatically by Sling Schedular Service. - https://helpx.adobe.com/experience-manager/using/aem-first-components1.htmlhttps://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/javadoc/in...
  2. Trigger workflow automatically by workflow launchers. - https://blogs.adobe.com/contentmanagement/tag/workflow-launcher/
  3. Trigger workflow automatically by JCR event listeners. - https://helpx.adobe.com/experience-manager/using/maven_arch12_event_listener.html
  4. Trigger workflow manually from the Touch UI Site's Console . -https://docs.adobe.com/content/help/en/experience-manager-64/authoring/workflows/workflows-applying....
  5. Trigger workflow manually from the Touch UI Workflow Model's Console - https://helpx.adobe.com/uk/experience-manager/6-3/sites/administering/using/workflows-starting.html#...
  6. Trigger workflow manually from CURL command - https://github.com/paulrohrbeck/aem-links/blob/master/curl_cheatsheet.md#user-content-enable-query-d....

I hope this helps answer the question.