User audit on process variable change
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2013 09:19 AM
Hi everybody. Thanks the activiti developer team for their great job!
My question is: I want to know what user have changed my process's variable. How it can be done?
For example (activiti-engine v5.13):
1) in activiti.cfg.xml - <property name="history" value="full" />
2) Java code
But an HistoricDetailVariableInstanceUpdateEntity does not have a user id property. Could you tell me any approach how i can get an actor user?
Thanks in advance.
My question is: I want to know what user have changed my process's variable. How it can be done?
For example (activiti-engine v5.13):
1) in activiti.cfg.xml - <property name="history" value="full" />
2) Java code
RuntimeService runtimeSvc = activitiRule.getRuntimeService();TaskService taskSvc = activitiRule.getTaskService();HistoryService historySvc = activitiRule.getHistoryService();Map<String, String> vars = new HashMap<String, String>();vars.put("myVar", "Test");ProcessInstance processInstance = runtimeSvc.startProcessInstanceByKey("myprocess", vars)vars.put("myVar", "new value");taskSvc.complete(taskSvc.createTaskQuery().singleResult().getId(), vars);Then i can retrieve all variable changes byhistorySvc.createHistoricDetailQuery().variableUpdates().processInstanceId(processInstance.getProcessInstanceId()).list()
But an HistoricDetailVariableInstanceUpdateEntity does not have a user id property. Could you tell me any approach how i can get an actor user?
Thanks in advance.
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2013 02:59 AM
This information is not recorded.
Possibilities:
Possibilities:
- use task assignee to determine to whom task was assigned. I think it is not what you want to.
- extend TaskService.complete method implementation.
- put the information (who did the change) into task variables. It will be recorded.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2013 03:44 AM
Thank you Martin!
I really hope that user info will be recorded in future releases. Because any audit systems should answer to questions: What changes are made? Who did the changes?
I really hope that user info will be recorded in future releases. Because any audit systems should answer to questions: What changes are made? Who did the changes?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2013 05:56 PM
Activiti currently supports history. It is not auditing.
May be you can
- create ticket in jira.
- (create pull request with implementation) 🙂
May be you can
- create ticket in jira.
- (create pull request with implementation) 🙂
