I am trying to include com.adobe.cq.wcm.translation.impl.process.SyncTranslationProcess as reference in my OSGi service. How can i include it?
Solved! Go to Solution.
Views
Replies
Total Likes
Technically you can create a reference to a specific OSGI service, but in most cases that's not really necessary and also bad design.
@Reference(target=("component.name=com.adobe.cq.wcm.translation.impl.process.SyncTranslationProcess"))
WorkflowProcess syncTranslationProcess
(check How do I specify an implementation using @OSGiService for some more details). But I don't think that is a good idea. First of all you need to get the right parameters (and creating a WorkflowSession manually is not recommended at all). Also invoking this workflow step from a custom other workflow step does not make sense to me, you should rather re-design your workflow.
Are you following an online resource.
I am not seeing this Java class in the AEM Javadocs: "The Adobe AEM Quickstart and Web Application."
What exactly are you trying to do? Are you trying to invoke a workflow from another AEM Service?
Views
Replies
Total Likes
Yes, I am trying to invoke a workflow from an AEM service which is leading to a race condition hence I was thinking if I can Invoke the execute method.. as my service is leading to another workflow..
In short I wanted to extract the logic that is there in a workflow.. as workflow have bootle neck if the workflow queue is exhausted.
In the AEM bootstrap translation connector I am using Sync Translation WF to create translation export and using that export file in createTranslationJob
Views
Replies
Total Likes
Technically you can create a reference to a specific OSGI service, but in most cases that's not really necessary and also bad design.
@Reference(target=("component.name=com.adobe.cq.wcm.translation.impl.process.SyncTranslationProcess"))
WorkflowProcess syncTranslationProcess
(check How do I specify an implementation using @OSGiService for some more details). But I don't think that is a good idea. First of all you need to get the right parameters (and creating a WorkflowSession manually is not recommended at all). Also invoking this workflow step from a custom other workflow step does not make sense to me, you should rather re-design your workflow.
Thanks Jorg for the advise. I changed my workflow design, not sure why it did not strike me earlier. Thanks again!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies