Anatoly, if you can share your generic implementation that would be nice.. because a lot of people is looking for something like that.
I prefer custom and domain specific implementation, but it seams that a lot of people is looking for something generic that can be reused.
I can blog about that generic idea too to spread the word and also mention the different situations and the perspective of having decoupled and coupled applications to the work items.
@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.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users