Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page outlines the history support that is anticipated to be part of Activiti 5.0.


This page currently describes a proposal for the history support only and does not reflect the current state of the implementation in Activiti.


The history module provides access to historic process execution data and acts as a data provider for basic process execution reports and statistics. In an initial version, the history module should just provide enough information to feed simple statistical reports and queries about process instance / activity instance executions and their executon times.


  • # of process instances created within a time range, grouped by process definitions
  • minimal, maximal, and average execution process instance execution time, grouped by process definitions
  • minimal, maximal, and average execution time for activity instances for a specific process definition

Reports are provided by a specific report service, that in turn uses the history mechanism for accessing basic historic data.

These reports should be made available as a chart within Activity Probe or Explorer (TBD).


Italic attributes are there for providing a denormalized data view optimized for querying from external tools, directly based on the history data tables (e.g. activities can be grouped by processDefinitionId without the need for performing a join on the historic process instance table). As a consequence, the two relations are not linked in any way (i.e. no foreign key from historic activity instances to historic process instances). The same attributes and structure are reflected in the entities.

The history data model is built and maintained by specific event consumers that listen to process instances started/ended and activity instance started/ended event propagated by the process event bus.


A historic data service will provide access to historic data in a read-only way. The history data service is configured globally per process engine and is accessible via the process engine configuration.

Query API

TBD: describe The query API allows for querying describing and executing queries against historic process instances and historic activity instances with support for filtering, sorting, grouping, specifying date ranges, .... The query API is designed in a "fluent" way, similar to the query APIs for tasks or jobs. Access to the query object is provided through the history data service. The query API is not intended to superseed direct access to the historic data tables, but provides access to historic data in a convenient way for programmatic queries.

The query API supports the following features:

  • restrictions: by processInstanceId, processDefinitionId, activityId, activityType (combinations of restrictions possible, depending on historic data type), date ranges (start / end)
  • sorting: by startDate, processInstanceId (single sorting only)
  • grouping: by processDefinitionId