07-25-2011 02:41 PM
07-27-2011 11:45 AM
07-27-2011 12:32 PM
07-27-2011 01:05 PM
07-28-2011 11:42 AM
07-28-2011 12:16 PM
07-28-2011 02:42 PM
07-28-2011 03:14 PM
07-28-2011 05:26 PM
execution stack dumps are not acceptable when the workflow may not actually contain recursion or infinite loops.That is tuning… If I give my JBoss just 128M, it crashes all the time with oom without loops. We need to do things like tuning all the time…
i want to make a loop with a condition that it may take long or short time, and it gives me the "StackOverflow" exception.Long running is not the problem, the number of loop BEFORE a waitstate is encountered is..
short version:Yes and no. Yes if there is a wait-state, no if there are to many repetitions and tuning is not done correctly (tuning can't solve all)
no.
long version:
this is because memory is being added to the stack at every step inside of your workflow (by the engine), never being cleaned up, it will eventually cause a stack overflow.
they would prefer that you use an external system that will periodically execute the workflow. this would avoid the memory issue.That is your interpretation based on your first remark in the first post in this forum
I have been trying to implement a daemon process that will wakeup and do some work every X time in activiti.What I said use an external system to execute the service and have a waitstate in the process. This could e.g. be done by a minimal service task that puts a message in a jms queue somewhere, followed by a receive task (wait state! so persistence takes place, so memory is freed) with a timeout on it that makes it continue/loop… After the job finishes normally, the receive task is triggerd. This is way simpler than your example and can even be achieved plain jms or with combining e.g. Mule and Activiti or [url=http://fox.camunda.com/peal-psi/Camunda PSI
agreed…. but we essentially have no other choice, as far as the developers have told me / the forumsTotally disagree here… No one told you that 'your solution' was the only choice as you can read above… Lots of other choices, so please do not draw wrong conclusions and pretend we said things…
07-28-2011 06:36 PM
ProcessInstance pi = runtimeService.startProcessInstanceByKey("receiveTask");
Execution execution = runtimeService.createExecutionQuery()
.processInstanceId(pi.getId())
.activityId("wait")
.singleResult();
assertNotNull(execution);
runtimeService.signal(execution.getId());
runtimeService.signal(execution.getId());
07-28-2011 07:39 PM
isn't forcing people who only want to use service tasks into using wait states an unnecessary requirement?No, it's called working within the posibilities of a framework/… I for intance want to be able to write a multi-milion application in java in one line of code… Can't be done…
i'm gonna ignore the rest and…Confronting isn't it?
i'm gonna ignore the rest and jump to the java receive tasks, which I had not read about until now.Receive tasks, not JAVA receive tasks… and I mentioned them before[
this is ok for simple tasks that essentially bounce back and fourth between each other…Sorry, I do not understand why this is only for simple tasks etc… Can you elaborarte? And yes, maybe your 'solution' is a complicating factor because of the way it is implemented… You always need some kind of 'correlation' and the combination of the process instance id and the name of the receive task to be called is an perfectly normal example in lots of businesscase
i am dynamically deploying these workflows in a multi-tenant system which is using JMS for unique and private communication between workflow java tasks and remote java class execution. (this reduces the memory / compute footprint required by the tasks within the activiti engine since they only pass JMS now)
hence my complicated example that i provided before.Again, sorry… I miss the reasoning behind the 'hence'…
this does not allow any dynamic parameter passing to the process that we are telling to resume correct?No clue what you mean by 'dynamic parameter passing'… You seem to talk in technical terms a lot, what is it that you want to achieve? Do you want values that come from the external service to be added to the specific process instance?
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.