Hi, I try to get statistic information out of the designer form certain projects like total porcessduration and I wonder if there are not some examples how to do so. I have connected a MySQL Database to store such information for further usage. Maybe someone can help me?

asked 14.06.2016 at 15:17

Gabriele's gravatar image

accept rate: 66%

Not sure if I understand you question correct. With the following script you get the avarage business runtime of all process instances that were executed:

import ch.ivyteam.ivy.workflow.query.CaseQuery;
Object result = CaseQuery.create().aggregate().avgBusinessRuntime().executor().firstValue();

Have a look at the CaseQuery and aggregate function there are a lot of additional functions available. There is also a TaskQuery to aggregate runtime data of tasks.


answered 14.06.2016 at 17:37

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
accept rate: 74%

Hi Reto, Thank's for your help, unfortunately the statement you have posted doesn't work. But I was successful with try and error and found a query that provides the average time for one instance of my process: ivy.log.info("runtime" + ivy.wf.getCaseQueryExecutor().getRecordset(CaseQuery.create().aggregate().avgBusinessRuntime())); or the time of all instances in a sum ivy.log.info("runtimeSum" + ivy.wf.getCaseQueryExecutor().getRecordset(CaseQuery.create().aggregate().sumBusinessRuntime()));

Regards Gabriele


answered 16.06.2016 at 14:06

Gabriele's gravatar image

accept rate: 66%

The executor() method was introduced in version 6.1. That's why my query does not work. Your solution does the same and works also with older versions.

(16.06.2016 at 16:20) Reto Weiss ♦♦ Reto%20Weiss's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 14.06.2016 at 15:17

Seen: 625 times

Last updated: 16.06.2016 at 16:20