cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti 5.12 - unable to run report, plus styling issue

geoffb
Champ in-the-making
Champ in-the-making
When I attempt to run the report, I see the result as per the screenshot.

This is on the version released today running on Firefox 7.

Caused by: org.activiti.engine.ActivitiException: problem evaluating script: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "JSON" is not defined. (<Unknown source>#26) in <Unknown source> at line number 26
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:77)
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:64)
   at org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior.execute(ScriptTaskActivityBehavior.java:63)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:86)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:530)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:525)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:86)
6 REPLIES 6

geoffb
Champ in-the-making
Champ in-the-making
Note:  I can't attach the screenshot -
Could not upload attachment to ./files/425_861b091925e73092c7dc1df913c08f71."
.  Here is a link:

[img]https://centrum.box.com/shared/static/b18kvc66ko0ze5nb6d9r.png[/img]

frederikherema1
Star Contributor
Star Contributor
We've found an issue when using JDK 6 to run the (experimental) reports. We have a fix in-place and will rebuild the downloadable distribution on the website today.

geoffb
Champ in-the-making
Champ in-the-making
Thanks!

anibal
Champ in-the-making
Champ in-the-making
Hello, I get the same error with Activiti 5.14 and jdk 1.6.0
but I install jdk 1.7 and all is ok

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

the problem is inside report process. EmployeeProductiviti report (in the current version) does not work with jdk1.6. Previous version works with jdk1.6.

Most of the reports have 2 code section. One for 1.6. and one for 7.

e.g.

               /* JDK 7 only
               var reportData = {};
              
               var dataset = {};
               dataset.description = "Helpdesk process: issues solved in first line vs escalation needed";
               dataset.type = "pieChart";
               reportData.datasets = [];
              
              
               if (escalatedCount > 0 || firstLineCount > 0) {
                   dataset.data = {"First line solved" : firstLineCount, "Escalation needed" : escalatedCount};
               }

               reportData.datasets.push(dataset);
              
               execution.setVariable("reportData", new java.lang.String(JSON.stringify(reportData)).getBytes("UTF-8"));
               */
              
               /* JDK 6+ */
              
               var reportData = new ReportData();
               var dataset = reportData.newDataset();
               dataset.description = "Helpdesk process: issues solved in first line vs escalation needed";
               dataset.type = "pieChart";
              
               if (escalatedCount > 0 || firstLineCount > 0) {
                 dataset.add("First line solved", firstLineCount);
                 dataset.add("Escalation needed", escalatedCount);
               }
              
               execution.setVariable("reportData", reportData.toBytes());


Try to download previous version of org/activiti/explorer/demo/process/reports/employeeProductivity.bpmn20.xml report , deploy and run.

Regards
Martin