Using database for storing process description in Activiti

cancel
Showing results for 
Search instead for 
Did you mean: 
kannab
Member II

Using database for storing process description in Activiti

Jump to solution

Hello. I didn't find how I can store Activiti's Business Process description in database. Can I do it by Activiti's assets? Or do I need to write custom solution? Thanks. P. S. Sorry my English.

1 Solution

Accepted Solutions
gdharley
Intermediate

Re: Using database for storing process description in Activiti

Jump to solution

Hi,

Yeah, perhaps a little explanation is in order.
When you deploy a BPMN process to the Activiti runtime engine, the BPMN XML will actually be saved into the Activiti system database.

There are even Java and REST calls to retrieve the process model from the database.

So, as long as you know the deployment ID, you can retrieve the process model BPMN XML from the database.

Does this make sense?

Greg

View solution in original post

7 Replies
gdharley
Intermediate

Re: Using database for storing process description in Activiti

Jump to solution

The Activiti ProcessDefinition entity includes a description attribute.

BpmnProcessDefinition processDefinition = new BpmnProcessDefinition();
processDefinition.setDescription(description);

Is this what you are after?

Thanks,

Greg

kannab
Member II

Re: Using database for storing process description in Activiti

Jump to solution

Thanks for your answer.

I am sorry. I didn't explain very well. I want to store *.bpmn20.xml in a database. I found an idea but it isn't beatiful. I made the class-strategy 

public class DatabaseDeploymentStrategy extends AbstractAutoDeploymentStrategy

And I wanted to use the class SpringProcessEngineConfiguration, but it has

private Collection<AutoDeploymentStrategy> deploymentStrategies = new ArrayList<AutoDeploymentStrategy>();

so I can't add my strategy to the list. And I have to do a child class from SpringProcessEngineConfiguration with override autoDeployResources method.  Maybe my way is wrong. 

Please explain me how to do it right.

Thanks.

nikmenke
Active Member II

Re: Using database for storing process description in Activiti

Jump to solution

Hi,

why don't you use the stored *.bpmn20.xml in the activiti database after a deployment?

kannab
Member II

Re: Using database for storing process description in Activiti

Jump to solution

Because I want to load my the stored *.bpmn20.xml from the database, not from  the *.xml file. Maybe I don't understand anything. But I want to draw business process. Save it to the database. And load it from the database to work.

gdharley
Intermediate

Re: Using database for storing process description in Activiti

Jump to solution

Hi,

Yeah, perhaps a little explanation is in order.
When you deploy a BPMN process to the Activiti runtime engine, the BPMN XML will actually be saved into the Activiti system database.

There are even Java and REST calls to retrieve the process model from the database.

So, as long as you know the deployment ID, you can retrieve the process model BPMN XML from the database.

Does this make sense?

Greg

kannab
Member II

Re: Using database for storing process description in Activiti

Jump to solution

Hi.

Thanks for patient explanation. My task is deployment a BPMN process from the database. I read the chapter 6 of the documentation. I think I understand what I should do. 

Sergey.

kannab
Member II

Re: Using database for storing process description in Activiti

Jump to solution

I found all information about my questions in the chapter 6. Thanks again.