Access to activiti historical data from workflow service

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
vincent-kali
Established Member

Access to activiti historical data from workflow service

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
afaust
Master

Re: Access to activiti historical data from workflow service

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.

vincent-kali
Established Member

Re: Access to activiti historical data from workflow service

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
Master

Re: Access to activiti historical data from workflow service

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
Established Member

Re: Access to activiti historical data from workflow service

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" ?