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

Mauricio Salatino salaboy at gmail.com
Tue May 4 11:37:01 EDT 2010


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.

On Tue, May 4, 2010 at 11:16 AM, tolitius <webakaunt at gmail.com> wrote:

>
> @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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100504/b95b4f3b/attachment.html 


More information about the rules-users mailing list