cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti deployment

hbacanak
Champ in-the-making
Champ in-the-making
Situation:
I have multiple web applications(lets call them client applications) that need to manage a set of processes(intersecting).  From what I have gathered, best course of action (correct me if i am wrong) is to deploy activiti engine standalone (lets call it server application)and drive activiti engine through rest calls.

I need clarifications/suggestions for:
1 – Is all i need activiti-rest.war activiti-explorer-war or is it for demo purposes and i should create server application myself. My current understanding is that
1a) If i should use activiti-rest & activiti-explorer in production environment, typical scenario seems to be:
-   Create a project for process development(lets call it processes project)
-   Perform unit testing through a custom engine configuration.
-   Generate jars for java classes.
-   Add jars to production path
-   Deploy processes.
-   Access from client applications through rest api

In this scenario I don’t understand what is the best course of action handling process development. Lets say multiple team members working on process project and updated a number of processes and we are updating production server.

Q1) Should i track changed processes and deploy them? which is error prone
Q2) Should i deploy all the processes? which seems less than ideal because i am creating a new version of processes that didn’t change.

1b) If i should create a custom application and an activiti engine, no need for a seperate project,  process classes and resources will be in the custom server application. In this case:

Q3) again how to manage changed processes? There must be a way to track them, i guess i am looking for something like declaring process version, and the engine checks the version against the database and deploy if a newer version is detected such as
<process id="my-process" version=”1.1” >
BPMN2.0 standard does not include versioning according to activiti user guide. But I couldn’t figure out how activiti engine is meant to handle project versions automatically. Am I missing something?

Q4) How can i expose rest functionality through custom server app? ( there seems to be spring-boot-starter-web jar exposing rest functionality. Is it for only spring boot apps? What about non boot spring apps should i use the same jar or there is another one?)
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
> is to deploy activiti engine standalone (lets call it server application)and drive activiti engine through rest calls.

Another option is always to include the Java jar in all web applications. It simplies stuff sometimes.

1) Activiti Rest will give you the default Activiti REST API. You can create your own REST API application if you want to, by included the REST dependencies. I'm not sure i'm following your process development question. This would be similar to how you would solve a shared code project in your company.

Q1) Processes are just xml and could go into Git or svn. Once you deem one ready for production, you deploy that xml.

Q2) No. You can deploy one at the time.

Q3) Process definitions are versioned on deployment. Instances keep running against a particular process definition version. New instances will follow the new process definition.

Q4) check the activiti-rest and activiti-webapp-rest  maven modules. We are using Spring MVC. You can create your own version of that; with custom REST endpoints or just go with the default.

hbacanak
Champ in-the-making
Champ in-the-making
Hello Joram, thank you for your response.
I was not talking about how I can share process definitions with team members. Assume at iteration n, I have 10 processes. At iteration n+1, a team member updated 1 process definition(pd) and deleted 1 pd and added 1 pd. If this have been a database change, I would want the change propagate through dev, test, and prod environments without manual intervention (for example by orm or db migration tool). But from your response, I understand that I have to check change dates of process definition files against the date of previous iteration, and upload to server application manually. Am I correct?

jbarrez
Star Contributor
Star Contributor
Process definitions are 'deployed' in Activiti through the API, which writes it to the database. So you could do it automatically over all your environments, but that's not part of Activiti, it would need to be custom logic.

mauwarrior
Champ in-the-making
Champ in-the-making
Is there a possibility that I could actually update my previous activiti deployment? What I mean is, when you deploy a bpmn, it is given a deployment id as evident in act_re_deployment table but I want to know if that id given to the previous deployment could be used as an id of the new deployment since I am deploying the same bpmn file but the latter file have additional user tasks (for approval purposes)…

jbarrez
Star Contributor
Star Contributor
No. Activiti always deploys a new version. See my answer on your other post.