how to update task variables of completed workflow tasks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2015 02:19 AM
I trying to update the task variables which are related to completed workflow tasks. Please provide any valuable suggestions for this
Thanks,
Nagaraju.
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2015 07:40 AM
already completed tasks can not be updated in runtime tables. (They do not exist already.) You can try to update history tables. From my point of view making changes in the history does not make sense.
Could you provide jUnit test what are you trying to do?
Regards
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2015 09:09 AM
we are developing workflow history component for all workflows which are completed or in progress state, currently with in workflow history component we need to show some audit information, as of now we are getting values from audit tables and shown in workflow history component. instead doing like that we are thinking to get values from audit tables and set to task properties to improve performance of workflow history component.
Thanks,
Nagaraju.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2015 02:05 AM
I did not catch the idea why you want to store historic data in task properties. From my point of view audit trail info does not belong to task properties. If you need more detailed audit trail info or store audit trail differently, use beats and your own way of storing audit trail data.
Regards
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2015 10:47 AM
As discussed above we already saving document related properties in task properties instead of audit trails for in-progress tasks and newly initiated workflows,we are unable to update properties related to completed tasks.
Please let us know if there is any possibility to update the property for completed tasks.
Thanks,
Nagaraju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2015 05:50 AM
If you want to do so, you can of course have custom logic that allows updating the variables. You would need a custom command for that and maybe custom sql (http://www.jorambarrez.be/blog/2014/01/17/execute-custom-sql-in-activiti/).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2016 03:52 AM
I am trying to use a custom mapper for updating the histroic variables. Here's the mapper code
interface CustomActivitiMapper {
@Update("UPDATE ACT_HI_VARINST SET #{variableKey} = #{variableValue} WHERE TASK_ID_ = #{taskId}")
List<Map<String, Object>> updateHistoryVariables(ArrayList variableValue,String taskId,String variableKey);
}
And here's the implementation code,
CustomSqlExecution<CustomActivitiMapper,List<Map<String, Object>>> customSqlExecution = new AbstractCustomSqlExecution<CustomActivitiMapper, List<Map<String, Object>>>() {
@Override
List<Map<String, Object>> execute(CustomActivitiMapper customActivitiMapper) {
return customActivitiMapper.updateHistoryVariables(taskComments,standaloneTask.getId(),variableKey);
}
}
List<Map<String, Object>> resultMap = managementService.executeCustomSql(customSqlExecution);
variableKey is the task variable's name.
taskComments is an arrayList of objects which I'm trying to update.
However I get the following exception
"java.lang.ArrayIndexOutOfBoundsException: 0" .
What could be the issue here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2018 01:05 AM
Hi nagarajut8 _
Even I have the same case to achieve, In my case I want to update the task form details of completed task. It will be help full if you share the info how you solved this issue.
Thanks & Regards
Anita Patil