cancel
Showing results for 
Search instead for 
Did you mean: 

Access to activiti historical data from workflow service

vincent-kali
Star Contributor
Star Contributor

Hi all,

As mentionned here (Workflow custom props update ) any activiti process property can be set from task/process activiti listener and read by WorkflowService API as soon as the property is defined as a process (start task) property.

But once the process is completed, these variables are not returned anymore by WorkflowService API.

Only variables set at process startup are returned. Why ?

All variables are found in 'act_hi_detail' activiti table. How to access these data from WorkflowService ?

Thanks,

Vincent

4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator

The ActivitiPropertyConverter has utility methods both for handling the variables of the start task and the historic process variables (including any changes to it). Unfortunately, the generic (non-Activiti-aware) WorkflowObjectFactory does not map the process variables to the WorkflowInstance (which does not have a field for process-level variables) except for some very specific values (context, package, initiator, description, priority and due date), and thus you are only left with the original start task properties excluding any subsequent changes.

So you cannot get these updated properties via the WorkflowService because the abstraction hides those details away.

Thanks Axel for this very clear response.

Would you have any advise to work around this limitation ?

I'm working in ACS and need to access to all process details initiated from WorkflowService.

I faced issues ( ) when trying to use activiti JAVA API within ACS WS.

Vincent

afaust
Legendary Innovator
Legendary Innovator

There is no clean way to work around this.. There is only a) patching of Alfresco core classes or b) using the low-level Activiti APIs directly (which I already advised against in the other thread you linked).

vincent-kali
Star Contributor
Star Contributor

Thanks axel.

Could you please point a direction to be able to use Activiti API from Alfresco WebScript and avoiding the issue "A valid SecureContext was not provided in the RequestContext" ?