How to call workflow from Touch UI | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Hemant_arora
Hemant_aroraAccepted solution
Level 8
May 21, 2018 11:31 AM UTC

Make an jquery ajax call to a sling servlet which further call the workflow through API

Refer to example below.

Adobe Experience Manager Help | Invoking Adobe Experience Manager Workflows using the AEM Java API

You must also look into solution by smacdonald2008​

There are only 2 methods (not counting the Deprecated one)  exposed in the WorkFlowSession Class that starts a workflow:

WorkflowstartWorkflow(WorkflowModel model, WorkflowData data)
           Start a new Workflow instance with the given WorkflowModel and WorkflowData.
WorkflowstartWorkflow(WorkflowModel model, WorkflowData data, Dictionary<String,String> metaData)
           Deprecated. It's recommended to use #startWorkflow(WorkflowModel, WorkflowData, Map instead.
WorkflowstartWorkflow(WorkflowModel model, WorkflowData data, Map<String,Object> metaData)
           Start a new Workflow instance with the given WorkflowModel, WorkflowData and meta data.

Therefore you need a WorkflowModel and data,

In your use case - you need these as input - else it will not work.

How to trigger a workflow process programmatically?

4 replies

smacdonald2008
Level 10
May 21, 2018 2:56 PM UTC

Great answer!

Translate
Hemant_arora
Hemant_aroraAccepted solution
Level 8
May 21, 2018 11:31 AM UTC

Make an jquery ajax call to a sling servlet which further call the workflow through API

Refer to example below.

Adobe Experience Manager Help | Invoking Adobe Experience Manager Workflows using the AEM Java API

You must also look into solution by smacdonald2008​

There are only 2 methods (not counting the Deprecated one)  exposed in the WorkFlowSession Class that starts a workflow:

WorkflowstartWorkflow(WorkflowModel model, WorkflowData data)
           Start a new Workflow instance with the given WorkflowModel and WorkflowData.
WorkflowstartWorkflow(WorkflowModel model, WorkflowData data, Dictionary<String,String> metaData)
           Deprecated. It's recommended to use #startWorkflow(WorkflowModel, WorkflowData, Map instead.
WorkflowstartWorkflow(WorkflowModel model, WorkflowData data, Map<String,Object> metaData)
           Start a new Workflow instance with the given WorkflowModel, WorkflowData and meta data.

Therefore you need a WorkflowModel and data,

In your use case - you need these as input - else it will not work.

How to trigger a workflow process programmatically?

Translate
niveshchandraj
New Participant
May 21, 2018 10:52 AM UTC

Thank you for the suggestion but am trying to access it by using jQuery

Translate
Hemant_arora
Level 8
May 21, 2018 9:43 AM UTC

Go to http://localhost:4505/libs/cq/workflow/admin/console/content/models.html

select the model and start workflow.

Translate