Expand my Community achievements bar.

SOLVED

Workflow version error in logs on AEM Cloud

Avatar

Level 2

Hi team, hope you are doing fine.

I would like to know if you could help me out to solve the following issue.

We have a workflow that is not triggering for any reason and when we saw the error logs we found the following

 

19.07.2023 16:30:29.568 [cm-p104322-e987072-aem-author-857895b958-vl8dk] *ERROR* [8.29.228.88 [1689784229520] GET /libs/cq/workflow/admin/console/content/archive.html HTTP/1.1] com.adobe.granite.workflow.core.model.WorkflowModelCacheImpl cannot load model. id: /var/workflow/models/dam/scheduled_unpublish_bp vid: 1.4
com.adobe.granite.workflow.model.VersionException: Version error retrieving workflow model /var/workflow/models/dam/scheduled_unpublish_bp
	at com.adobe.granite.workflow.core.jcr.WorkflowModelManager.getWorkflowModelFromRepo(WorkflowModelManager.java:209) [com.adobe.granite.workflow.core:2.1.100]
	at com.adobe.granite.workflow.core.model.WorkflowModelCacheImpl.getModel(WorkflowModelCacheImpl.java:191) [com.adobe.granite.workflow.core:2.1.100]
	at com.adobe.granite.workflow.core.jcr.WorkflowModelManager.getWorkflowModel(WorkflowModelManager.java:114) [com.adobe.granite.workflow.core:2.1.100]
	at 

 

 

Looks like it is targeting a version we do not have for that workflow. Find below the image that describes the version of the workflows.

 

Screenshot 2023-07-19 at 14.09.20.png

 

How can we identify which component is pointing to a wrongly version and solve it? We're using AEM Cloud.

 

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 10

@NicolasSo  - 

 

You might not be able to access Mbeans directly to purge workflow instances in AEM as a cloud service.

 

Here is how you can do the workflow purging https://www.opsinventor.com/panel-discussion-on-aem-as-a-cloud-service/ 

View solution in original post

7 Replies

Avatar

Level 3

Hi @NicolasSo,

There are chances that you have an active Workflow instance for a model that has been deleted.

Best way to fix this is to purge the workflow instance for the model that's not there.

 

Refer to below thread which had same version error issue,

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/getting-workflow-version-e...

 

Thanks,

Avatar

Level 2

Thanks @Sid_Gour for the response.

Do you know how to access the Workflow Maintenance MBean mentioned in that thread using AEM Cloud?

Looks like the URL is pointing to local instance.

Thanks,

Nicolas.

Avatar

Correct answer by
Level 10

@NicolasSo  - 

 

You might not be able to access Mbeans directly to purge workflow instances in AEM as a cloud service.

 

Here is how you can do the workflow purging https://www.opsinventor.com/panel-discussion-on-aem-as-a-cloud-service/ 

Avatar

Level 10

Hello @NicolasSo - 

 

The error message indicates that there is a version mismatch for the workflow model /var/workflow/models/dam/scheduled_unpublish_bp. The version of the workflow model being requested is 1.4, but it seems that version is not available in the repository, causing a VersionException. This discrepancy is likely to be resolved via Workflow Purge.

 

Here is how you can do it in AEM as a cloud service : 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/operations/maintena... 

 

 

Avatar

Level 2

Hi @Tanika02 thanks for the response.

 

Thanks for sharing the documentation, I have reviewed the repo and I am unable to find a path similar to the one described in the documentation unfortunately.

 

Must be done in git. Override the out-of-the-box Maintenance window configuration node under /libs by creating properties under the the folder /apps/settings/granite/operations/maintenance/granite_weekly, granite_daily or granite_monthly. 

 

My repository looks like this at the moment.

Screenshot 2023-07-20 at 10.42.34.png

 

Thanks a lot. 

Avatar

Community Advisor

Hello @NicolasSo 

 

Do you have any instance on which this workflow is working as expected? If yes, can you please assure that the nodes specific to this workflow are consistent for the following nodes, between the working and not-unworking instances:

- /var/workflow/models

- /conf/global/settings/workflow/models

 

The UI shows version as 1.2, while logs display as 1.4. Just wondering, if any of the above 2 have not been synced.


Aanchal Sikka

Avatar

Level 2

Hi @aanchal-sikka thanks for the response.

 

When running the workflow manually it works as expected, the issue is when we try run it using launcher. And we don't have any good instance ran, unfortunately.

 

Yes, looks like there is some missing sync but the AEM instance is very new (no longer than 2 months) so I am wondering what could happen.

 

Thanks.