cancel
Showing results for 
Search instead for 
Did you mean: 

Completed process: how to visualize and show variables

imbaczek
Champ in-the-making
Champ in-the-making
I've got a process that doesn't have any human tasks. I'd like to see its variables and execution path just as if I was looking at a running process (for debugging and monitoring). Is this possible? Sounds like an obvious use case, I just hope its hidden too well for me to find it. Having the option of extracting this information using REST would be also very nice.
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi imbaczek,

[img]https://raw.github.com/gro-mar/activiti-crystalball/master/simulator/src/test/resources/org/act...

The value in {} bracket is variable value when process execution left the node. It means that process started with x=0, after the first step x= x+1 => x had value 1. User changed x value to 3.

Image displayed is audit trail (only path for this process instance is displayed) . Complete process definition is
[img]https://raw.github.com/gro-mar/activiti-crystalball/master/simulator/src/test/process/org/activ...

to see how it was done see https://github.com/gro-mar/activiti-crystalball/wiki/Optimize-the-process-2

Regards
Martin

martin_grofcik
Confirmed Champ
Confirmed Champ
Another good point to start could be https://github.com/gro-mar/activiti-crystalball/blob/master/simulator/src/test/java/org/activiti/cry...


            // audit trail images generator
                AuditTrailProcessDiagramGenerator generator = new AuditTrailProcessDiagramGenerator();
                generator.setHistoryService(historyService);
                generator.setRepositoryService((RepositoryServiceImpl) repositoryService);
                generator.setWriteUpdates(true);

                Map<String, Object> params = new HashMap<String,Object>();
                params.put( AuditTrailProcessDiagramGenerator.PROCESS_INSTANCE_ID, processInstance1.getId());
               
                ImageIO.write( ImageIO.read(generator.generateLayer("png", params))
                                , "png"
                                , new File( TEMP_DIR+"/playback-auditTrail1.png"));
[code]