Current Activiti Engine does not support Multiple ServiceTask concurrency orchestration, can not use Activiti in some scenario
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2014 12:13 PM
I am implementing a scenario that is all the tasks are ServiceTask.
For example, we are going to upgrading a group of servers, there are three types of servers, nginx, web and database servers, we find activiti's workflow engine can help with it, such as when upgrade servers, we need to control first upgrade nginx servers, after all nginx server upgraded, then upgrade web servers,
This scenario match the activiti workflow engine, but after try and google, we found that have to integrate camel to achieve this.
We can not use camel, it is because the BPMN model is required to generated automatically, we can not write the camel required code dynamicly, so have to give up to use Activiti, seems the fork and join to control the concurrency and join is not that complicated, hope Activiti can support this Scenario that:
1. BMPN dynamic model
2. all tasks are ServiceTasks
3. requires orchestration Service Tasks' Fork and Join.
Hope Activiti Team can implement this, although I implemented a simple workflow engine for this already in hours, but still wish to integrate Activiti.
Thanks!
For example, we are going to upgrading a group of servers, there are three types of servers, nginx, web and database servers, we find activiti's workflow engine can help with it, such as when upgrade servers, we need to control first upgrade nginx servers, after all nginx server upgraded, then upgrade web servers,
This scenario match the activiti workflow engine, but after try and google, we found that have to integrate camel to achieve this.
We can not use camel, it is because the BPMN model is required to generated automatically, we can not write the camel required code dynamicly, so have to give up to use Activiti, seems the fork and join to control the concurrency and join is not that complicated, hope Activiti can support this Scenario that:
1. BMPN dynamic model
2. all tasks are ServiceTasks
3. requires orchestration Service Tasks' Fork and Join.
Hope Activiti Team can implement this, although I implemented a simple workflow engine for this already in hours, but still wish to integrate Activiti.
Thanks!
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2014 12:36 PM
BTW, I can find the Camel recommedation @ below link, but as our scenario is we will generate BPMN model dynamicly, but we can not generate the AsyncCamelRoute dynamicly, so this does not work for our scenario, hope Acitivti does support such general workflow orchestration
http://forums.activiti.org/content/potentiality-and-limits-activiti-engine
package org.activiti.camel.route;
/**
* @author Saeid Mirzaei
*/
import org.apache.camel.builder.RouteBuilder;
public class AsyncCamelRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
from("activiti:asyncCamelProcess:serviceTaskAsync1").setHeader("destination", constant("activiti:asyncCamelProcess:receive1")).to("seda:asyncQueue");
from("seda:asyncQueue").to("bean:sleepBean?method=sleep").to("seda:receiveQueue");
from("activiti:asyncCamelProcess:serviceTaskAsync2").setHeader("destination", constant("activiti:asyncCamelProcess:receive2")).to("seda:asyncQueue2");
from("seda:asyncQueue2").to("bean:sleepBean?method=sleep").to("seda:receiveQueue");
from("seda:receiveQueue").recipientList(header("destination"));
}
}
http://forums.activiti.org/content/potentiality-and-limits-activiti-engine
package org.activiti.camel.route;
/**
* @author Saeid Mirzaei
*/
import org.apache.camel.builder.RouteBuilder;
public class AsyncCamelRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
from("activiti:asyncCamelProcess:serviceTaskAsync1").setHeader("destination", constant("activiti:asyncCamelProcess:receive1")).to("seda:asyncQueue");
from("seda:asyncQueue").to("bean:sleepBean?method=sleep").to("seda:receiveQueue");
from("activiti:asyncCamelProcess:serviceTaskAsync2").setHeader("destination", constant("activiti:asyncCamelProcess:receive2")).to("seda:asyncQueue2");
from("seda:asyncQueue2").to("bean:sleepBean?method=sleep").to("seda:receiveQueue");
from("seda:receiveQueue").recipientList(header("destination"));
}
}
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2014 12:37 PM
Lots of people have similar requirements, hope Activiti Team can help us, Activiti is very good, we can not give it up just by some missing features, thanks very much!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2014 05:17 AM
Make all your tasks async.
The problem with the join has been currently fixed on master (will be part of 5.16 release).
It's a matter of setting activiti:async="true" on the joining parallel gateway and no need for camel anymore.
The problem with the join has been currently fixed on master (will be part of 5.16 release).
It's a matter of setting activiti:async="true" on the joining parallel gateway and no need for camel anymore.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2014 09:21 AM
As far I can see the requirement, you can fully use asynch service task. There is no need to use camel for this purpose.
Even if you need to use camel, you do not need to generate routes. A fixed static route seems to be suitable.
Even if you need to use camel, you do not need to generate routes. A fixed static route seems to be suitable.
