07-25-2011 07:00 PM
07-26-2011 02:24 PM
07-26-2011 06:59 PM
07-28-2011 05:48 PM
07-28-2011 06:53 PM
so is it impossible for service tasks to have interaction with BPMN timers?I think not
using a send/receive task combination requires the timeouts to be specified in code and not within the BPMN model correct?No, why do you think this?
(specifying them as activiti process variables is also not acceptable, i would like the model to completely control these timeouts via a drag and drop style creation)Look at thecustom elements in the designer… great solution to have both…
the BPMN2.0 spec allows loops as well as infinite loops….Agreed, but loops in tasks is something different than looping with transitions back to the same task. The spec is not explicit on the execution semantics of these regarding 'transactions' etc… But it could be that the choice made by Activiti is not the best for what you want technically, but it fits lots of other usecases better and that is a 'compromise' made by the Activiti team based on years of experience. But it does not mean that what you want cannot be achieved, it just is a little (emphasis on little) more complex for you. And the Async continuations being one of the 'additions' that would make your usecase easier to implement.
07-28-2011 07:16 PM
07-28-2011 08:03 PM
why should canceling a service task be any different than canceling any other task via border timer events?Because they are not the same things…. A send task and script task would have the same 'difficulties' Compare it with removing a record from a db to a thread that participates in an XA transaction, writing to a file (rollback??) etc.. The amount of work behind the scenes is way more difficult for the latter.
(why does it matter that a java thread is executing instead of a waitstate that is waiting to be invoked?Technically? A lot… a wait state waiting to be invoked is nothing more than a record in the db (hence my example above) while the javathread is the thread of the engine, participating in transactions etc…Keep in mind that BPMN has no notion of java service tasks!
the java execution should be a thread and so should the timer right?Yes, but in different transactions etc and more complicating things.
any inconsistency that arises in the java code from being terminated by a timer is the fault of the designer using the boundry timer on a service task.)As it is always…
is there any way to use service tasks in conjunction with border timer events?Have you explicitly tried without the cancelActivitiy? I only above that you used different configurations, but that could as well be different types of databases, or using Linux instead of windows…
if yes, how?Without cancelActivity it should be supported. If that does not work, it can be concidered a bug and then a jira issue can be made that needs to be fixed. With cancelActivity it is way more complicated as stated above, so no idea what the outcome of that will be.
07-28-2011 08:18 PM
07-28-2011 08:57 PM
so if the cancelActiviti = false on the border timer event what will occur -> it will just branch while the first one continues executing?Yes.
what would happen when the branch taken out of the border event hits the end node? should it still fail to close the first service task if it has not completed?I think it will stil 'fail' to cancel an active thread. There will not be a real difference I think (never tried/needed it)
i had meant that, yes it is complicated to halt an executing service task thread, but if someone decides to put the border event on a service task they should be writing javacode that is relatively "safe" in regards to when that timer event occurs.Agreed, and a 'generic' way of achieving this should be looked into. The methods that need to be implemented in a java class might become more complicated, but maybe a baseclass can be provided. But maybe it is enough to let the actual service run to it's end and just make sure the outgoing transition from the service task is not taken. This will be fairly simple if it can be combined with Async continuations.
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.