03-08-2013 10:17 AM
…
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).03-11-2013 06:22 AM
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).
03-11-2013 07:58 AM
03-12-2013 04:05 AM
03-18-2013 11:25 AM
<property name="postBpmnParseHandlers">
<list>
<bean class="org.activiti.engine.parse.ActivityInstanceLoggersRegistrator" />
</list>
</property>
2. Implemented ActivityInstanceLoggersRegistrator:public class ActivityInstanceLoggersRegistrator extends AbstractBpmnParseHandler<Activity> {
private static final ActivityInstanceLogger ACTIVITI_INSTANCE_LOGGER = new ActivityInstanceLogger();
protected void executeParse(BpmnParse bpmnParse, Activity element) {
bpmnParse.getCurrentScope().addExecutionListener( org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_START, ACTIVITI_INSTANCE_LOGGER );
// ActivityImpl activity = bpmnParse.getCurrentScope().findActivity(element.getId());
ActivityImpl activity = bpmnParse.getCurrentActivity();
activity.addExecutionListener(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_START, ACTIVITI_INSTANCE_LOGGER, 0);
activity.addExecutionListener(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_END, ACTIVITI_INSTANCE_LOGGER);
LoggerFactory.getLogger(ActivityInstanceLogger.class).info( "Registered execution listeners for activity '" + activity.getId()
+ "': (size=" + activity.getExecutionListeners().size() + ") "
+ activity.getExecutionListeners() );
}
}
3. Implemented ActivityInstanceLogger: private static final Logger LOG = LoggerFactory.getLogger(ActivityInstanceLogger.class);
@Override
public void notify(DelegateExecution execution) throws Exception {
LOG.info( execution.getEventName() + " " + formatInfo( execution ) );
}
…
Now the notify(…) method of the ActivityInstanceLogger class seems to be never called (debug doesn't stops there).03-18-2013 12:00 PM
03-18-2013 01:08 PM
INFO | 2013-03-18 18:25:52.931 (1363623952931) | ExecuteThread: '12' for queue: 'default' | org.activiti.engine.impl.bpmn.deployer.BpmnDeployer | deploy
Processing resource MyProcess.MyProcess.png
INFO | 2013-03-18 18:25:52.931 (1363623952931) | ExecuteThread: '12' for queue: 'default' | org.activiti.engine.impl.bpmn.deployer.BpmnDeployer | deploy
Processing resource MyProcess.bpmn
03-22-2013 01:14 PM
04-02-2013 08:47 AM
public String toString() {
String result;
result = "Timer [type=" + type
+ ", expression='" + description.getExpressionText() + "'"
+ ", jobHandlerType=" + jobHandlerType
+ ", jobHandlerConfiguration=" + jobHandlerConfiguration
+ ", repeat=" + repeat
+ ", retries left = " + retries
+ ", exclusive=" + exclusive
+ ", isInterrupting=" + isInterruptingTimer
+ "]";
return result;
}
10-18-2015 08:14 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.