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

AEM 6.4 - How to purge workflow packages

Avatar

Level 2

In our AEM 6.4.3.0 Author instance we are seeing a lot of generated workflow packages (~1800) in /etc/workflow/packages. Much more than there are running workflow instances. The Workflow Purge is configured to remove COMPLETED workflows older than 30 days but this doesn't seem to remove associated workflow packages.

Is there a way to get rid of the old workflow packages?

8 Replies

Avatar

Level 2

Hi @anish-s . I had a look at the Workflow Remover but I don't think it does what we need. If I understand correctly, the Workflow Payload Paths you can specify in the Workflow Remover configuration only act as an additional filter for determining if a workflow should be removed or not.

What we would like to have is that the payload of the workflow is removed together with the workflow, but only if the payload is a generated workflow package.

 

Avatar

Community Advisor

Hi @kais46765928, as far as I know there are no OOTB AEM mechanism or ACS Commons functionality that will allow to remove workflow packages. All above functionalities concentrate on workflow instance only. Looking on the number of workflow packages, I would assume you are using workflow packages on daily basis. In that case I would suggest to create some custom java functionality, i.e. using Scheduler that will periodically - e.g. every night look for packages that are connected to finished workflow instances (Completed or Aborted).

I would also consider to include mechanism that will take care of orphaned packages. You are using Workflow Purge mechanism so I am sure that for some of the packages workflow instance does not exist in the repository any more, but those packages should be removed as well.

Avatar

Level 2

Thank you for your input. I find it quite hard to understand why there is no OOTB solution in AEM for this. Isn't this a common problem when using workflows? I mean that workflow packages are automatically generated and pile up in the repository? Or are we doing something wrong in our AEM/workflow setup?

Avatar

Community Advisor

You are correct this is a common problem, I am not aware how exactly you have implemented your case, but I doubt you are doing something wrong. I have no idea why workflow package purging is not part of OOTB AEM functionality.

Avatar

Level 2

Thank you for your answer but I'm afraid it doesn't address my question. I was asking about generated workflow packages in /etc/workflow/packages and not about packages created by the package manager.

This shouldn't be marked as the correct answer.

Avatar

Level 7

Hi @kais46765928 ,

you can use exactly the same approach for all the /etc/ packages.

Thanks,

Antonio