cancel
Showing results for 
Search instead for 
Did you mean: 

HistoryManager

baivs
Champ in-the-making
Champ in-the-making
Hi,
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:
Context.getCommandContext()……insert(obj);
This makes hard to understand and hard to maintain. Why ?

Thanks..
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
1)b) I see that the docs are wrong there. But we can't change that now, that would break too many installations.

3) Why do you believe it is not used? The way I read it, it is used.

4) Why would DAO be the best way forward? Cause it used to be a best practice in the get-as-many-layers-as-possible-java? Activiti has to cater for many different environments and the current architecture is an evolution reflecting that. I'm not saying you're wrong, I'm just saying that Activiti is 5 years old and has been used in many (many!) different environments and has grown like that because of it.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.