Creating Custom Workflow Step | AEM Community Blog Seeding | Community
Skip to main content
kautuk_sahni
Adobe Employee
Adobe Employee
January 20, 2021

Creating Custom Workflow Step | AEM Community Blog Seeding

  • January 20, 2021
  • 0 replies
  • 754 views

BlogImage.jpg

Creating Custom Workflow Step by aem.design

Abstract

When writing custom workflow services, you may find yourself not seeing your service being recognised by the Process Step. You will first encounter this when you don’t see your service appear in the process list on the dialog. And once you verify the data source that feeds that dropdown at http://localhost:4502/libs/cq/workflow/content/console/process.json you will wonder why. You may also see errors like this Could not find service for service reference {YOUR WORKFLOW STEP CLASS PATH} with label {no label} that could just tell you your class is missing property process.label.

Now that you know, you add this property to your class and your class appear in the list, here is an example of how to add it:

@Component(
immediate = true,
service = WorkflowProcess.class,
property = { "process.label=Content Fragment Page Generator" }
)
Also while debugging this, you may find some other errors polluting your docker logs.

The activate method has thrown an exception (java.lang.IllegalStateException: org.apache.sling.api.resource.LoginException: Cannot derive user name for bundle com.adobe.acs.acs-aem-commons-bundle [553] and sub service workflowpackagemanager-service
To fix this, all you need to do is add missing service mapping mentioned in the message. You should be able to replicate this by restarting your missing component at eg http://localhost:4502/system/console/components/design.aem.workflow.process.ContentFragmentPageGenerator. In example above missing use name is workflowpackagemanager-service and bundle is com.adobe.acs.acs-aem-commons-bundle. To add this missing entry do this:
1. open http://localhost:4502/system/console/configMgr/
2. search for com.adobe.acs.acs-aem-commons-bundle look for mapping in Apache Sling Service User Mapper Service Amendment
3. add or update blank entry with com.adobe.acs.acs-aem-commons-bundle:workflowpackagemanager-service=workflow-process-service

Read Full Blog

Creating Custom Workflow Step

Q&A

Please use this thread to ask the related questions.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.