Re: [rules-users] Drools Flow: Find a Session ID to reload the JPA Stateful session

2010-04-02 Thread Mauricio Salatino
Exaclty.. Unit of work can be anything that you want. And that kind of
things are outside of the scope of the framework.
You can implement it in the way that you want. Looks like you already
resolve the problem. Create a table containing all that information and then
query it in the way that you like it. We do it in that way, but it always
depend of the applications that you are trying to develop. For example how
you decide if the Unit Of Work ID is a Long, String, an Embedded object, a
JCR NODE ID, etc. That's why it's out side the scope of drools flow.

On Fri, Apr 2, 2010 at 11:28 AM, tolitius  wrote:

>
> not sure why it is a generic way to present a problem.
>
> I am just looking for an approach to find a "Session_ID" of the session
> that
> was suspended. Best approaches, approaches that other people use, suggested
> approach, etc..
>
> For example why would not the framework (Drools Flow) have something like:
>
> UNIT_OF_WORK_ID | SESSION_ID | PROCESS_INSTANCE_ID
>
> that can be used to know exactly what the SESSION_ID ( ..
> PROCESS_INSTANCE_ID, etc ) by the business key.
>
> So I would be interested in hearing any approaches that are used out there
> in the real world.
>
> Thank you,
> /Anatoly
> --
> View this message in context:
> http://n3.nabble.com/Drools-Flow-Find-a-Session-ID-to-reload-the-JPA-Stateful-session-tp686250p693090.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
>



-- 
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow: Find a Session ID to reload the JPA Stateful session

2010-04-02 Thread tolitius

not sure why it is a generic way to present a problem. 

I am just looking for an approach to find a "Session_ID" of the session that
was suspended. Best approaches, approaches that other people use, suggested
approach, etc..

For example why would not the framework (Drools Flow) have something like:

 UNIT_OF_WORK_ID | SESSION_ID | PROCESS_INSTANCE_ID

that can be used to know exactly what the SESSION_ID ( ..
PROCESS_INSTANCE_ID, etc ) by the business key.

So I would be interested in hearing any approaches that are used out there
in the real world.

Thank you,
/Anatoly
-- 
View this message in context: 
http://n3.nabble.com/Drools-Flow-Find-a-Session-ID-to-reload-the-JPA-Stateful-session-tp686250p693090.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


Re: [rules-users] Drools Flow: Find a Session ID to reload the JPA Stateful session

2010-04-02 Thread Mauricio Salatino
As I mention before, if you provide a project with real test cases about you
scenarios we can help you in a better way.. Understanding what are you
trying to achieve in a less generic way always helps.

On Fri, Apr 2, 2010 at 10:50 AM, tolitius  wrote:

>
> still unsure what the best approach would be to find an ID of the Session
> that was suspended to reload. Appreciate ideas & real life examples.
>
> Thank you,
> /Anatoly
> --
> View this message in context:
> http://n3.nabble.com/Drools-Flow-Find-a-Session-ID-to-reload-the-JPA-Stateful-session-tp686250p693021.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
>



-- 
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow: Find a Session ID to reload the JPA Stateful session

2010-04-02 Thread tolitius

still unsure what the best approach would be to find an ID of the Session
that was suspended to reload. Appreciate ideas & real life examples.

Thank you,
/Anatoly
-- 
View this message in context: 
http://n3.nabble.com/Drools-Flow-Find-a-Session-ID-to-reload-the-JPA-Stateful-session-tp686250p693021.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


Re: [rules-users] Drools Flow: Find a Session ID to reload the JPA Stateful session

2010-03-30 Thread tolitius

which component(s) should I look at? 

I looked at "drools.process.workitem.wsht.*", but it is all Mina based, and
there is no answer to my question.

I wonder whether I should also persist it as a variable, and craft some
weird query to connect my business ID to the sessionID before I can reload
the session..
-- 
View this message in context: 
http://n3.nabble.com/Drools-Flow-Find-a-Session-ID-to-reload-the-JPA-Stateful-session-tp686250p687199.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


Re: [rules-users] Drools Flow: Find a Session ID to reload the JPA Stateful session

2010-03-30 Thread Mauricio Salatino
Did you see how is that solved in the WHST module?
You can copy that if you want.

2010/3/30 tolitius 

> Wait state is reached (request is sent to an external system), the flow is
> persisted, the thread that persisted the flow is gone.
>
> Now, the response came back from the external system, and now would be a
> good time to resume the flow (reload the session):
>
>
> StatefulKnowledgeSession ksession =
> JPAKnowledgeService.loadStatefulKnowledgeSession( *sessionId*, kbase,
> null, env );
>
>
> What would be the best approach to find this *SessionID* that was
> suspended? Is there any out of the box [ flow / business ] mapping that can
> be used?
>
> Thank you,
> /Anatoly
>
> --
> View this message in context: Drools Flow: Find a Session ID to reload the
> JPA Stateful 
> session
> Sent from the Drools - User mailing list 
> archiveat Nabble.com.
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Flow: Find a Session ID to reload the JPA Stateful session

2010-03-30 Thread tolitius

Wait state is reached (request is sent to an external system), the flow is
persisted, the thread that persisted the flow is gone.

Now, the response came back from the external system, and now would be a
good time to resume the flow (reload the session):


StatefulKnowledgeSession ksession =
JPAKnowledgeService.loadStatefulKnowledgeSession( sessionId, kbase, null,
env );
What would be the best approach to find this SessionID that was suspended?
Is there any out of the box [ flow / business ] mapping that can be used?


Thank you,

/Anatoly


-- 
View this message in context: 
http://n3.nabble.com/Drools-Flow-Find-a-Session-ID-to-reload-the-JPA-Stateful-session-tp686250p686250.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