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

AEM 6.4 WorkflowStatus Api returning false for running workflow

Avatar

Avatar
Validate 1
Level 2
vipins5188
Level 2

Likes

8 likes

Total Posts

41 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
vipins5188
Level 2

Likes

8 likes

Total Posts

41 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
vipins5188
Level 2

09-12-2018

Hi All,

We are facing an issue with WorkflowStatus api to get current wf status of a resource.

It works fine when we start a workflow and get running status it return true but when we deploy our code again even though workflow still in running condition ,the api returns us as false.

resource.adaptTo(WorkflowStatus.class).IsInRunningWorkflow(true);

This issue only happening if we redeploy our code.

Any idea what can cause this issue ?? What is happening during bundle deployment which makes this api return status as false even though workflow still running ??

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 2
vipins5188
Level 2

Likes

8 likes

Total Posts

41 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
vipins5188
Level 2

Likes

8 likes

Total Posts

41 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
vipins5188
Level 2

11-12-2018

Thanks Arun Patidar  smacdonald2008 for your response.

I have got the solution for this issue, actually we are maintaining Adobe Granite Workflow Service configuration and adding one custom group to superuser property, which was removing OOTB workflow service user from superuser group that was causing this issue. By removing that configuration, it worked fine.

Answers (6)

Answers (6)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,279 likes

Total Posts

3,153 posts

Correct Reply

889 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,279 likes

Total Posts

3,153 posts

Correct Reply

889 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

10-12-2018

Avatar

Avatar
Validate 1
Level 2
vipins5188
Level 2

Likes

8 likes

Total Posts

41 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
vipins5188
Level 2

Likes

8 likes

Total Posts

41 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
vipins5188
Level 2

10-12-2018

Hi Arun,

i am implementing custom  ResourceStatusProvider to get status of particular resource to show on page,for this i am getting an issue with status so i implementated a servlet just to check what status i am getting.  There i found that Workflow Status is not properly coming. After deploying code status of Workflow is active and its in running condition . I checked the same under /var/workflow/instances

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,279 likes

Total Posts

3,153 posts

Correct Reply

889 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,279 likes

Total Posts

3,153 posts

Correct Reply

889 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

10-12-2018

Hi,

Could you please explain where you are checking the status? It is inside service or WCMUsePojo/Model or workflow step?

And when you restart the bundle or redeploy then if you check again, then what happened to status.

Let me try same with servlet.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 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,406 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

10-12-2018

Typically code is deployed prior to running a workflow. If it works when code is deployed, there is no issue.

Avatar

Avatar
Validate 1
Level 2
vipins5188
Level 2

Likes

8 likes

Total Posts

41 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
vipins5188
Level 2

Likes

8 likes

Total Posts

41 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
vipins5188
Level 2

10-12-2018

Hi Arun,

I tried with resource.adaptTo(WorkflowStatus.class).getWorkflows(true).isEmpty(); to check if its part of any workflow but this one also return me with an empty list.

As soon as i send page for workflow these methods returns correct status but if i deploy the code after workflow started these are sending me false status, any idea why ??/

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,279 likes

Total Posts

3,153 posts

Correct Reply

889 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,279 likes

Total Posts

3,153 posts

Correct Reply

889 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

09-12-2018

Hi,

Not sure why this happening, can you try with alternative method, to check if payload is not part of any workflow?

resource.adaptTo(WorkflowStatus.class).getWorkflows(true).isEmpty();