AnsweredAssumed Answered


Question asked by baivs on Mar 10, 2015
Latest reply on Mar 17, 2015 by jbarrez
I'm using activiti 5.14 and I want to ask some questions about HistoryManager implementation..

1- HistoryManager implementation is different from manual (activity vs audit).
1.a) Although it says controlling ACTIVITY level, implementation controls ACTIVITY, as:
   * Record a variable has been updated, if audit history is enabled.  //////////////// says AUDIT
  public void recordVariableUpdate(VariableInstanceEntity variable) {
    if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) { … }              //////////////// controls ACTIVITY

   * Record a variable has been created, if audit history is enabled.    //////////////// says AUDIT
  public void recordVariableCreate(VariableInstanceEntity variable) { //////////////// controls ACTIVITY
    // Historic variables
    if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) { … }

1.b) Variables are kept sync in AUDIT according to the manual, but in implementation, over ACTIVITY level (includes ACTIVITY) variables are kept sync. I think in ACTIVITIY level, variables should be kept only for initial and the last time, not always..

3- In ExecutionEntity.newExecution(), there is an insert statement but insert() method is not used. This reduces code readability, and hard to find insert statements.

4- I couldn't see any DAO structure. All cruds (especially inserts) are defined over context as:
This makes hard to understand and hard to maintain. Why ?