[rules-users] Drools Flow: how to get knowledge session ID from WorkItem

tolitius webakaunt at gmail.com
Tue May 4 11:16:54 EDT 2010


@Alan,

    Implementation of WorkItemHandler is a custom ( "your" ) component. This
means that this implementation may have anything injected ( set as property
or at construction time ).

    Let's say you implement "YourCustomWorkItemHandler" to take a "session
id" at the construction time ( good choice :) ), then to start the process
you would:

                session = create a newStatefulKnowledgeSession()
		
		session.getWorkItemManager().registerWorkItemHandler(
				"WorkItemName", new YourCustomWorkItemHandler( session.getId() ) );	
		
		session.startProcess( "process-name" );

/Anatoly
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-how-to-get-knowledge-session-ID-from-WorkItem-tp775649p776358.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list