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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Workflow migration for 6.5 upgrade

Avatar

Level 3

Hello there,

I've been struggling with the workflow migration steps for a while now because nothing seems to work. As per my understanding, we must do the following:-

1 - Ensure that the workflows exist in the older location i.e. inside '/etc'

2 - Migrate these workflows one at a time by changing the urls to 'conf'global/settings/workflows' instead of '/etc'

3 - Click on the 'Sync' button so as to generate the corresponding run time models

4 - Grab these models from '/conf' and 'var' and integrate them in your source code.

 

Given below are the questions I have:

1 - The older workflow models that initially reside in 'etc' point to scripts located in etc as well. Do we need to update these workflows such that they point to the new locations of their respective script i.e '/apps/settings/workflow/scripts' when we integrate them with our source code? If yes, doesn't that defeat the whole purpose of migrating and syncing the older workflows beforehand, since they were pointing to the older location of the workflow scripts.

 

2 - Do I completely remove the older workflows from '/etc' from my source code and use the workflow models that now reside in '/conf'

 

3 - Also, how do we deal with any running workflow instances since they point to the older versions of the workflow models that are pointing to the scripts in '/etc'. I initially wrote a script to update these values. However, since these pages are locked, it won't let me update these values. Anyway I can bypass that?

It would be really helpful, if someone can elaborate the steps a bit. I've been struggling for a really long time. Thanks in advance!

 

Regards

S.A

 

P.S. tagging @Pavan_kalyan for a quick response:)

1 Accepted Solution

Avatar

Correct answer by
Level 3

Thanks for the tips @milind_bachani !  and @Raja-kp I'll list down the steps with details for you. I've been able to resolve this problem.

 

Let's imagine a scenario where you're performing an in-place upgrade to AEM 6.5. You've finished up all the steps up until the point where your code needs to be build and deployed to your instance. Assuming that your source code has some project related custom workflows in it that are now pointing to the new locations in the repository, for example - 'apps/workflow/scripts' instead of 'etc/workflow/scripts' etc . 

 

