[rules-users] Ruleflow / Domain-specific processes / thread model

jschmied nabble at juergenschmied.de
Wed Aug 25 09:39:03 EDT 2010


Thanks,

I don it like this now:

	public void executeWorkItem(WorkItem wi, WorkItemManager wim) {
		MyThread th = new MyThread();
		th.start();
	}

	private final class MyThread extends Thread {
		public WorkItem wi;
		public WorkItemManager wim;

		@Override
		public void run() {

			try {
				// do something
				wim.completeWorkItem(wi.getId(), null);
			} catch (Exception e) {
				wim.abortWorkItem(wi.getId());
			}
		}
	}

Should be OK !?

juergen
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Rileflow-Domain-specific-processes-thread-model-tp1329422p1330496.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list