01-19-2019 06:26 AM
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
01-19-2019 07:20 AM
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.
01-19-2019 08:45 AM
01-19-2019 03:31 PM
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).
01-22-2019 03:33 AM
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" ?
Explore our Alfresco products with the links below. Use labels to filter content by product module.