AnsweredAssumed Answered

Best process instance 'verbose' logging strategy

Question asked by mmaker1234 on Mar 8, 2013
Latest reply on Oct 18, 2015 by shrey
Hello Activiti developers,

We need to log as much as possible of a Process Instance execution. Until now I made changes to the Activiti Engine but it should not be as difficult, especially with the latest modification to the Listeners. Please advise what is the best approach to receive a result like this with as little modifications to the Activiti engine as possible:

end Activity id=1370772, name='Statistics Update Schedule Interval Timer' (definitionId=statisticsUpdateScheduleIntervalTimer) with properties: {default=null, name=Statistics Update Schedule Interval Timer, documentation=null, line=17, type=boundaryTimer}, Scope, Execution[id=1370772, ProcessInstance(id)=30101, ProcessDefinition(id)='UpdateStatistics:1:63', ActvityDefinition(id)='statisticsUpdateScheduleIntervalTimer'], definition_version: '$Revision: 1.2 $'

end Activity id=1370772, name='Manual Statistics Update' (definitionId=manualStatisticsUpdate) with properties: {default=null, name=Manual Statistics Update, documentation=null, line=16, timerDeclarations=[Timer [type=DURATION, expression='${updateInterval}', jobHandlerType=timer-transition, jobHandlerConfiguration=statisticsUpdateScheduleIntervalTimer, repeat=null, retries left = 3, exclusive=true]], type=userTask}, Scope, Execution[id=1370772, ProcessInstance(id)=30101, ProcessDefinition(id)='UpdateStatistics:1:63', ActvityDefinition(id)='manualStatisticsUpdate'], definition_version: '$Revision: 1.2 $'

start Activity id=30101, name='Update Statistics' (definitionId=updateStatistics) with properties: {default=null, name=Update Statistics, documentation=null, line=6, type=serviceTask}, Scope, Execution[id=30101, ProcessInstance(id)=30101, ProcessDefinition(id)='UpdateStatistics:1:63', ActvityDefinition(id)='updateStatistics'], definition_version: '$Revision: 1.2 $'

end Activity id=30101, name='Update Statistics' (definitionId=updateStatistics) with properties: {default=null, name=Update Statistics, documentation=null, line=6, type=serviceTask}, Scope, Execution[id=30101, ProcessInstance(id)=30101, ProcessDefinition(id)='UpdateStatistics:1:63', ActvityDefinition(id)='updateStatistics'], definition_version: '$Revision: 1.2 $'

start Activity id=1370803, name='Confirm Statistics Update Finished' (definitionId=confirmStatisticsUpdateFinished) with properties: {default=null, name=Confirm Statistics Update Finished, documentation=null, line=7, timerDeclarations=[Timer [type=DURATION, expression='PT1H', jobHandlerType=timer-transition, jobHandlerConfiguration=StatisticsUpdateTimedOutTimer, repeat=null, retries left = 3, exclusive=true]], type=receiveTask}, Scope, Execution[id=1370803, ProcessInstance(id)=30101, ProcessDefinition(id)='UpdateStatistics:1:63', ActvityDefinition(id)='confirmStatisticsUpdateFinished'], definition_version: '$Revision: 1.2 $'

end Activity id=1370803, name='Confirm Statistics Update Finished' (definitionId=confirmStatisticsUpdateFinished) with properties: {default=null, name=Confirm Statistics Update Finished, documentation=null, line=7, timerDeclarations=[Timer [type=DURATION, expression='PT1H', jobHandlerType=timer-transition, jobHandlerConfiguration=StatisticsUpdateTimedOutTimer, repeat=null, retries left = 3, exclusive=true]], type=receiveTask}, Scope, Execution[id=1370803, ProcessInstance(id)=30101, ProcessDefinition(id)='UpdateStatistics:1:63', ActvityDefinition(id)='confirmStatisticsUpdateFinished'], definition_version: '$Revision: 1.2 $'

start Activity id=30101, name='Is Statistics Collection Successful' (definitionId=isStatisticsCollectionSuccessfull) with properties: {default=null, name=Is Statistics Collection Successful, documentation=null, line=13, type=exclusiveGateway}, Scope, Execution[id=30101, ProcessInstance(id)=30101, ProcessDefinition(id)='UpdateStatistics:1:63', ActvityDefinition(id)='isStatisticsCollectionSuccessfull'], definition_version: '$Revision: 1.2 $'

Set value for variable named 'isStatisticsUpdateSuccessfull'

end Activity id=30101, name='Is Statistics Collection Successful' (definitionId=isStatisticsCollectionSuccessfull) with properties: {default=null, name=Is Statistics Collection Successful, documentation=null, line=13, type=exclusiveGateway}, Scope, Execution[id=30101, ProcessInstance(id)=30101, ProcessDefinition(id)='UpdateStatistics:1:63', ActvityDefinition(id)='isStatisticsCollectionSuccessfull'], definition_version: '$Revision: 1.2 $'

start Activity id=30101, name='Set Update Interval' (definitionId=setUpdateInterval) with properties: {default=null, name=Set Update Interval, documentation=null, line=14, type=serviceTask}, Scope, Execution[id=30101, ProcessInstance(id)=30101, ProcessDefinition(id)='UpdateStatistics:1:63', ActvityDefinition(id)='setUpdateInterval'], definition_version: '$Revision: 1.2 $'

Set value for variable named 'updateInterval'

end Activity id=30101, name='Set Update Interval' (definitionId=setUpdateInterval) with properties: {default=null, name=Set Update Interval, documentation=null, line=14, type=serviceTask}, Scope, Execution[id=30101, ProcessInstance(id)=30101, ProcessDefinition(id)='UpdateStatistics:1:63', ActvityDefinition(id)='setUpdateInterval'], definition_version: '$Revision: 1.2 $'

start Activity id=1370812, name='Manual Statistics Update' (definitionId=manualStatisticsUpdate) with properties: {default=null, name=Manual Statistics Update, documentation=null, line=16, timerDeclarations=[Timer [type=DURATION, expression='${updateInterval}', jobHandlerType=timer-transition, jobHandlerConfiguration=statisticsUpdateScheduleIntervalTimer, repeat=null, retries left = 3, exclusive=true]], type=userTask}, Scope, Execution[id=1370812, ProcessInstance(id)=30101, ProcessDefinition(id)='UpdateStatistics:1:63', ActvityDefinition(id)='manualStatisticsUpdate'], definition_version: '$Revision: 1.2 $'
Note also the creation, update, and removal of process instance variables (only the update is shown here).

I didn't catch the "life" (creation, ending) of the process instance jobs and human tasks, which are also of interest to us.

It would be best if the log displays the database IDs of the activities, jobs and human tasks (we set the history level to the maximum).

Outcomes