Content Services (ECM)
Process Services (BPM)
Application Development Framework
Digital Business Platform
Announcements & Opportunities
Alfresco Ambassador Program
Alfresco Content Services (ECM)
to create and rate content, and to follow, bookmark, and share content with other members. Not a member?
Question asked by
on Mar 15, 2014
on Mar 17, 2014 by mangar
Show 1 Like
How do I access the Activiti HistoryService from an Alfresco WebService? I don't see it in the list of services in the Serviceregistry. Do I need to inject it somehow?
No one else has this question
Mark as assumed answered
This content has been marked as final.
Show 2 comments
(Required, will not be published)
Mar 16, 2014 3:45 PM
you should not need to use the Activiti HistoryService directly. Simply use the Alfresco WorkflowService to get data from completed tasks. The queryTasks operation can be used to retrieve historic tasks as well without going to the low-level HistoryService, and is available via the ServiceRegistry.
In case you <b>really, really</b> need the Activiti HistoryService directly, you can use the generic getService() operation in the service registry and use a QName with localName = "activitiHistoryService" to retrieve it. I'd advise against using this from an Alfresco "WebService" (in a workflow?) as I know there can be various issues with side-effects due to Activiti sort-of having its own SQL / txn context, which - as I have experienced - may clash with the Alfresco context if used other than how Alfresco integrated the Activiti services into the WorkflowService.
1 person found this helpful
Show 1 Like
Mar 17, 2014 5:38 AM
Thank you. I injected the activitiHistoryService straight into my WebService in my bean definition. I needed the history service to get access to some process variables for reporting.
These are variables from completed workflows. I could not find any way to get at them through the Alfresco WorkflowService.
If you know a better way, please tell me.
Show 0 Likes
Retrieving data ...
PropertyNotFoundException: Cannot resolve identifier
Starting Activiti Workflow by Execute Script fails
Restrict to upload in new version with different file name and extension.
Content Store Configuration