Hi,
I have written an OSGI service that implements com.adobe.granite.workflow.exec.WorkflowProcess. The bundle deploys and is in "active" state with no errors. When trying to create a "process step" within OSGI workflow editor, my service does not show up in the process list (see attached screenshot). The annotations I am using in my service class are pasted below, along with relevant errors from the error log. What am I doing wrong?
@Component
@Service
@Properties({
@Property(name = Constants.SERVICE_DESCRIPTION, value = "Alfresco CMIS Connector"),
@Property(name = Constants.SERVICE_VENDOR, value = "Adobe"),
@Property(name = "process.label", value = "Store PDF into Alfresco repository")
})
ERROR LOG SNIPPET
18.01.2017 14:05:39.685 *INFO* [0:0:0:0:0:0:0:1 [1484769939594] POST /etc/workflow/models/drilling-permit-submit/jcr:content.generate.json HTTP/1.1] com.adobe.granite.workflow.core.WorkflowSessionImpl Workflow model deployed: /etc/workflow/models/drilling-permit-submit/jcr:content/model(Version: 1.1)
18.01.2017 14:05:46.302 *INFO* [0:0:0:0:0:0:0:1 [1484769946299] GET /libs/wcm/core/content/components.1484763158416.json HTTP/1.1] com.day.cq.wcm.core.impl.components.ComponentServlet provided components.
18.01.2017 14:06:53.632 *ERROR* [0:0:0:0:0:0:0:1 [1484770013626] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:06:53.632 *ERROR* [0:0:0:0:0:0:0:1 [1484770013626] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:06:53.633 *ERROR* [0:0:0:0:0:0:0:1 [1484770013626] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:06:53.633 *ERROR* [0:0:0:0:0:0:0:1 [1484770013626] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:06:53.633 *ERROR* [0:0:0:0:0:0:0:1 [1484770013626] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:06:53.633 *ERROR* [0:0:0:0:0:0:0:1 [1484770013626] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:06:53.672 *ERROR* [0:0:0:0:0:0:0:1 [1484770013666] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:06:53.672 *ERROR* [0:0:0:0:0:0:0:1 [1484770013666] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:06:53.673 *ERROR* [0:0:0:0:0:0:0:1 [1484770013666] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:06:53.673 *ERROR* [0:0:0:0:0:0:0:1 [1484770013666] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:06:53.673 *ERROR* [0:0:0:0:0:0:0:1 [1484770013666] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:06:53.673 *ERROR* [0:0:0:0:0:0:0:1 [1484770013666] GET /libs/cq/workflow/content/console/process.list.json HTTP/1.1] com.adobe.granite.workflow.console.servlet.ProcessListServlet trouble resolving jcr:title property form script's jcr:content node. Fallback to script path
18.01.2017 14:07:23.005 *INFO* [sling-default-37-com.adobe.granite.oauth.server.impl.AccessTokenCleanupTask.1069] com.adobe.granite.oauth.server.impl.AccessTokenCleanupTask AccessTokenCleanupTask: Removed 0 token(s) in 1ms (0 token(s) still active)
Solved! Go to Solution.
Views
Replies
Total Likes
I figured out the issue. Problem was that the workflow dependency defined in my maven project file did declare a scope, i.e. it used the default maven 'compile' scope. By adding 'provided' scope, as shown below, my service now shows up in process list of "process step".
<dependency>
<groupId>com.adobe.granite</groupId>
<artifactId>com.adobe.granite.workflow.api</artifactId>
<version>1.0.10</version>
<scope>provided</scope>
</dependency>
Views
Replies
Total Likes
Follow this article:
http://scottsdigitalcommunity.blogspot.ca/2013/10/creating-custom-aem-workflow-steps-that.html
There is also a video so you can watch it.
Views
Replies
Total Likes
Try this
@Component
@Service
public class AlfrescoConnector implements WorkflowProcess {
@Property(value = "Alfresco CMIS Connector.")
static final String DESCRIPTION = Constants.SERVICE_DESCRIPTION;
@Property(value = "Adobe")
static final String VENDOR = Constants.SERVICE_VENDOR;
@Property(value = "Store PDF into Alfresco repository")
static final String LABEL="process.label";
@Override
public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) throws WorkflowException {
......YOUR LOGIC HERE......
}
}
Views
Replies
Total Likes
Thanks. I actually followed that tutorial.
Views
Replies
Total Likes
Tried the suggested alternative form of property annotations and still not showing up in process list. Has anyone seen that specific error? I am logged in as admin, so can't be a permissions problem.
Views
Replies
Total Likes
When you followed the article - did you see the action in the drop-down?
Views
Replies
Total Likes
I figured out the issue. Problem was that the workflow dependency defined in my maven project file did declare a scope, i.e. it used the default maven 'compile' scope. By adding 'provided' scope, as shown below, my service now shows up in process list of "process step".
<dependency>
<groupId>com.adobe.granite</groupId>
<artifactId>com.adobe.granite.workflow.api</artifactId>
<version>1.0.10</version>
<scope>provided</scope>
</dependency>
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies