cancel
Showing results for 
Search instead for 
Did you mean: 

Using database for storing process description in Activiti

kannab
Champ in-the-making
Champ in-the-making

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 ACCEPTED ANSWER

gdharley
Elite Collaborator
Elite Collaborator

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 answer in original post

7 REPLIES 7

gdharley
Elite Collaborator
Elite Collaborator

The Activiti ProcessDefinition entity includes a description attribute.

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

Is this what you are after?

Thanks,

Greg

kannab
Champ in-the-making
Champ in-the-making

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.

Hi,

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

kannab
Champ in-the-making
Champ in-the-making

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
Elite Collaborator
Elite Collaborator

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
Champ in-the-making
Champ in-the-making

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
Champ in-the-making
Champ in-the-making

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