@Component(
label = "CQ Workflow Process amit",
description = "Sample Workflow Process implementation amit",
metatype = true,
immediate = true
)
@Properties({
@Property(
name = "service.description",
value = "CQ Workflow Process implementation.amit",
propertyPrivate = true
),
@Property(
name = "service.pid",
value = "amitsample.core.filters.WorkflowSamplefilter",
description = "CQ Workflow Process description"
),
@Property(
name = "process.label",
value = "my first workflow process step ",
description = "CQ Workflow Process description"
)
})
I am not getting my customised process in the list . Please suggest what i m doing wromh here ...aem version 6.0 i m using ....and using all scr annotations
and
<dependency>
<groupId>com.day.cq.workflow</groupId>
<artifactId>cq-workflow-api</artifactId>
<version>5.4.2</version>
<scope>provided</scope>
</dependency>
full code if want to check:
package amitsample.core.filters;
import com.day.cq.workflow.WorkflowException;
import com.day.cq.workflow.WorkflowSession;
import com.day.cq.workflow.exec.WorkItem;
import com.day.cq.workflow.exec.WorkflowProcess;
import com.day.cq.workflow.metadata.MetaDataMap;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
@Component(
label = "CQ Workflow Process amit",
description = "Sample Workflow Process implementation amit",
metatype = true,
immediate = true
)
@Properties({
@Property(
name = "service.description",
value = "CQ Workflow Process implementation.amit",
propertyPrivate = true
),
@Property(
name = "service.pid",
value = "amitsample.core.filters.WorkflowSamplefilter",
description = "CQ Workflow Process description"
),
@Property(
name = "process.label",
value = "my first workflow process step ",
description = "CQ Workflow Process description"
)
})
public class WorkflowSamplefilter implements WorkflowProcess {
@Override
public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) throws WorkflowException {
}
}
Hi,
@service annotation seems to be missing in your code.could you please add and check again?
Please follow this: Adobe Experience Manager Help | Creating custom AEM workflow steps that send email messages
Regards,
Arpit
Views
Replies
Total Likes
yeah i missed that but after adding that aslo it didnt resolve the issue
@Service(WorkflowSamplefilter.class)
any other work around?
Views
Replies
Total Likes
Can you replace your annotation with below and try again:
@Component
@Service
@Properties
({
@Property
(name = Constants.SERVICE_DESCRIPTION, value =
"Sample Workflow Process implementation amit"
)
@Property
(name =
"process.label"
, value =
"my first workflow process step"
) })
public class WorkflowSamplefilter implements WorkflowProcess {
@Override
public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) throws WorkflowException {
}
}
Thanks Arpit. its worked ..........but still wondering wat was wrong ?
Views
Replies
Total Likes
You were using @Service(WorkflowSamplefilter.class) which was wrong.
Instead, you should either use @Service(WorkflowProcess.class) or just @Service annotation
I have gone through all the links available for workflows and did Rnd already ..didnt get wats the actual issue ...that is why posted here ...Thanks
Views
Replies
Total Likes
Try to use something like:
@Component(service=WorkflowProcess.class, property = {"process.label=My Workflow"})
Views
Replies
Total Likes
still I am using SCR annotations .....and working in AEM 6.0
Views
Replies
Total Likes