At this stage you have to ensure that the older workflows still exist in '/etc'. Start migrating these custom workflows on by one. You could do this by either going to crxde lite(in which case you'll need to add 'cf#' or 'editor.html' to your url to open it in the edit mode) or you can directly go to the welcome page -> tools -> workflows -> models. Once you've finished migrating these custom workflow models, extract these workflow models (from both '/conf' and '/var') into a crx package and export them. Unzip this package on your machine and integrate these models into your source code. However, make sure that you're updating the paths in these files such that they're pointing to the new locations instead of '/etc'.

 

Ensure that the appropriate folder structure exists at '/conf/global/settings/workflow/launchers' where each of these nodes are of the type 'sling:folder'.

 

Once you've migrated all the project related workflows, you should be ready to build and deploy your source code. At this point, you should be able to see the updated workflows in '/conf' and '/var'. Also, a new workflow version should be created for each of these models. 

 

You will also need to make sure that you're updating the workflow version for any of the workflow instances that are currently running inside '/var/workflow/models/instances/server0' so that we're referring to the appropriate version. Also, update the launcherId if any of your workflows are using launcher scripts. Your best bet is to write a script that does the job for you instead of having to manually update the values. 

 

Also, in order to use launcher scripts, you will need to assign appropriate permissions to 'workflow-service' which is responsible for creating workflow sessions. You can do this by going to the useradmin and search for 'workflow-service' , go to the permissions tab and select '/app/workflow/scripts'.

 

P.S. People have run into different workflow issues. None of the answers I came across had the whole explanation. Hopefully these steps will help others. 

 

@Raja-kp Lemme know if you need me to explain more and I'll be more than happy to help. @milind_bachani thanks so much again! 🙂

 

Cheers,

S.A

 

 

 

View solution in original post

3 Replies

Avatar

Community Advisor

hi @Alisahali ,

You need to follow steps mentioned in reporestructure while making the upgrade.
However, AEM still supports backward compatibility and resolution orders is as :

/conf >> /libs >> /etc

 

All the repo-restructure details are mentioned here:
https://experienceleague.adobe.com/docs/experience-manager-65/deploying/restructuring/all-repository...

To answer your questions:
#1 -> Yes, workflows should now be moved to /conf/global/settings/workflow and scripts to be moved to /apps/workflow/scripts and you need to update the script references accordingly (old & new paths mentioned in link above). 
#2 - > Yes, all workflow related stuff needs to be cleaned up from /etc. Once done, you need to sync to create the running instance of worflow from new path(/conf) which would be created in /var.

Also, refer this thread :
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-3-to-aem-6-5-in-plac...


Please let me know if you still face issues, happy learning!

Thanks.

Avatar

Level 3

@milind_bachani I've followed the exact same steps to migrate these workflows. However, I've also included the run time models in my code as mentioned in these instructions. Now the problem is, even though I can see that given workflow model exists in '/conf', I get an exception saying that 'could not find workflow '/conf/global/settings/workflow/modelX' ,cannot start launcher....'. Any idea why that could be happening?

Avatar

Community Advisor

Hi @Alisahali ,

I think you might be missing on something while creating the new structure, leading to such error and the launcher linked to your workflow model is somehow not getting resolved.

Here's a similar thread that maybe useful :
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/unable-to-create-a-workflo...

 

If it does not resolve, can you create the package of relevant resources and share so that I can try to have a deeper insight, thanks.

Avatar

Community Advisor

@Alisahali Can you a raise Adobe support ticket to review these steps to be followed for workflow migration- so that we won't be missing any steps.

 

Regards,

Raja

Avatar

Correct answer by
Level 3

Thanks for the tips @milind_bachani !  and @Raja-kp I'll list down the steps with details for you. I've been able to resolve this problem.

 

Let's imagine a scenario where you're performing an in-place upgrade to AEM 6.5. You've finished up all the steps up until the point where your code needs to be build and deployed to your instance. Assuming that your source code has some project related custom workflows in it that are now pointing to the new locations in the repository, for example - 'apps/workflow/scripts' instead of 'etc/workflow/scripts' etc . 

 

At this stage you have to ensure that the older workflows still exist in '/etc'. Start migrating these custom workflows on by one. You could do this by either going to crxde lite(in which case you'll need to add 'cf#' or 'editor.html' to your url to open it in the edit mode) or you can directly go to the welcome page -> tools -> workflows -> models. Once you've finished migrating these custom workflow models, extract these workflow models (from both '/conf' and '/var') into a crx package and export them. Unzip this package on your machine and integrate these models into your source code. However, make sure that you're updating the paths in these files such that they're pointing to the new locations instead of '/etc'.

 

Ensure that the appropriate folder structure exists at '/conf/global/settings/workflow/launchers' where each of these nodes are of the type 'sling:folder'.

 

Once you've migrated all the project related workflows, you should be ready to build and deploy your source code. At this point, you should be able to see the updated workflows in '/conf' and '/var'. Also, a new workflow version should be created for each of these models. 

 

You will also need to make sure that you're updating the workflow version for any of the workflow instances that are currently running inside '/var/workflow/models/instances/server0' so that we're referring to the appropriate version. Also, update the launcherId if any of your workflows are using launcher scripts. Your best bet is to write a script that does the job for you instead of having to manually update the values. 

 

Also, in order to use launcher scripts, you will need to assign appropriate permissions to 'workflow-service' which is responsible for creating workflow sessions. You can do this by going to the useradmin and search for 'workflow-service' , go to the permissions tab and select '/app/workflow/scripts'.

 

P.S. People have run into different workflow issues. None of the answers I came across had the whole explanation. Hopefully these steps will help others. 

 

@Raja-kp Lemme know if you need me to explain more and I'll be more than happy to help. @milind_bachani thanks so much again! 🙂

 

Cheers,

S.A

 

 

 

Avatar

Level 4

Hi @Alisahali 

 

Thanks for sharing the answer.

I was away for a while and haven't been on this blog  so replying late.