How to create custom workflow steps in AEM 6.3 ? | Community
Skip to main content
Suraj_Kamdi
Community Advisor
Community Advisor
November 30, 2017
Solved

How to create custom workflow steps in AEM 6.3 ?

  • November 30, 2017
  • 3 replies
  • 3023 views

How to create custom workflow steps in AEM 6.3 ? any Idea. because @property, @service is deprecated

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

You can use the OSGI R6 Component annotation.

org.osgi.service.component.annotations.Component

@Component(service=WorkflowProcess.class, property = {"process.label=My Workflow Process"})

public class MyWorkflowProcess implements WorkflowProcess {

@Override

    public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) throws WorkflowException {

    // code

    }

}

Make sure you have the appropriate dependencies.

3 replies

rmahendra
Adobe Employee
rmahendraAdobe EmployeeAccepted solution
Adobe Employee
November 30, 2017

You can use the OSGI R6 Component annotation.

org.osgi.service.component.annotations.Component

@Component(service=WorkflowProcess.class, property = {"process.label=My Workflow Process"})

public class MyWorkflowProcess implements WorkflowProcess {

@Override

    public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) throws WorkflowException {

    // code

    }

}

Make sure you have the appropriate dependencies.

smacdonald2008
Level 10
November 30, 2017

We will update the Article to show use of this - great thread!

Anupam_Maiti
Level 2
July 24, 2019

Hi,

I have tried creating custom workflow steps using R6 annotation but it's not showing in workflow process step (process selection drop-down).

Please find the below Github link for the project :

GitHub - anupammaiti/AEM63AppWorkflowStep: AEM63 App Workflow Step Code For Adobe

Custom workflow step java file name :"ReplicateViaSpecificAgent.java"

Could any one please let me know if I am doing something wrong or there is some issue from product side.

Thanks in advance.

Warm Regards

Anupam Maiti