Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to find through code, if a given payload is in active workflow?

Avatar

Avatar
Validate 1
Level 2
Srinin
Level 2

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
Srinin
Level 2

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Srinin
Level 2

02-03-2017

Hi

I have a payload path like /content/world/latest-news. I want to check if this page is in any active workflow job queue. How to check that through programing?

thanks

Srini

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,113 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,113 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

02-03-2017

Have you tried this already?

Resource r = ResourceResolver.get("/content/world/latest-news"); WorkflowStatus wfStatus = r.adaptTo(WorkflowStatus.class);

cheers,
Jörg

Answers (1)

Answers (1)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

02-03-2017

You can use the Workflow API described at: https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/com/day/cq/workflow/WorkflowSession.html

Look at the method and the return values. You can get a collection of all workflows by invoking the getActiveWorkItems method and from their get all data.