|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| force finish() in transaction | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | MaheshPN | 
			  
				|  Posted: Fri Aug 13, 2004 9:09 am    Post subject: force finish() in transaction |   |  |  
		  |  Master
 
 
 Joined: 21 May 2003Posts: 245
 Location: Charlotte, NC
 
 | 
			  
				| Hi, I have a situation where, when the message comes to the external application, it will update the application database, sends the XML response back to UPES sync activity and force finish the another activity(user API).
 
 All these things has to happen in transaction(Unit of work). we have seen that, when there is a failure in updating the Database, the transaction gets rolled back, but API to forcefinish the activity will succeed. We would like to some how detect the failure and rollback the API
   
 Did anybody got this problem?
 
 Thanks,
 -Mahesh
 |  |  
		  | Back to top |  |  
		  |  |  
		  | jmac | 
			  
				|  Posted: Fri Aug 13, 2004 9:18 am    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 27 Jun 2001Posts: 3081
 Location: EmeriCon, LLC
 
 | 
			  
				| It's possible I don't understand... To me it seems that if the last thing you do in your program activity is the force finish you would not have this problem. _________________
 John McDonald
 RETIRED
 |  |  
		  | Back to top |  |  
		  |  |  
		  | MaheshPN | 
			  
				|  Posted: Mon Aug 16, 2004 4:20 am    Post subject: |   |  |  
		  |  Master
 
 
 Joined: 21 May 2003Posts: 245
 Location: Charlotte, NC
 
 | 
			  
				| Hi John, Let me try explain with the way it is been constructed
 
 
 Begin trans
 -Update the database
 -Construct the XML response message(for an syn upes) and send to Workflow
 -Query Workitem and item.Forcefinish()
 commit
 
 Any errors
 -Rollback
 
 End trans.
 
 here, If the update fails, the query workitem and item.forcefinish will still run to success and rollback will rollback the database and XML trasaction but not the Forcefinish.
 
 Hope this will help.
 
 Thanks,
 -Mahesh
 |  |  
		  | Back to top |  |  
		  |  |  
		  | jmac | 
			  
				|  Posted: Mon Aug 16, 2004 5:04 am    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 27 Jun 2001Posts: 3081
 Location: EmeriCon, LLC
 
 | 
			  
				| 
   
	| MaheshPN wrote: |  
	| Begin trans -Update the database
 -Construct the XML response message(for an syn upes) and send to Workflow
 -Query Workitem and item.Forcefinish()
 commit
 
 Any errors
 -Rollback
 
 End trans.
 
 |  What I am suggesting is move the forcefinish outside the transaction.  Assuming you have the proper workitem and it is in the proper state it should not fail (of course I understand this is not 100%) if your commit is successful then forcefinish the item.
 _________________
 John McDonald
 RETIRED
 |  |  
		  | Back to top |  |  
		  |  |  
		  | MaheshPN | 
			  
				|  Posted: Mon Aug 16, 2004 12:09 pm    Post subject: |   |  |  
		  |  Master
 
 
 Joined: 21 May 2003Posts: 245
 Location: Charlotte, NC
 
 | 
			  
				| Thanks John, I suggested the same but, our guys are looking for an answer for
 "How do we make the Workflow API calls(like terminate, forcefinish) to participate in J2EE container maintained transaction"?
 
 Not sure whether it is possible or not.
 
 Thanks,
 -Mahesh
 |  |  
		  | Back to top |  |  
		  |  |  
		  | jmac | 
			  
				|  Posted: Mon Aug 16, 2004 12:15 pm    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 27 Jun 2001Posts: 3081
 Location: EmeriCon, LLC
 
 | 
			  
				| Mahesh: 
 If you have not already done so... post to the IBM MQWF Newsgroup, or open a PMR
 _________________
 John McDonald
 RETIRED
 |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
  
	|    |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  |  |  |