Hi @darmien ,
I recently supported a migration from AEM 6.5 on-prem to AEMaaCS, so I can definitely relate.
Here are a few best practices that helped us ensure workflow reliability in the cloud environment:
Practical Best Practices to Test Workflows in AEM as a Cloud Service (from real project experience)
1. Test Custom Workflow Steps in Isolation (Unit Testing):
We used AemContext from the AEM Mocks library (JUnit5) to simulate workflow steps and test them independently. This helped us quickly catch logic issues before deploying.
2. Run End-to-End Testing on AEM Cloud SDK:
We did full cycle testing using the local AEMaaCS SDK — including custom steps, participant steps, and transitions. It's close enough to the cloud runtime to give confidence before pushing to higher environments.
3. Avoid Runtime Model Creation:
Since AEMaaCS doesn't retain runtime-created workflow models across deployments, we packaged all workflows under /conf and deployed them using Maven. This avoided accidental deletions after code deployments.
4. Use Cloud Manager Logs to Monitor Failures:
After deployment, we actively used AEM's Developer Console and Cloud Manager logs to trace workflow failures. For example, we once caught an intermittent failure in a custom step that was due to permissions in production.
5. Business UAT with Authors:
For one DAM-heavy use case, we created a sandbox workflow model for business users to simulate real approval flows. Their feedback helped us refine participant roles and email templates early.
6. Performance Testing with Batch Ingestion:
During QA, we triggered the workflows on 1000+ assets using pre-packaged content. This helped us spot delays in steps involving metadata updates, and optimize those parts before going live.
7. Error Handling & Logging:
I’d recommend wrapping custom step logic with structured logging and try-catch blocks, so you can catch and handle errors gracefully in production.
Regards,
Amit