[rules-users] Persistence and mina human task handling

Mark Proctor mproctor at codehaus.org
Wed Jul 8 08:39:39 EDT 2009


Mark Proctor wrote:
> Can you open a JIRA for this, and we'll make sure it's done in the 
> next few weeks:
> https://jira.jboss.org/jira/browse/JBRULES

ooops, sorry this reply was meant for the other task related email.

Mark
>
> thanks
>
> Mark
> Balázs Molnár wrote:
>> Hello,
>>
>> I tried to setup a sample standalone "hello" application that 
>> attempts to run a process involving human tasks. 
>> Main components were:
>> - mina  task  server (as documentation hinted, based on a sample),
>> - standalone "hello sort of" application running a ruleflow with some 
>> workitems including a human task too,
>> - eclipse human task view.
>>
>> I setup the persistence - following the documentation, asked for a 
>> jta datasource and used bitronix transaction manager.
>>
>> The application:
>> - begins a new user transaction
>> - creates a new process instance in a stateful session
>> - calls fireallrules
>> - waits on the console with System.in.read() (this was already a 
>> workaround to avoid completing the user transaction before the human 
>> task is handled in the HT view, this otherwise caused a nullpointer 
>> assigment at line 83 in JPAWorkItemManager which tried to refer to 
>> variable "em" which when set returned null for the following 
>> assignment if  usertransaction were committed: 
>> EntityManager em = (EntityManager) 
>> this.workingMemory.getEnvironment().get( 
>> EnvironmentName.ENTITY_MANAGER );)
>>
>> ... following the above the message reaches the human task server, 
>> and then the task appears in the human task view - so far so good.
>>
>> Then when the task is started and completed in the view, the 
>> "GetCompletedTaskResponseHandler.execute()" begins handling the 
>> completed message. Unfortunately this call fails with :
>> " no transaction started on this thread"
>>
>> I have then checked the threads in the debug view and looked like the 
>> message response is actually running in the "NioProcessor" thread. At 
>> this point I got stuck.  If there is some guideance on  how to 
>> correctly setup transaction management and Mina task client/human 
>> task work item handler it would be very much appreciated.
>>
>> thank you.
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>   
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090708/5c43d06c/attachment.html 


More information about the rules-users mailing list