cancel
Showing results for 
Search instead for 
Did you mean: 

Separate history for different processes

bowig
Champ in-the-making
Champ in-the-making
Hi.

I'm a newbie learning Activiti, and I have problem setting separate history for different processes. I have history set to "none" by default, but I want some of my processes to be set to different level. I've tried some methods already that I found in different topics, but they weren't explained good enough for me, and I always ended up failing.

So far I read about "activiti:history" parameter in bpmn extensions, but I can't get it working. I was using it like this:
<process id="helloWorld2" activiti:history="full" >

but it doesn't have any effect.
I was also trying to extend historyManager, but I have no idea how/where from can I retrieve this parameter (process definition? deployment?).

My question is: how can I make separate processes be registered ? What am I missing ?

Thanks in advance!
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

AFAIK history level is configured for the process engine.
http://www.activiti.org/userguide/#historyConfiguration

to store history for specific process instances you could change org.activiti.engine.impl.history.HistoryManager implementation.
or you can implement your own log based on activiti events.

Regards
Martin

bowig
Champ in-the-making
Champ in-the-making
Hi,

Thanks for the answer! I finally managed to do an extended HistoryManager, and it works well.

However, right now the method I use to determine process history level is by calling repositoryService.getProcessModel, buffering it, and checking for  "activiti:history" text. I don't think it's an effective way to do it like that, so I have a question: is there a better way to retrieve extra properties from process ? Or should I try a different approach to determine, which processes should be saved ?

Thanks in advance!

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Try to use

<process id="…">
      <extensionElements>

      </extensionElements>

</process>

Regards
Martin