Re: [rules-users] RuleFlowProcessFactory - no XML output?

2010-08-31 Thread Vijay K Pandey
Pass your RuleFlowProcess (process) object to following Drools XML dumper 
classes to get what you need.

String processBPMNXML = XmlRuleFlowProcessDumper.INSTANCE.dump(process);

String processRFXML  = XmlBPMNProcessDumper.INSTANCE.dump(process);

Will return the XML in BPMN or RuleFlow respectively.

Vijay
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Jeff Parks
Sent: Tuesday, August 31, 2010 6:39 PM
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] RuleFlowProcessFactory - no XML output?

I should have mentioned that I am using Drools 5.1.1

From: Jeff Parks [mailto:jeff.pa...@comcast.net]
Sent: Tuesday, August 31, 2010 4:33 PM
To: 'rules-users@lists.jboss.org'
Subject: RuleFlowProcessFactory - no XML output?

I like the idea of creating a Drools Process via the Process API. It fits my 
usage model very well . What surprises me is that I have not seen a way to take 
the RuleFlowProcess and create a Process in XML format, which I would think to 
be a natural extension. I have to think I am missing something - can someone 
share me some code snippet that accomplishes my goal?


thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] FW: Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object

2010-07-30 Thread Vijay K Pandey
Kris - I verified it with the latest snapshot and it looks good. Fix is working 
fine.

Thanks
Vijay

From: Vijay K Pandey
Sent: Tuesday, July 27, 2010 11:26 PM
To: 'Rules Users List'
Subject: RE: [rules-users] FW: Drools 5.1.0.M2 - WorkItemNodeInstance 
--Listeners can't get hold of WorkItem object

Thanks Kris. Will take a look at it. Earlier I was thinking to get the CR1 
release but will take the latest trunk.

Vijay

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Tuesday, July 27, 2010 8:27 AM
To: Rules Users List
Subject: Re: [rules-users] FW: Drools 5.1.0.M2 - WorkItemNodeInstance 
--Listeners can't get hold of WorkItem object

Vijay,

I've taken a look and you are correct, the work item object should not be reset 
on completion as that way, listeners or on-exit actions might not have access 
to it anymore.  I've used another approach to solve the issue that resulted in 
me adding this reset to -1.  Let me know if this works for you using the latest 
trunk (r34218, JBRULES-2598).

Kris

- Original Message -
From: Vijay K Pandey<mailto:vpan...@mdes.ms.gov>
To: Rules Users List<mailto:rules-users@lists.jboss.org>
Sent: Wednesday, July 21, 2010 5:28 PM
Subject: [rules-users] FW: Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

Hi @Salaboy,

Did you get a chance to look into this?

Thanks
Vijay

From: Vijay K Pandey
Sent: Thursday, July 15, 2010 1:26 PM
To: 'rules-users@lists.jboss.org'
Subject: FW: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

Hi @Salaboy,

I am not sure if you received the email below.  Thanks for looking into this.

Vijay
From: Vijay K Pandey
Sent: Tuesday, July 13, 2010 8:53 AM
To: 'Mauricio Salatino'
Subject: RE: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

Thanks for a quick response. I added the Transaction Manager piece of code but 
the problem still persists. Also it uses the attached persistence.xml file 
which is placed under META-INF directory that has the correct transaction 
manager look up class.

Thanks
Vijay


From: Mauricio Salatino [mailto:sala...@gmail.com]
Sent: Tuesday, July 13, 2010 6:40 AM
To: Vijay K Pandey
Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

I've just take a quick look to your file and I notice (without running it) that 
you didn't set the TransactionManager property to your Environment:

env.set( EnvironmentName.TRANSACTION_MANAGER,














































































































 TransactionManagerServices.getTransactionManager() );
You also need to have the reference to bitronix inside your persistence.xml 
file:



Can you try this and let me know if it fix your problem?
Greetings
On Tue, Jul 13, 2010 at 12:43 AM, Vijay K Pandey 
mailto:vpan...@mdes.ms.gov>> wrote:
Thanks Salaboy for looking into this.

Here is the Junit Test case(java file attached) I created for this problem.

Line # 129 fails.

Please do let me know if I am doing something wrong or the fix has some issues 
or maybe there is some other way out to get hold of the "WorkItem" object in 
the process event listener.

Thanks
Vijay
From: 
rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> 
[mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>]
 On Behalf Of Salaboy
Sent: Friday, July 09, 2010 11:11 AM
To: Rules Users List
Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners 
can't get hold of WorkItem object

I would like to take a look on this issue. Can you provide me a test case that 
show the problem?
- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Mauricio "Salaboy" Salatino -

On Jul 9, 2010, at 12:43, Vijay K Pandey 
mailto:vpan...@mdes.ms.gov>> wrote:
I guess this problem was due to a fix done in WorkItemNodeInstance? Is this the 
correct behavior? If yes how do we get hold of "WorkItem" instance in the 
attached listeners?

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/workflow/instance/node/WorkItemNodeInstance.java?r1=32801&r2=

Thanks
Vijay
From: Vijay K Pandey
Sent: Tuesday, June 15, 2010 9:20 AM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Any one on this issue? Any Drools Flow expert?

Appreciate your time for taking a look at it.

Thanks
Vijay
From: Vijay K Pandey
Sent: Thursday, June 10, 2010 12:03 PM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - Wo

Re: [rules-users] FW: Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object

2010-07-28 Thread Vijay K Pandey
Thanks Kris. Will take a look at it. Earlier I was thinking to get the CR1 
release but will take the latest trunk.

Vijay

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Tuesday, July 27, 2010 8:27 AM
To: Rules Users List
Subject: Re: [rules-users] FW: Drools 5.1.0.M2 - WorkItemNodeInstance 
--Listeners can't get hold of WorkItem object

Vijay,

I've taken a look and you are correct, the work item object should not be reset 
on completion as that way, listeners or on-exit actions might not have access 
to it anymore.  I've used another approach to solve the issue that resulted in 
me adding this reset to -1.  Let me know if this works for you using the latest 
trunk (r34218, JBRULES-2598).

Kris

- Original Message -----
From: Vijay K Pandey<mailto:vpan...@mdes.ms.gov>
To: Rules Users List<mailto:rules-users@lists.jboss.org>
Sent: Wednesday, July 21, 2010 5:28 PM
Subject: [rules-users] FW: Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

Hi @Salaboy,

Did you get a chance to look into this?

Thanks
Vijay

From: Vijay K Pandey
Sent: Thursday, July 15, 2010 1:26 PM
To: 'rules-users@lists.jboss.org'
Subject: FW: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

Hi @Salaboy,

I am not sure if you received the email below.  Thanks for looking into this.

Vijay
From: Vijay K Pandey
Sent: Tuesday, July 13, 2010 8:53 AM
To: 'Mauricio Salatino'
Subject: RE: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

Thanks for a quick response. I added the Transaction Manager piece of code but 
the problem still persists. Also it uses the attached persistence.xml file 
which is placed under META-INF directory that has the correct transaction 
manager look up class.

Thanks
Vijay


From: Mauricio Salatino [mailto:sala...@gmail.com]
Sent: Tuesday, July 13, 2010 6:40 AM
To: Vijay K Pandey
Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

I've just take a quick look to your file and I notice (without running it) that 
you didn't set the TransactionManager property to your Environment:

env.set( EnvironmentName.TRANSACTION_MANAGER,






















































 TransactionManagerServices.getTransactionManager() );
You also need to have the reference to bitronix inside your persistence.xml 
file:



Can you try this and let me know if it fix your problem?
Greetings
On Tue, Jul 13, 2010 at 12:43 AM, Vijay K Pandey 
mailto:vpan...@mdes.ms.gov>> wrote:
Thanks Salaboy for looking into this.

Here is the Junit Test case(java file attached) I created for this problem.

Line # 129 fails.

Please do let me know if I am doing something wrong or the fix has some issues 
or maybe there is some other way out to get hold of the "WorkItem" object in 
the process event listener.

Thanks
Vijay
From: 
rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> 
[mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>]
 On Behalf Of Salaboy
Sent: Friday, July 09, 2010 11:11 AM
To: Rules Users List
Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners 
can't get hold of WorkItem object

I would like to take a look on this issue. Can you provide me a test case that 
show the problem?
- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Mauricio "Salaboy" Salatino -

On Jul 9, 2010, at 12:43, Vijay K Pandey 
mailto:vpan...@mdes.ms.gov>> wrote:
I guess this problem was due to a fix done in WorkItemNodeInstance? Is this the 
correct behavior? If yes how do we get hold of "WorkItem" instance in the 
attached listeners?

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/workflow/instance/node/WorkItemNodeInstance.java?r1=32801&r2=

Thanks
Vijay
From: Vijay K Pandey
Sent: Tuesday, June 15, 2010 9:20 AM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Any one on this issue? Any Drools Flow expert?

Appreciate your time for taking a look at it.

Thanks
Vijay
From: Vijay K Pandey
Sent: Thursday, June 10, 2010 12:03 PM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Should I log this as a JIRA ticket.

Thanks
Vijay
From: Vijay K Pandey
Sent: Wednesday, June 09, 2010 9:57 AM
To: 'Rules Users List'
Subject: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of 
WorkItem object

Hi,

There is a change done in Drools 5.1.0.

[rules-users] FW: Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object

2010-07-21 Thread Vijay K Pandey
Hi @Salaboy,

Did you get a chance to look into this?

Thanks
Vijay

From: Vijay K Pandey
Sent: Thursday, July 15, 2010 1:26 PM
To: 'rules-users@lists.jboss.org'
Subject: FW: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

Hi @Salaboy,

I am not sure if you received the email below.  Thanks for looking into this.

Vijay
From: Vijay K Pandey
Sent: Tuesday, July 13, 2010 8:53 AM
To: 'Mauricio Salatino'
Subject: RE: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

Thanks for a quick response. I added the Transaction Manager piece of code but 
the problem still persists. Also it uses the attached persistence.xml file 
which is placed under META-INF directory that has the correct transaction 
manager look up class.

Thanks
Vijay


From: Mauricio Salatino [mailto:sala...@gmail.com]
Sent: Tuesday, July 13, 2010 6:40 AM
To: Vijay K Pandey
Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

I've just take a quick look to your file and I notice (without running it) that 
you didn't set the TransactionManager property to your Environment:

env.set( EnvironmentName.TRANSACTION_MANAGER,


























 TransactionManagerServices.getTransactionManager() );
You also need to have the reference to bitronix inside your persistence.xml 
file:



Can you try this and let me know if it fix your problem?
Greetings
On Tue, Jul 13, 2010 at 12:43 AM, Vijay K Pandey 
mailto:vpan...@mdes.ms.gov>> wrote:
Thanks Salaboy for looking into this.

Here is the Junit Test case(java file attached) I created for this problem.

Line # 129 fails.

Please do let me know if I am doing something wrong or the fix has some issues 
or maybe there is some other way out to get hold of the "WorkItem" object in 
the process event listener.

Thanks
Vijay
From: 
rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> 
[mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>]
 On Behalf Of Salaboy
Sent: Friday, July 09, 2010 11:11 AM
To: Rules Users List
Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners 
can't get hold of WorkItem object

I would like to take a look on this issue. Can you provide me a test case that 
show the problem?
- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Mauricio "Salaboy" Salatino -

On Jul 9, 2010, at 12:43, Vijay K Pandey 
mailto:vpan...@mdes.ms.gov>> wrote:
I guess this problem was due to a fix done in WorkItemNodeInstance? Is this the 
correct behavior? If yes how do we get hold of "WorkItem" instance in the 
attached listeners?

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/workflow/instance/node/WorkItemNodeInstance.java?r1=32801&r2=

Thanks
Vijay
From: Vijay K Pandey
Sent: Tuesday, June 15, 2010 9:20 AM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Any one on this issue? Any Drools Flow expert?

Appreciate your time for taking a look at it.

Thanks
Vijay
From: Vijay K Pandey
Sent: Thursday, June 10, 2010 12:03 PM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Should I log this as a JIRA ticket.

Thanks
Vijay
From: Vijay K Pandey
Sent: Wednesday, June 09, 2010 9:57 AM
To: 'Rules Users List'
Subject: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of 
WorkItem object

Hi,

There is a change done in Drools 5.1.0.M2 - 
org.drools.workflow.instance.node.WorkItemNodeInstance class in the method

public void triggerCompleted(WorkItem workItem) at line 196  which is 
setting the workItemId as -1

this.workItemId = -1;

Due to the above change the listeners which are attached to the  "complete" 
event of the work item - such as the method below

public void beforeNodeLeft(ProcessNodeLeftEvent event)  are not able to get 
hold of the associated workitem object as it returns null.

Is there any specific reason that workItemId is set to -1 even before the 
associated listeners get triggered or is this a bug?

If it was an intended change then how do I get hold of the "WorkItem" object in 
the attached listeners.

Thanks
Vijay
p.s This change was not there in the snapshot of 18th April 2010 which I was 
earlier working on. Above is the only change in this class from the snapshot of 
18th April and 5.1.0.M2
___
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users



--

Re: [rules-users] Drools Flow 5.1 - latest snapshot -- Gateway (Diverge) : Split Node - Priority Does not Work

2010-07-21 Thread Vijay K Pandey
Thanks Kris.

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Wednesday, July 21, 2010 4:56 AM
To: rules-users@lists.jboss.org; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1 - latest snapshot -- Gateway 
(Diverge) : Split Node - Priority Does not Work

Vijay,

This is a known limitation when using BPMN2.  Check out the documentation, that 
describes which features are implemented already in the BPMN2 implementation:
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html/ch13.html

Priorities are not yet implemented as it seems the BPMN2 spec simply does not 
define something like this.  If we want to support something like this, we will 
probably have to define a custom extension (but we didn't do this yet as we 
wanted to wait until the spec was final before starting to add too much custom 
extensions).

A workaround would be to use mutually exclusive conditions for now ...

Kris

- Original Message -
From: Vijay K Pandey<mailto:vpan...@mdes.ms.gov>
To: rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
Sent: Wednesday, July 21, 2010 5:45 AM
Subject: [rules-users] Drools Flow 5.1 - latest snapshot -- Gateway (Diverge) : 
Split Node - Priority Does not Work

Hi All,

In the Drools Flow 5.1 latest snapshot , for the node (Gateway (Diverge) : 
Split Node), somehow priority does not work. If we set some value, lets say 100 
and open the process file(BPMN2) again and check the priority - somehow it 
doesn't retains the priority value and reports the value always as 0.

I am trying to make use one of the feature of XOR type node where one of the 
constraint is "always true" with the highest priority. I hope my understanding 
is right.

This is what the Drools Flow Doc says:

XOR means that exactly one of the outgoing connections will be chosen. The 
decision is made by evaluating the constraints that are linked to each of the 
outgoing connections. Constraints are specified using the same syntax as the 
left-hand side of a rule. The constraint with the lowest priority number that 
evaluates to true is selected. Note that you should always make sure that at 
least one of the outgoing connections will evaluate to true at runtime (the 
ruleflow will throw an exception at runtime if it cannot find at least one 
outgoing connection). For example, you could use a connection which is always 
true (default) with a high priority number to specify what should happen if 
none of the other connections can be taken.

Has anyone faced this issue?

Thanks
Vijay


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm for more 
information.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Flow 5.1 - latest snapshot -- Gateway (Diverge) : Split Node - Priority Does not Work

2010-07-20 Thread Vijay K Pandey
Hi All,

In the Drools Flow 5.1 latest snapshot , for the node (Gateway (Diverge) : 
Split Node), somehow priority does not work. If we set some value, lets say 100 
and open the process file(BPMN2) again and check the priority - somehow it 
doesn't retains the priority value and reports the value always as 0.

I am trying to make use one of the feature of XOR type node where one of the 
constraint is "always true" with the highest priority. I hope my understanding 
is right.

This is what the Drools Flow Doc says:

XOR means that exactly one of the outgoing connections will be chosen. The 
decision is made by evaluating the constraints that are linked to each of the 
outgoing connections. Constraints are specified using the same syntax as the 
left-hand side of a rule. The constraint with the lowest priority number that 
evaluates to true is selected. Note that you should always make sure that at 
least one of the outgoing connections will evaluate to true at runtime (the 
ruleflow will throw an exception at runtime if it cannot find at least one 
outgoing connection). For example, you could use a connection which is always 
true (default) with a high priority number to specify what should happen if 
none of the other connections can be taken.

Has anyone faced this issue?

Thanks
Vijay

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] FW: Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object

2010-07-15 Thread Vijay K Pandey
Hi @Salaboy,

I am not sure if you received the email below.  Thanks for looking into this.

Vijay
From: Vijay K Pandey
Sent: Tuesday, July 13, 2010 8:53 AM
To: 'Mauricio Salatino'
Subject: RE: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

Thanks for a quick response. I added the Transaction Manager piece of code but 
the problem still persists. Also it uses the attached persistence.xml file 
which is placed under META-INF directory that has the correct transaction 
manager look up class.

Thanks
Vijay


From: Mauricio Salatino [mailto:sala...@gmail.com]
Sent: Tuesday, July 13, 2010 6:40 AM
To: Vijay K Pandey
Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners 
can't get hold of WorkItem object

I've just take a quick look to your file and I notice (without running it) that 
you didn't set the TransactionManager property to your Environment:

env.set( EnvironmentName.TRANSACTION_MANAGER,












 TransactionManagerServices.getTransactionManager() );
You also need to have the reference to bitronix inside your persistence.xml 
file:



Can you try this and let me know if it fix your problem?
Greetings
On Tue, Jul 13, 2010 at 12:43 AM, Vijay K Pandey 
mailto:vpan...@mdes.ms.gov>> wrote:
Thanks Salaboy for looking into this.

Here is the Junit Test case(java file attached) I created for this problem.

Line # 129 fails.

Please do let me know if I am doing something wrong or the fix has some issues 
or maybe there is some other way out to get hold of the "WorkItem" object in 
the process event listener.

Thanks
Vijay
From: 
rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> 
[mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>]
 On Behalf Of Salaboy
Sent: Friday, July 09, 2010 11:11 AM
To: Rules Users List
Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners 
can't get hold of WorkItem object

I would like to take a look on this issue. Can you provide me a test case that 
show the problem?
- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Mauricio "Salaboy" Salatino -

On Jul 9, 2010, at 12:43, Vijay K Pandey 
mailto:vpan...@mdes.ms.gov>> wrote:
I guess this problem was due to a fix done in WorkItemNodeInstance? Is this the 
correct behavior? If yes how do we get hold of "WorkItem" instance in the 
attached listeners?

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/workflow/instance/node/WorkItemNodeInstance.java?r1=32801&r2=

Thanks
Vijay
From: Vijay K Pandey
Sent: Tuesday, June 15, 2010 9:20 AM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Any one on this issue? Any Drools Flow expert?

Appreciate your time for taking a look at it.

Thanks
Vijay
From: Vijay K Pandey
Sent: Thursday, June 10, 2010 12:03 PM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Should I log this as a JIRA ticket.

Thanks
Vijay
From: Vijay K Pandey
Sent: Wednesday, June 09, 2010 9:57 AM
To: 'Rules Users List'
Subject: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of 
WorkItem object

Hi,

There is a change done in Drools 5.1.0.M2 - 
org.drools.workflow.instance.node.WorkItemNodeInstance class in the method

public void triggerCompleted(WorkItem workItem) at line 196  which is 
setting the workItemId as -1

this.workItemId = -1;

Due to the above change the listeners which are attached to the  "complete" 
event of the work item - such as the method below

public void beforeNodeLeft(ProcessNodeLeftEvent event)  are not able to get 
hold of the associated workitem object as it returns null.

Is there any specific reason that workItemId is set to -1 even before the 
associated listeners get triggered or is this a bug?

If it was an intended change then how do I get hold of the "WorkItem" object in 
the attached listeners.

Thanks
Vijay
p.s This change was not there in the snapshot of 18th April 2010 which I was 
earlier working on. Above is the only change in this class from the snapshot of 
18th April and 5.1.0.M2
___
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users



--
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar

 - Salatino "Salaboy" Mauricio -


persistence.xml
Description: persistence.xml


TestProcessEvent.java
Description: TestProcessEvent.java
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance --Listeners can't get hold of WorkItem object

2010-07-12 Thread Vijay K Pandey
Thanks Salaboy for looking into this.

Here is the Junit Test case(java file attached) I created for this problem.

Line # 129 fails.

Please do let me know if I am doing something wrong or the fix has some issues 
or maybe there is some other way out to get hold of the “WorkItem” object in 
the process event listener.

Thanks
Vijay
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Salaboy
Sent: Friday, July 09, 2010 11:11 AM
To: Rules Users List
Subject: Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners 
can't get hold of WorkItem object

I would like to take a look on this issue. Can you provide me a test case that 
show the problem?
- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Mauricio "Salaboy" Salatino -

On Jul 9, 2010, at 12:43, Vijay K Pandey 
mailto:vpan...@mdes.ms.gov>> wrote:
I guess this problem was due to a fix done in WorkItemNodeInstance? Is this the 
correct behavior? If yes how do we get hold of “WorkItem” instance in the 
attached listeners?

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/workflow/instance/node/WorkItemNodeInstance.java?r1=32801&r2=

Thanks
Vijay
From: Vijay K Pandey
Sent: Tuesday, June 15, 2010 9:20 AM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Any one on this issue? Any Drools Flow expert?

Appreciate your time for taking a look at it.

Thanks
Vijay
From: Vijay K Pandey
Sent: Thursday, June 10, 2010 12:03 PM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Should I log this as a JIRA ticket.

Thanks
Vijay
From: Vijay K Pandey
Sent: Wednesday, June 09, 2010 9:57 AM
To: 'Rules Users List'
Subject: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of 
WorkItem object

Hi,

There is a change done in Drools 5.1.0.M2 - 
org.drools.workflow.instance.node.WorkItemNodeInstance class in the method

public void triggerCompleted(WorkItem workItem) at line 196  which is 
setting the workItemId as -1

this.workItemId = -1;

Due to the above change the listeners which are attached to the  “complete” 
event of the work item – such as the method below

public void beforeNodeLeft(ProcessNodeLeftEvent event)  are not able to get 
hold of the associated workitem object as it returns null.

Is there any specific reason that workItemId is set to -1 even before the 
associated listeners get triggered or is this a bug?

If it was an intended change then how do I get hold of the “WorkItem” object in 
the attached listeners.

Thanks
Vijay
p.s This change was not there in the snapshot of 18th April 2010 which I was 
earlier working on. Above is the only change in this class from the snapshot of 
18th April and 5.1.0.M2
___
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users


TestProcessEvent.java
Description: TestProcessEvent.java
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object

2010-07-09 Thread Vijay K Pandey
I guess this problem was due to a fix done in WorkItemNodeInstance? Is this the 
correct behavior? If yes how do we get hold of "WorkItem" instance in the 
attached listeners?

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/workflow/instance/node/WorkItemNodeInstance.java?r1=32801&r2=

Thanks
Vijay
From: Vijay K Pandey
Sent: Tuesday, June 15, 2010 9:20 AM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Any one on this issue? Any Drools Flow expert?

Appreciate your time for taking a look at it.

Thanks
Vijay
From: Vijay K Pandey
Sent: Thursday, June 10, 2010 12:03 PM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Should I log this as a JIRA ticket.

Thanks
Vijay
From: Vijay K Pandey
Sent: Wednesday, June 09, 2010 9:57 AM
To: 'Rules Users List'
Subject: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of 
WorkItem object

Hi,

There is a change done in Drools 5.1.0.M2 - 
org.drools.workflow.instance.node.WorkItemNodeInstance class in the method

public void triggerCompleted(WorkItem workItem) at line 196  which is 
setting the workItemId as -1

this.workItemId = -1;

Due to the above change the listeners which are attached to the  "complete" 
event of the work item - such as the method below

public void beforeNodeLeft(ProcessNodeLeftEvent event)  are not able to get 
hold of the associated workitem object as it returns null.

Is there any specific reason that workItemId is set to -1 even before the 
associated listeners get triggered or is this a bug?

If it was an intended change then how do I get hold of the "WorkItem" object in 
the attached listeners.

Thanks
Vijay
p.s This change was not there in the snapshot of 18th April 2010 which I was 
earlier working on. Above is the only change in this class from the snapshot of 
18th April and 5.1.0.M2
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object

2010-06-15 Thread Vijay K Pandey
Any one on this issue? Any Drools Flow expert?

Appreciate your time for taking a look at it.

Thanks
Vijay
From: Vijay K Pandey
Sent: Thursday, June 10, 2010 12:03 PM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold 
of WorkItem object

Should I log this as a JIRA ticket.

Thanks
Vijay
From: Vijay K Pandey
Sent: Wednesday, June 09, 2010 9:57 AM
To: 'Rules Users List'
Subject: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of 
WorkItem object

Hi,

There is a change done in Drools 5.1.0.M2 - 
org.drools.workflow.instance.node.WorkItemNodeInstance class in the method

public void triggerCompleted(WorkItem workItem) at line 196  which is 
setting the workItemId as -1

this.workItemId = -1;

Due to the above change the listeners which are attached to the  "complete" 
event of the work item - such as the method below

public void beforeNodeLeft(ProcessNodeLeftEvent event)  are not able to get 
hold of the associated workitem object as it returns null.

Is there any specific reason that workItemId is set to -1 even before the 
associated listeners get triggered or is this a bug?

If it was an intended change then how do I get hold of the "WorkItem" object in 
the attached listeners.

Thanks
Vijay
p.s This change was not there in the snapshot of 18th April 2010 which I was 
earlier working on. Above is the only change in this class from the snapshot of 
18th April and 5.1.0.M2
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object

2010-06-10 Thread Vijay K Pandey
Should I log this as a JIRA ticket.

Thanks
Vijay
From: Vijay K Pandey
Sent: Wednesday, June 09, 2010 9:57 AM
To: 'Rules Users List'
Subject: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of 
WorkItem object

Hi,

There is a change done in Drools 5.1.0.M2 - 
org.drools.workflow.instance.node.WorkItemNodeInstance class in the method

public void triggerCompleted(WorkItem workItem) at line 196  which is 
setting the workItemId as -1

this.workItemId = -1;

Due to the above change the listeners which are attached to the  "complete" 
event of the work item - such as the method below

public void beforeNodeLeft(ProcessNodeLeftEvent event)  are not able to get 
hold of the associated workitem object as it returns null.

Is there any specific reason that workItemId is set to -1 even before the 
associated listeners get triggered or is this a bug?

If it was an intended change then how do I get hold of the "WorkItem" object in 
the attached listeners.

Thanks
Vijay
p.s This change was not there in the snapshot of 18th April 2010 which I was 
earlier working on. Above is the only change in this class from the snapshot of 
18th April and 5.1.0.M2
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object

2010-06-09 Thread Vijay K Pandey
Hi,

There is a change done in Drools 5.1.0.M2 - 
org.drools.workflow.instance.node.WorkItemNodeInstance class in the method

public void triggerCompleted(WorkItem workItem) at line 196  which is 
setting the workItemId as -1

this.workItemId = -1;

Due to the above change the listeners which are attached to the  "complete" 
event of the work item - such as the method below

public void beforeNodeLeft(ProcessNodeLeftEvent event)  are not able to get 
hold of the associated workitem object as it returns null.

Is there any specific reason that workItemId is set to -1 even before the 
associated listeners get triggered or is this a bug?

If it was an intended change then how do I get hold of the "WorkItem" object in 
the attached listeners.

Thanks
Vijay
p.s This change was not there in the snapshot of 18th April 2010 which I was 
earlier working on. Above is the only change in this class from the snapshot of 
18th April and 5.1.0.M2
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The method getTextContent() is undefined for the type Node

2010-06-08 Thread Vijay K Pandey
Update::: Issues related to Plugin. When I recompiled the bpmn2 src and put 
that jar in the plugin lib, it simply didn't took the recompiled version. Then 
I removed the jar from the plugin lib and simply copied the - bpmn2 classes 
directly in the org/drools package of the plugin and voila - plugin started 
working fine.

Thanks
Vijay
From: Vijay K Pandey
Sent: Tuesday, June 08, 2010 8:48 AM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The 
method getTextContent() is undefined for the type Node

Update::: On the exception(mentioned below) related to jar 
"drools-bpmn2-5.1.0.M2.jar", I recreated this jar file from the Drools source 
(5.1.0.M2) against JDK6  and the exception went away. :) So far so good.

Plugin related exception is still there. I replaced the jar "drools-bpmn2.jar" 
which is present in the lib of plugin jar "org.drools.eclipse_5.1.0.M2.jar" 
with the recompiled jar, but not much luck - plugin is still not able to open 
the "*.bpmn" process. The error I get is "The method getTextContent() is 
undefined for the type Node" .

Right now I am at a dead end. Thanks in advance for help.

Thanks
Vijay
From: Vijay K Pandey
Sent: Monday, June 07, 2010 5:45 PM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The 
method getTextContent() is undefined for the type Node

I created a sample project to run a very simple rule flow (BPMN process), I got 
the similar error which the plugin is reporting. My env is SUN JDK 6. Here is 
the exception I get?  Any clue guys.


Exception in thread "main" java.lang.Error: Unresolved compilation problems:
  The method getTextContent() is undefined for the type Node
  The method getTextContent() is undefined for the type Node
  at 
org.drools.bpmn2.xml.StartEventHandler.handleNode(StartEventHandler.java:46)
  at 
org.drools.bpmn2.xml.AbstractNodeHandler.end(AbstractNodeHandler.java:77)
  at 
org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:420)
  at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
  at 
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
  at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:739)
  at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
  at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
  at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
  at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
  at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
  at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
  at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
  at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
  at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:295)
  at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:174)
  at org.drools.compiler.xml.XmlProcessReader.read(XmlProcessReader.java:44)
  at 
org.drools.compiler.ProcessBuilder.addProcessFromFile(ProcessBuilder.java:222)
  at 
org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:415)
  at 
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:475)
  at 
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:517)
  at 
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)

Thanks
Vijay
From: Vijay K Pandey
Sent: Sunday, June 06, 2010 11:43 PM
To: Rules Users List
Subject: Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The method 
getTextContent() is undefined for the type Node

Hi,

I just downloaded the Drools 5.1.0.M2 (have been using the snapshot version of 
around 16th April 2010) - created a sample "rule flow file(start-->user 
task-->end) - bpmn2 version". But when I clicked the file to open it gave the 
following error (image attached)

"The method getTextContent() is undefined for the type Node" .

I understand thi

Re: [rules-users] Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The method getTextContent() is undefined for the type Node

2010-06-08 Thread Vijay K Pandey
Update::: On the exception(mentioned below) related to jar 
"drools-bpmn2-5.1.0.M2.jar", I recreated this jar file from the Drools source 
(5.1.0.M2) against JDK6  and the exception went away. :) So far so good.

Plugin related exception is still there. I replaced the jar "drools-bpmn2.jar" 
which is present in the lib of plugin jar "org.drools.eclipse_5.1.0.M2.jar" 
with the recompiled jar, but not much luck - plugin is still not able to open 
the "*.bpmn" process. The error I get is "The method getTextContent() is 
undefined for the type Node" .

Right now I am at a dead end. Thanks in advance for help.

Thanks
Vijay
From: Vijay K Pandey
Sent: Monday, June 07, 2010 5:45 PM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The 
method getTextContent() is undefined for the type Node

I created a sample project to run a very simple rule flow (BPMN process), I got 
the similar error which the plugin is reporting. My env is SUN JDK 6. Here is 
the exception I get?  Any clue guys.


Exception in thread "main" java.lang.Error: Unresolved compilation problems:
  The method getTextContent() is undefined for the type Node
  The method getTextContent() is undefined for the type Node
  at 
org.drools.bpmn2.xml.StartEventHandler.handleNode(StartEventHandler.java:46)
  at 
org.drools.bpmn2.xml.AbstractNodeHandler.end(AbstractNodeHandler.java:77)
  at 
org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:420)
  at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
  at 
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
  at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:739)
  at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
  at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
  at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
  at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
  at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
  at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
  at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
  at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
  at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:295)
  at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:174)
  at org.drools.compiler.xml.XmlProcessReader.read(XmlProcessReader.java:44)
  at 
org.drools.compiler.ProcessBuilder.addProcessFromFile(ProcessBuilder.java:222)
  at 
org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:415)
  at 
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:475)
  at 
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:517)
  at 
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)

Thanks
Vijay
From: Vijay K Pandey
Sent: Sunday, June 06, 2010 11:43 PM
To: Rules Users List
Subject: Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The method 
getTextContent() is undefined for the type Node

Hi,

I just downloaded the Drools 5.1.0.M2 (have been using the snapshot version of 
around 16th April 2010) - created a sample "rule flow file(start-->user 
task-->end) - bpmn2 version". But when I clicked the file to open it gave the 
following error (image attached)

"The method getTextContent() is undefined for the type Node" .

I understand this error is related to org.w3c.dom.Node where this method was 
added as part of DOM Level 3 and available in JDK 5+ . My project and eclipse 
is configured against JDK 6+ . Not sure why this error with M2.

May be it is because of the drools-bpmn2.jar included in the drools eclipse 
plugin? Can someone shed some light that where it might be going wrong.


[cid:image001.png@01CB06E7.1655B9C0]

Thanks
Vijay

<>___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The method getTextContent() is undefined for the type Node

2010-06-07 Thread Vijay K Pandey
I created a sample project to run a very simple rule flow (BPMN process), I got 
the similar error which the plugin is reporting. My env is SUN JDK 6. Here is 
the exception I get?  Any clue guys.


Exception in thread "main" java.lang.Error: Unresolved compilation problems:
  The method getTextContent() is undefined for the type Node
  The method getTextContent() is undefined for the type Node
  at 
org.drools.bpmn2.xml.StartEventHandler.handleNode(StartEventHandler.java:46)
  at 
org.drools.bpmn2.xml.AbstractNodeHandler.end(AbstractNodeHandler.java:77)
  at 
org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:420)
  at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
  at 
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
  at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:739)
  at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
  at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
  at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
  at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
  at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
  at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
  at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
  at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
  at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:295)
  at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:174)
  at org.drools.compiler.xml.XmlProcessReader.read(XmlProcessReader.java:44)
  at 
org.drools.compiler.ProcessBuilder.addProcessFromFile(ProcessBuilder.java:222)
  at 
org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:415)
  at 
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:475)
  at 
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:517)
  at 
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)

Thanks
Vijay
From: Vijay K Pandey
Sent: Sunday, June 06, 2010 11:43 PM
To: Rules Users List
Subject: Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The method 
getTextContent() is undefined for the type Node

Hi,

I just downloaded the Drools 5.1.0.M2 (have been using the snapshot version of 
around 16th April 2010) - created a sample "rule flow file(start-->user 
task-->end) - bpmn2 version". But when I clicked the file to open it gave the 
following error (image attached)

"The method getTextContent() is undefined for the type Node" .

I understand this error is related to org.w3c.dom.Node where this method was 
added as part of DOM Level 3 and available in JDK 5+ . My project and eclipse 
is configured against JDK 6+ . Not sure why this error with M2.

May be it is because of the drools-bpmn2.jar included in the drools eclipse 
plugin? Can someone shed some light that where it might be going wrong.


[cid:image001.png@01CB0668.994E92E0]

Thanks
Vijay

<>___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The method getTextContent() is undefined for the type Node

2010-06-06 Thread Vijay K Pandey
Hi,

I just downloaded the Drools 5.1.0.M2 (have been using the snapshot version of 
around 16th April 2010) - created a sample "rule flow file(start-->user 
task-->end) - bpmn2 version". But when I clicked the file to open it gave the 
following error (image attached)

"The method getTextContent() is undefined for the type Node" .

I understand this error is related to org.w3c.dom.Node where this method was 
added as part of DOM Level 3 and available in JDK 5+ . My project and eclipse 
is configured against JDK 6+ . Not sure why this error with M2.

May be it is because of the drools-bpmn2.jar included in the drools eclipse 
plugin? Can someone shed some light that where it might be going wrong.


[cid:image001.png@01CB05D0.DAC32670]

Thanks
Vijay

<>___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to access process variables within a work-item (human task)

2010-04-26 Thread Vijay K Pandey
That will not register the process variables - its there to pass the variables 
data.

You can click on the process diagram in eclipse - go to properties "view" - and 
look for the "Variables" property. It's here that you have to register your 
process variables.

Vijay
-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Robert
Sent: Monday, April 26, 2010 7:56 AM
To: Rules Users List
Subject: Re: [rules-users] How to access process variables within a work-item 
(human task)

Hi,

I don't understand what you mean ?

I thought with

ksession.startProcess(processName, processVariables);

they are registered.

Am 26.04.2010, 15:28 Uhr, schrieb Salaboy :

> Did you register the equipement variable at process level? Mapping
> uses that definitions to know about the variables used across the
> processes.
> Greetings
>
> - Ing. Mauricio Salatino -
>
> On Apr 26, 2010, at 1:56, Robert  wrote:
>
>> Hi,
>>
>> I have
>>
>> ...
>> StatefulKnowledgeSession
>> ksession.getWorkItemManager().registerWorkItemHandler("Human Task",
>> taskHandler);
>> ...
>>
>> Map processVariables = new HashMap> Object>();
>> processVariables.put("equipment", "OvenQP33");
>>
>> ProcessInstance pi = ksession.startProcess(processName,
>> processVariables);
>> ...
>>
>> ... within the taskHandler.executeWorkItem(WorkItem workItem,
>> WorkItemManager workItemManager):
>>
>> I am setting a break-point, and I am getting there, but how am I
>> able to
>> access my processVariables or even set specific data for this
>> particular
>> work-item ?
>>
>> I tried using as described in the doc "9.1 Human tasks inside
>> processes":
>>
>>- Parameter mapping: Allows copying the value of process
>> variables to
>> parameters of the human task. Upon creation of the human
>> tasks, the
>> values will be copied.
>>
>> But without any success. I just not getting to the "equipment"
>> variable,
>> which I need at this point of processing the work-item.
>>
>> The mapping I did: "equipment" -> "equipment". With the hope to find
>> them
>> within workItem.getParameters(), but they are not there and nowhere-
>> else
>> too.
>>
>> Any ideas ?
>>
>> Generally there are even many more settings possible for the human
>> task,
>> see doc (here the list:
>> Id,
>> Name,TaskName,Priority,Comment,ActorId,Skippable,Content,Swimlane,On-
>> entry
>> and on-exit actions,Parameter mapping,Result
>> mapping,Timers,ParentId), but
>> only a few are accessible through workItem.getParameters(). The
>> others ?
>> Also, no idea to get this data.
>>
>> Cheers, Rob.
>>
>>
>> --
>> Erstellt mit Operas revolutionärem E-Mail-Modul:
>> http://www.opera.com/mail
>> /
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users


--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow - Latest Snapshot vs 5.1.M1 - JPA - SessionInfo issues

2010-04-20 Thread Vijay K Pandey
Thought to share new development on this issue.  The use case I have is where I 
needed just 1 global SessionInfo - and don't need any update. I didn't wanted 
to associate the process instance with SessionInfo and store this association 
somewhere else. This is what I did to resolve the issue.


a)  Create an extension class for "SingleSessionCommandService" so that the 
"lastModificationDate" is not updated when the process execution operation 
ends. This will make sure the SessionInfo doesn't gets dirty for my use case.

b)  Created an extension class for JPAKnowledgeServiceProviderImpl - to set 
the above single session extension class.

c)   Created an extension class for JPAKnowledgeService to set the above 
extension class of  JPAKnowledgeServiceProviderImpl.

d)  So whenever the application starts - it always checks if the single 
record for SessionInfo is present or not - and if not the same is created 
through JPAKnowledgeService.

e)  Upgraded the Hibernate to 3.5.1 which implements JPA 2.0 - that now 
provides cache functionality at EntityManagerFactory level - similar to second 
level cache functionality

f)   Configure the SessionInfo.class to be set at 2nd level cache with the 
cache set as "read-only".

The above changes gave me what I was looking for - a global read only 
SessionInfo --- where unnecessary read does not happen on SessionInfo and nor 
any update on it and only 1 record for SessionInfo .

Cheers
Vijay

From: Vijay K Pandey
Sent: Monday, April 19, 2010 4:12 PM
To: rules-users
Subject: Drools Flow - Latest Snapshot vs 5.1.M1 - JPA - SessionInfo issues

Hi,

Has the working of the "SessionInfo" changed from 5.1.M1 vs latest snapshot 
(18th Apr 2010).  I am using the JPA persistence to store the process instance 
along with the Human Task related data. What I noticed is that "SessionInfo" is 
getting updated whenever I execute the operation through the 
"SingleSessionCommandService"

public synchronized  T execute(GenericCommand command)  this always 
leads to an update on "SessionInfo", in 5.1.M1 it was not the case.

My use case is where I want to have only 1 global kind of session as I don't 
store any state in the session - it's just there to load any process instance - 
now due to update(always) on the sessionInfo, won't there be concurrency issues 
( as 'optlock' column is always changing - I guess it's there for optimistic 
concurrency check)  as multiple process instances are being worked upon (the 
SQL for update that gets executed is).

update
SESSION_INFOset  
last_modification_date=?,rules_byte_array=?,start_date=?,optlock=? Where 
id=? and optlock=?

I don't need multiple SessionInfo - is there a way to achieve this?

Thanks
Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Flow - Latest Snapshot vs 5.1.M1 - JPA - SessionInfo issues

2010-04-19 Thread Vijay K Pandey
Hi,

Has the working of the "SessionInfo" changed from 5.1.M1 vs latest snapshot 
(18th Apr 2010).  I am using the JPA persistence to store the process instance 
along with the Human Task related data. What I noticed is that "SessionInfo" is 
getting updated whenever I execute the operation through the 
"SingleSessionCommandService"

public synchronized  T execute(GenericCommand command)  this always 
leads to an update on "SessionInfo", in 5.1.M1 it was not the case.

My use case is where I want to have only 1 global kind of session as I don't 
store any state in the session - it's just there to load any process instance - 
now due to update(always) on the sessionInfo, won't there be concurrency issues 
( as 'optlock' column is always changing - I guess it's there for optimistic 
concurrency check)  as multiple process instances are being worked upon (the 
SQL for update that gets executed is).

update
SESSION_INFOset  
last_modification_date=?,rules_byte_array=?,start_date=?,optlock=? Where 
id=? and optlock=?

I don't need multiple SessionInfo - is there a way to achieve this?

Thanks
Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Resuming a simple process involving human task

2010-04-13 Thread Vijay K Pandey
You need to complete the Human Task before the flow moves from there. To do 
that you can get hold of the "Mina Client" to complete the associate WSHT task 
which in turn should generate the event to complete the associated Work Item. 
Take a look at the following test classes within the drools source.

org.drools.task.service.TaskLifeCycleTest

org.drools.task.service.TaskServiceLifeCycleTest

Vijay

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Touma
Sent: Tuesday, April 13, 2010 10:12 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Resuming a simple process involving human task


Hi all,

For the past few weeks I've been trying to get a simple drools flow example
involving human tasks up and running. I've done quite a bit to the point
that my session, process, task and workitems are being persisted in the
database. Here is what my flow looks like:

Start -> Ruleflow -> Decision node -> Human Task -> Printing Node -> End

The work item handler for the Human task simply performs the task of
persisting the Task instance. After reaching the Human Task, the flow stops
and the state is persisted. But how would I go about restarting/resuming the
flow so that the 'Printing node' is reached? I've tried using the
loadStatefulKnowledgeSession(sessionId) to load the session but querying the
list of all the processes for the given session returns an empty list. Ditto
with the list of all the process events. I have all the ID's with me
(workitem, process, task, session) but am pretty confused as to how these
can be put to use to resume my suspended workflow.

Any pointers would be much appreciated. TIA.

Peace,
/T\
--
View this message in context: 
http://n3.nabble.com/Resuming-a-simple-process-involving-human-task-tp716250p716250.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
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools expert: memory issues

2010-04-01 Thread Vijay K Pandey
You can use Eclipse MAT

Vijay
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of miguel machado
Sent: Thursday, April 01, 2010 5:31 AM
To: Rules Users List
Subject: Re: [rules-users] drools expert: memory issues

Hi there,

Actually that's a very good suggestion, i hadn't thought about that. Is there 
any heap inspector tool you'd recommend?

In what comes to Wolfgang ideas, it makes sense what he said, but the truth is 
making the knowledge builder a static variable actually made memory usage lower 
(just a bit). I know it strikes as a surprise because one of the good practices 
in java is to reduce the variable/object scope as much as possible :-/ I'll try 
to investigate this further.

About the kbase serializing, i'll give it another try.

thanks for all support so far guys.
_ miguel


2010/4/1 Jevon Wright mailto:je...@jevon.org>>
Hi Miguel,

I assume that you've used a memory analyzer to find out conclusively that the 
memory usage is by Drools, and not a memory leak?

One way to do this is to limit the virtual memory to a small amount, add 
-XX:+HeapDumpOnOutOfMemoryError to your environment, and then using Memory 
Analyzer to analyse the dump.

Cheers
Jevon
On Wed, Mar 31, 2010 at 2:44 AM, Miguel Machado 
mailto:mls.mach...@gmail.com>> wrote:
hi all,

I'm quite new to the drools rule engine and i've been using it for a project 
where i need to filter events and execute actions accordingly.

I'm currently running a DRL file and creating a stateful session from it, and 
then running 2/3 facts every time. Every X seconds I collect the available 
facts and call fireAllRules() + dispose(), always within the same session. The 
DRL file has circa 2160 rules declared (an external program is producing them), 
and i'm using the "no-loop", "lock-on-active", "activation-group" and 
"agenda-group" options on almost every one.

My main problem is that the software is consuming too much memory when it loads 
the rules to the knowledge base variable, it reaches +300Mb which is just not 
affordable in this project. Is there any way i can work around this? I've tried 
setting some configuration properties but to no avail. What techniques may i 
try in order to reduce memory load on drools startup? What would be the best 
approach for dealing with so many rules?

Anything would help, thanks in advance,

_ miguel

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
"To understand what is recursion you must first understand recursion"
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] HumanTask Process

2010-03-29 Thread Vijay K Pandey
You can do the "claim" or "delegate" operation -- look at the WSHT image 
embedded in the drools flow documentation...

Vijay
-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of ramram
Sent: Monday, March 29, 2010 7:20 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] HumanTask Process


Hi All,

  I was working on the Human Task Life cycle by adding the delegate to the
drools-process-task. I have once question how we can move the process from
the "Ready" state to the "Reserved" state. If someone can help it would be
great.

Regards,
Ram
--
View this message in context: 
http://n3.nabble.com/HumanTask-Process-tp683271p683271.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
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Data directly from Monitoring tool

2010-03-04 Thread Vijay K Pandey
Looks at Drools PipeLine

http://blog.athico.com/2009/01/drools-pipeline-for-smooks-jaxbxsd-jxls.html

Vijay
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Nina
Sent: Thursday, March 04, 2010 1:25 PM
To: rules-users@lists.jboss.org
Subject: [rules-users] Data directly from Monitoring tool

Hello,

In there any way to receive events directly from a monitoring tool to trigger a 
rule flow within the Drools suite? If yes, which component would I leverage 
(e.g. Flow, Fusion) and how would I set this up (e.g. adapters)?

Thank you.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Guvnor installation on weblogic

2010-01-06 Thread Vijay K Pandey
Take a look at drools pipeline for non POJO based data sources.

http://blog.athico.com/2009/01/drools-pipeline-for-smooks-jaxbxsd-jxls.html

http://www.kijanowski.eu/index.php?site=articles&article=drools_pipeline&lang=en

Regards
Vijay


From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Nilima R
Sent: Wednesday, January 06, 2010 3:42 AM
To: Rules Users List
Subject: Re: [rules-users] Drools Guvnor installation on weblogic


Hi All,


Can you please let me know if I can apply rules on xml data using Drools or we 
can just apply rules on POJO.


Regards,

Nilima Rajendra Raichandani
Sub Focus Area Lead - BPM/BAM/BRE
TEG - Open Source Platform
Tata Consultancy Services
Ph:- +91 22 6778 2027
Cell:- 9322108518
Mailto: nilim...@tcs.com
Website: http://www.tcs.com<http://www.tcs.com/>

Experience certainty.IT Services
   Business Solutions
   Outsourcing
____

From:

Vijay K Pandey 

To:

Rules Users List 

Cc:

Nilima R 

Date:

01/05/2010 08:59 PM

Subject:

RE: [rules-users] Drools Guvnor  installation on weblogic






The datasource defined in the persistence unit (jta-data-source or 
non-jta-data-source) of the persistence.xml maps to the JNDI name that must be 
configured beforehand. In your case you need to have the datasource configured 
against the jdbc/testDS1 jndi name.

Regards
Vijay



From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Nilima R
Sent: Tuesday, January 05, 2010 2:41 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Drools Guvnor installation on weblogic


Hi All,

I am trying to install Drools Guvnor on weblogic 10 .I have added the Guvnor 
WAR file and dependent jars from Drools binaries download.
However  I am getting error for datasource configuration. Do we need to 
configure any datasource?
Please find error logs below



   (PersistenceUnitInfoImpl.java:105)
   at 
weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:316)
   at 
weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:96)
   at 
weblogic.deployment.ModulePersistenceUnitRegistry.(ModulePersistenceUnitRegistry.java:53)
   Truncated. see log file for complete stacktrace
>

(PersistenceUnitInfoImpl.java:105)
   at 
weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:316)
   at 
weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:96)
   at 
weblogic.deployment.ModulePersistenceUnitRegistry.(ModulePersistenceUnitRegistry.java:53)
   Truncated. see log file for complete stacktrace
>
(PersistenceUnitInfoImpl.java:105)
   at 
weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:316)
   at 
weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:96)
   at 
weblogic.deployment.ModulePersistenceUnitRegistry.(ModulePersistenceUnitRegistry.java:53)
   at 
weblogic.servlet.internal.WebAppModule.initPURegistry(WebAppModule.java:1176)
   at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:307)
>



Regards,
Nilima Rajendra Raichandani
Sub Focus Area Lead - BPM/BAM/BRE
TEG - Open Source Platform
Tata Consultancy Services
Ph:- +91 22 6778 2027
Cell:- 9322108518
Mailto: nilim...@tcs.com
Website: http://www.tcs.com<http://www.tcs.com/>

Experience certainty.IT Services
  Business Solutions
  Outsourcing

=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you



=-=-=

Notice: The information contained in this e-mail

message and/or attachments to it may contain

confidential or privileged information. If you are

not the intended recipient, any dissemination, use,

review, distribution, printing or copying of the

information contained in this e-mail message

and/or attachments to it are strictly prohibited. If

you have r

Re: [rules-users] Drools Guvnor installation on weblogic

2010-01-05 Thread Vijay K Pandey
The datasource defined in the persistence unit (jta-data-source or 
non-jta-data-source) of the persistence.xml maps to the JNDI name that must be 
configured beforehand. In your case you need to have the datasource configured 
against the jdbc/testDS1 jndi name.

Regards
Vijay

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Nilima R
Sent: Tuesday, January 05, 2010 2:41 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Drools Guvnor installation on weblogic


Hi All,

I am trying to install Drools Guvnor on weblogic 10 .I have added the Guvnor 
WAR file and dependent jars from Drools binaries download.
However  I am getting error for datasource configuration. Do we need to 
configure any datasource?
Please find error logs below



   (PersistenceUnitInfoImpl.java:105)
at 
weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:316)
at 
weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:96)
at 
weblogic.deployment.ModulePersistenceUnitRegistry.(ModulePersistenceUnitRegistry.java:53)
Truncated. see log file for complete stacktrace
>

(PersistenceUnitInfoImpl.java:105)
at 
weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:316)
at 
weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:96)
at 
weblogic.deployment.ModulePersistenceUnitRegistry.(ModulePersistenceUnitRegistry.java:53)
Truncated. see log file for complete stacktrace
>
(PersistenceUnitInfoImpl.java:105)
at 
weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:316)
at 
weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:96)
at 
weblogic.deployment.ModulePersistenceUnitRegistry.(ModulePersistenceUnitRegistry.java:53)
at 
weblogic.servlet.internal.WebAppModule.initPURegistry(WebAppModule.java:1176)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:307)
>



Regards,
Nilima Rajendra Raichandani
Sub Focus Area Lead - BPM/BAM/BRE
TEG - Open Source Platform
Tata Consultancy Services
Ph:- +91 22 6778 2027
Cell:- 9322108518
Mailto: nilim...@tcs.com
Website: http://www.tcs.com

Experience certainty.IT Services
   Business Solutions
   Outsourcing


=-=-=

Notice: The information contained in this e-mail

message and/or attachments to it may contain

confidential or privileged information. If you are

not the intended recipient, any dissemination, use,

review, distribution, printing or copying of the

information contained in this e-mail message

and/or attachments to it are strictly prohibited. If

you have received this communication in error,

please notify us by reply e-mail or telephone and

immediately and permanently delete the message

and any attachments. Thank you




___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools 5.1.0.M1 - Retrieve return value of GenericCommand from ExecutionResults

2009-12-16 Thread Vijay K Pandey
Hi,

If I execute a GenericCommand against the statefulknowledgesession it 
returns the ExecutionResults, but how do I retrieve the actual returned value 
of the GenericCommand which I had implemented.

Lets says something like this - so how do I get hold of the Boolean object 
return value from the command.

public class TestCommand implements GenericCommand {
public Boolean execute(Context context) {
return Boolean.TRUE;
}
}

I put a debug on and can see that ExecutionResultsImpl is returned but it has 
nothing inside?

What I am missing or doing something wrong?

Thanks
Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5.1.0.M1 - Process Task JPAWorkItemManager

2009-12-15 Thread Vijay K Pandey
This is what our scenario is:



a) Sample Process A: --> Start -->Human Task 1 ---> Human Task 2 -->. End



When the above process is started it will wait at "Human Task 1". Let's says 
after some time/days based on some external application data - Human Task 1 
needs to be skipped/aborted and then the process moves to Task 2. In that case 
if we simply call this



ksession.getWorkItemManager ().abortWorkItem (workItemId);



I was expecting the above call to also call the handler's abortWorkItem method 
so that the external Task can also be skipped/aborted.



I understand that when we add a new Task 3 different types of events are 
registered for the TaskEvent and if we complete the task 
(complete/failed/skipped) - the registered handlers will get called back and 
will then internally call the workitemamanger.abortWorkItem if it is 
failed/skipped and that will resolve the issue, but the problem I am facing is 
after the server gets restarted all the added listeners are lost and there 
won't be any callbacks.



May be I can manually call the skip of the Task associated with the work item 
but I thought to have this call non intrusive.



Thanks

Vijay



-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Tuesday, December 15, 2009 7:42 PM
To: Rules Users List; Vijay K Pandey
Cc: Rules Users List
Subject: Re: [rules-users] Drools 5.1.0.M1 - Process Task JPAWorkItemManager



After a work item has been created, the work item manager expects the

handler to either signal the completion of the work item, or the

abortion if it could not be executed normally.  Note that, if the

handler decides to call the abortWorkItem method, the abort method of

the handler is not called again (as the handler just told the engine

that the work item could not be executed, so no need to call that again).



The abortWorkItem method is called when the work item should no longer

be executed, for example when the process it was executing in was

aborted.  In that case, the abortWorkItem method of the handler will be

called, so he can also cancel the work item in the external system.  For

example, if the work item is a user task on a task list, this will

usually remove the task from the task list again.



Hope this helps!



Kris



Quoting Vijay K Pandey :



> Hi,

>

> I am using Drools 5.1.0.M1. My question is there any reason why

> JPAWorkItemManager does not call the workitemhandler when we abort a

> work item.

>

> a)   Step 1 - Obtain the stateful knowledge session - set the

> work item handler

> b)   Step 2 - Abort the work item. But this call does not call

> back the abortWorkItem of the work item handler.

>

> ksession.getWorkItemManager().abortWorkItem(workItemId);

>

> I checked the JPAWorkItemManager and it does not call the handler to

> execute the abortWorkItem method of the work item handler.

>

> I do see that from

> public void internalAbortWorkItem(long id)  there is

> a call for the work item handler method but no call from

> abortWorkItem method

>

> Any reason why?

>

> Thanks

> Vijay

>









Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

___

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools 5.1.0.M1 - Process Task JPAWorkItemManager

2009-12-15 Thread Vijay K Pandey
Hi,

I am using Drools 5.1.0.M1. My question is there any reason why 
JPAWorkItemManager does not call the workitemhandler when we abort a work item.

a)   Step 1 - Obtain the stateful knowledge session - set the work item 
handler
b)   Step 2 - Abort the work item. But this call does not call back the 
abortWorkItem of the work item handler.

ksession.getWorkItemManager().abortWorkItem(workItemId);

I checked the JPAWorkItemManager and it does not call the handler to execute 
the abortWorkItem method of the work item handler.

I do see that from
public void internalAbortWorkItem(long id)  there is a call for 
the work item handler method but no call from abortWorkItem method

Any reason why?

Thanks
Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools 5 - Process Task - Persistence Unit "org.drools.task"

2009-12-14 Thread Vijay K Pandey
Hi,

In the Drools 5 - Process Task, persistence unit ="org.drools.task" defined in 
the persistence.xml 
(drools-process\drools-process-task\src\main\resources\META-INF) has the 
"Deadline" entity mentioned twice. I guess one of them should be "Deadlines".


   
org.hibernate.ejb.HibernatePersistence
org.drools.task.Attachment
org.drools.task.Content
org.drools.task.BooleanExpression
org.drools.task.Comment
org.drools.task.Deadline
org.drools.task.Comment
org.drools.task.Deadline
org.drools.task.Delegation
org.drools.task.Escalation
org.drools.task.Group
org.drools.task.I18NText
org.drools.task.Notification
org.drools.task.EmailNotification
org.drools.task.EmailNotificationHeader
org.drools.task.PeopleAssignments
org.drools.task.Reassignment
org.drools.task.Status
org.drools.task.Task
org.drools.task.TaskData
org.drools.task.SubTasksStrategy
org.drools.task.OnParentAbortAllSubTasksEndStrategy
org.drools.task.OnAllSubTasksEndParentEndStrategy

org.drools.task.User

Regards,
Vijay


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Human Task Work Item - Activation Time

2009-12-14 Thread Vijay K Pandey
Created a jira issue

https://jira.jboss.org/jira/browse/JBRULES-2372

Regards
Vijay

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mauricio Salatino
Sent: Monday, December 14, 2009 11:16 AM
To: Rules Users List
Subject: Re: [rules-users] Human Task Work Item - Activation Time

Yes or you can create a jira issue explaining the expected behavior and we can 
implement it.

2009/12/14 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>

I checked the TaskData class and it sets the activation time during 
initialization - as shown below


//@FIXME for now we activate on creation, unless date is supplied
if (getActivationTime() == null) {
setActivationTime(createdOn);
}



I looked up the WSHT specs, it only mentions this
"The time in UTC when the task has been activated."

I also looked up at the BPEL4People and there its defines "Defer Activation" 
which is mainly related to the "scheduled actions", I guess opposite to the 
expiration time.

So looks like I have to manage this feature on my own.

Regards
Vijay



-Original Message-
From: 
rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> 
[mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>]
 On Behalf Of Kris Verlaenen
Sent: Monday, December 14, 2009 9:03 AM
To: Rules Users List; Vijay K Pandey
Cc: Rules Users List
Subject: Re: [rules-users] Human Task Work Item - Activation Time



We just try to follow what is defined in the WS-HumanTask specification.

 Could you check whether this is a limitation of the spec itself or

whether we did not implement that feature correctly?



Kris



Quoting Vijay K Pandey mailto:vpan...@mdes.ms.gov>>:



> Hi,

>

>

>

> If a human task once in "Reserved" state is released it goes in the

> "Ready" state and then if claimed by a potential owner - should the

> activation time of the task change or not? If not is there any way to

> identify that at what time the task was claimed by another potential

> owner.

>

>

>

> Thanks

>

> Vijay

>









Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

___

rules-users mailing list

rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>

https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org<mailto: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] Human Task Work Item - Activation Time

2009-12-14 Thread Vijay K Pandey
I checked the TaskData class and it sets the activation time during 
initialization - as shown below


//@FIXME for now we activate on creation, unless date is supplied
if (getActivationTime() == null) {
setActivationTime(createdOn);
}



I looked up the WSHT specs, it only mentions this
"The time in UTC when the task has been activated."

I also looked up at the BPEL4People and there its defines "Defer Activation" 
which is mainly related to the "scheduled actions", I guess opposite to the 
expiration time.

So looks like I have to manage this feature on my own.

Regards
Vijay



-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Monday, December 14, 2009 9:03 AM
To: Rules Users List; Vijay K Pandey
Cc: Rules Users List
Subject: Re: [rules-users] Human Task Work Item - Activation Time



We just try to follow what is defined in the WS-HumanTask specification.

 Could you check whether this is a limitation of the spec itself or

whether we did not implement that feature correctly?



Kris



Quoting Vijay K Pandey :



> Hi,

>

>

>

> If a human task once in "Reserved" state is released it goes in the

> "Ready" state and then if claimed by a potential owner - should the

> activation time of the task change or not? If not is there any way to

> identify that at what time the task was claimed by another potential

> owner.

>

>

>

> Thanks

>

> Vijay

>









Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

___

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Human Task Work Item - Activation Time

2009-12-13 Thread Vijay K Pandey
Hi,



If a human task once in "Reserved" state is released it goes in the "Ready" 
state and then if claimed by a potential owner - should the activation time of 
the task change or not? If not is there any way to identify that at what time 
the task was claimed by another potential owner.



Thanks

Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Human Task Work Item - Activation Time

2009-12-10 Thread Vijay K Pandey
Hi,



If a human task once in "Reserved" state is released it goes in the "Ready" 
state and then if claimed by a potential owner - should the activation time of 
the task change or not? If not is there any way to identify that at what time 
the task was claimed by another potential owner.



Thanks

Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Human Task Work Item

2009-12-08 Thread Vijay K Pandey
I don't think you can get hold of workItem directly from Task  the only 
reference Task has the workItemId.  May be you can serialize the workItem and 
set to the content of the Task( I don't like it) - and then retrieve it later  
--- else I guess you have to get hold of WorkItemInfo and then workItem..

Also creation of knowledgesession is not process/time consuming so I don't see 
any harm in there

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Todd Pagni
Sent: Tuesday, December 08, 2009 11:57 AM
To: Rules Users List
Subject: Re: [rules-users] Human Task Work Item

Thanks for the info.  I was hoping there was a way to get the work item via 
mina.  We have a client application that is communicating with the TaskServer 
via mina and it would be nice if you could easily get a work item that is 
associated with a  task instead of creating a separate knowledgesession.

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Vijay K Pandey
Sent: Tuesday, December 08, 2009 11:47 AM
To: Rules Users List
Subject: Re: [rules-users] Human Task Work Item

I guess first you have to get hold of the "workitemid" from the task data i.e. 
task.getTaskData().getWorkItemId().

a)   Create a "Command" class which implements GenericCommand
b)   Implement the method "public WorkItem execute(Context context)"
c)   Based on the workitem id ( set this value in your command object - 
constructor/setter) - get hold of the WorkItemInfo object through the entity 
manager  and then its workItem - something like this

StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) 
context).getStatefulKnowledgesession();
if (workItemId==null) {
return null;
}
EntityManager em = (EntityManager) 
ksession.getEnvironment().get(EnvironmentName.ENTITY_MANAGER);
WorkItemInfo workItemInfo = em.find(WorkItemInfo.class, 
workItemId);
if(workItemInfo==null){
return null;
}else{
  return workItemInfo.getWorkItem();
 }

   d) Then call the execute method on the StatefulKnowledgeSession - which 
should execute the above Command object and that returns you the WorkItem 
object.

Vijay


From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Todd Pagni
Sent: Tuesday, December 08, 2009 11:16 AM
To: Rules Users List
Subject: [rules-users] Human Task Work Item

>From the Mina client, how do you get a work item associated with a human task?

I see the Task.getTaskData(), but I don't see any easy way to get the work item 
as I need the work item inparameters from the mina client side.

Thanks,
Todd
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Human Task Work Item

2009-12-08 Thread Vijay K Pandey
I guess first you have to get hold of the "workitemid" from the task data i.e. 
task.getTaskData().getWorkItemId().

a)   Create a "Command" class which implements GenericCommand
b)   Implement the method "public WorkItem execute(Context context)"
c)   Based on the workitem id ( set this value in your command object - 
constructor/setter) - get hold of the WorkItemInfo object through the entity 
manager  and then its workItem - something like this

StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) 
context).getStatefulKnowledgesession();
if (workItemId==null) {
return null;
}
EntityManager em = (EntityManager) 
ksession.getEnvironment().get(EnvironmentName.ENTITY_MANAGER);
WorkItemInfo workItemInfo = em.find(WorkItemInfo.class, 
workItemId);
if(workItemInfo==null){
return null;
}else{
  return workItemInfo.getWorkItem();
 }

   d) Then call the execute method on the StatefulKnowledgeSession - which 
should execute the above Command object and that returns you the WorkItem 
object.

Vijay


From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Todd Pagni
Sent: Tuesday, December 08, 2009 11:16 AM
To: Rules Users List
Subject: [rules-users] Human Task Work Item

>From the Mina client, how do you get a work item associated with a human task?

I see the Task.getTaskData(), but I don't see any easy way to get the work item 
as I need the work item inparameters from the mina client side.

Thanks,
Todd
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Interface implementation not working..

2009-12-02 Thread Vijay K Pandey
Problem is with your interface modifier declaration. Your modifier is "default" 
, convert that to "public" and it should be fine.

Change interface Generalized
  TO
public interface Generalized

You don't have to set "public" modifier to the "Display" method - by default 
interface method visibility is "public".

Vijay

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Deepak Jambhekar
Sent: Wednesday, December 02, 2009 9:10 PM
To: Rules Users List
Subject: Re: [rules-users] Interface implementation not working..

I am still getting the same error even after making that method as public... ??

Thanks
Deepak  Jambhekar

-rules-users-boun...@lists.jboss.org wrote: -
To: Rules Users List 
From: CK 
Sent by: rules-users-boun...@lists.jboss.org
Date: 12/02/2009 10:28PM
Subject: Re: [rules-users] Interface implementation not working..

Try changing your BOM_TRANSACTION_DETAILS Display() method access to public and 
see if it works.

Currently, you have it as "void Display()" in your BOM_TRANSACTION_DETAILS 
method declaration.  Change it to "public void Display()".  It might solve your 
problem.

No need to change method declaration in the interface as it's correct.

-Chris

On Dec 2, 2009, at 1:35 AM, Deepak Jambhekar wrote:



Hi

I have created a rule which is as below
rule "myrule"

dialect "mvel"

when

tr : BOM_TRANSACTION_DETAILS( country == "CH" )

then

tr.setCarrierName( "orange" );

tr.Display();
end

And the Model class is defined as below...

interface Generalized
{

void Display();


}

public class BOM_TRANSACTION_DETAILS implements Generalized {
  getter and setter.
  void Display()

{

.

}
}


Now when I run this rule, it is giving me the following exception . Can any one 
please help me why this exception is coming? and also when I removed the 
Display() from interface Generalized the code works fine...
So is this because of Interface?? Can we use interface for defining Models..??

org.drools.runtime.rule.ConsequenceException : [Error: tr.Display(): Class 
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer can not access a 
member of class com.drools.icas.transaction.Generalized with modifiers "public 
abstract"]
[Near : {... Unknown }]
 ^
[Line: 1, Column: 0]

at 
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(
 DefaultConsequenceExceptionHandler.java:23 )

at org.drools.common.DefaultAgenda.fireActivation( DefaultAgenda.java:943 )

at org.drools.common.DefaultAgenda.fireNextItem( DefaultAgenda.java:885 )

at org.drools.common.DefaultAgenda.fireAllRules( DefaultAgenda.java:1082 )

at org.drools.common.AbstractWorkingMemory.fireAllRules( 
AbstractWorkingMemory.java:682 )

at org.drools.common.AbstractWorkingMemory.fireAllRules( 
AbstractWorkingMemory.java:649 )

at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules( 
StatefulKnowledgeSessionImpl.java:177 )

at com.drools.icas.transaction.DemoTest.main( DemoTest.java:92 )
Caused by: [Error: tr.Display(): Class 
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer can not access a 
member of class com.drools.icas.transaction.Generalized with modifiers "public 
abstract"]
[Near : {... Unknown }]
 ^
[Line: 1, Column: 0]

at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain( 
ReflectiveAccessorOptimizer.java:382 )

at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor( 
ReflectiveAccessorOptimizer.java:140 )

at org.mvel2.ast.ASTNode.getReducedValueAccelerated( ASTNode.java:137 )

at org.mvel2.MVELRuntime.execute( MVELRuntime.java:91 )

at org.mvel2.compiler.CompiledExpression.getValue( CompiledExpression.java:101 )

at org.mvel2.MVEL.executeExpression( MVEL.java:968 )

at org.drools.base.mvel.MVELConsequence.evaluate( MVELConsequence.java:89 )

at org.drools.common.DefaultAgenda.fireActivation( DefaultAgenda.java:934 )

... 6 more
Caused by: java.lang.IllegalAccessException : Class 
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer can not access a 
member of class com.drools.icas.transaction.Generalized with modifiers "public 
abstract"

at sun.reflect.Reflection.ensureMemberAccess( Reflection.java:65 )

at java.lang.reflect.Method.invoke( Method.java:583 )

at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod( 
ReflectiveAccessorOptimizer.java:936 )

at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain( 
ReflectiveAccessorOptimizer.java:321 )

... 13 more



Thanks

Deepak  Jambhekar
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictl

Re: [rules-users] Drools Flow 5.1 - Update JPA Entity - while workitem is in pending state - variable persistence strategy

2009-11-25 Thread Vijay K Pandey
Thanks Kris. That's what I thought later on after your first mail on this 
topic. So I did got the JPA entity persisted/merged after retrieving the 
entitymanagerfactory from the working memory's environment and got it done 
through the JPA transaction - I will refactor this to use the JPA command 
service so that I don't have to deal with transaction et all.



-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Wednesday, November 25, 2009 10:06 AM
To: Rules Users List; Vijay K Pandey
Cc: Rules Users List
Subject: Re: [rules-users] Drools Flow 5.1 - Update JPA Entity - while workitem 
is in pending state - variable persistence strategy



Quoting Vijay K Pandey :



> > c)I would like to change it through Drools Process because that's

> where I have associated the JPA entities - I would not like to update

> it from outside.



Not sure this is a problem.  You merely create an association to these

JPA entities (assuming we implement the pluggable persistence strategy

here as well).  And the engine is only interested in the start and

completion of the work item, not really in anything that happens in

between.  So I don't think updating the JPA entities from outside the

engine should be considered a problem.



In theory you could easily update the work item, we simply don't have a

command for that implemented.  If you would write a command that can

then be executed inside a transaction using the JPA command service,

those changes would be persisted.



Kris



Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

___

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow 5.1 - How to get hold of WorkingMemory inside the WorkItemHandler

2009-11-23 Thread Vijay K Pandey
Yep you made me think twice and looks like I can get this done with the new 
session AP, I wanted to get hold of the EntityManagerFactory and the current 
EntityManager set in the environment.

Vijay

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Monday, November 23, 2009 7:03 PM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1 - How to get hold of WorkingMemory 
inside the WorkItemHandler

Yes, but why do you need a reference to the old WorkingMemory interface?
What do you want to do with it that you can't to using the new public
session API?

Kris

Quoting Vijay K Pandey :

> Thanks Kris. I hope this is the right way of getting hold of the
> WorkingMemory before we call the startProcess method on the session.
>
>
> StatefulKnowledgeSession ksession =
> JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );
>
> CommandBasedStatefulKnowledgeSession sess =
> (CommandBasedStatefulKnowledgeSession)ksession;
>
>   StatefulKnowledgeSessionImpl sessImpl =
> (StatefulKnowledgeSessionImpl) ((KnowledgeCommandContext)
> sess.getCommandService().getContext()).getStatefulKnowledgesession();
>
> WorkingMemory wm = sessImpl.session;
>
>
>
> Vijay
>
>
>
> -Original Message-
> From: rules-users-boun...@lists.jboss.org
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris
> Verlaenen
> Sent: Sunday, November 22, 2009 8:29 PM
> To: Rules Users List; Vijay K Pandey
> Subject: Re: [rules-users] Drools Flow 5.1 - How to get hold of
> WorkingMemory inside the WorkItemHandler
>
>
>
> No, not really.  But you can easily set / inject this working memory
>
> when instantiating your work item handler, so you can use this
> reference
>
> later.
>
>
>
> Kris
>
>
>
> Quoting Vijay K Pandey :
>
>
>
> > Hi,
>
> >
>
> > In Drools Flow (5.1) is there any way of getting hold of the
>
> > org.drools.WorkingMemory inside the WorkItemHandler?
>
> >
>
> > Thanks
>
> > Vijay
>
> >
>
>
>
>
>
>
>
>
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>
> ___
>
> rules-users mailing list
>
> rules-users@lists.jboss.org
>
> https://lists.jboss.org/mailman/listinfo/rules-users
>




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow 5.1 - Update JPA Entity - while workitem is in pending state - variable persistence strategy

2009-11-23 Thread Vijay K Pandey
This is what we are trying to solve.



a)A process has been started - then it reaches the workitem and the process 
waits there - and the thread ends.

b)Now in a different thread after few days/or few hours - system gets some 
data from external application and has to update the workitem related content - 
we have to set it outside of the binary content of workiteminfo as we need to 
have a query (sql,ejb-ql)working against this set of updated data.

c)I would like to change it through Drools Process because that's where I 
have associated the JPA entities - I would not like to update it from outside.

d)After the update has been done - may be after few/hrs - the work item 
will be completed/aborted based on the updated data.

e)So should I try with "setVariable" - as such there won't be any execution 
happening while updating the entity on that process instance?



Any recommendation on this?



Thanks

Vijay



-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Monday, November 23, 2009 7:10 PM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1 - Update JPA Entity - while workitem 
is in pending state - variable persistence strategy



You want to change the JPA entities themselves?  Do you still have a

reference to them?  Simply changing them would probably work (or what is

it you are trying to do)?  Or you could look them up using the

getVariable() method.  In theory you could also use the setVariable()

method but that is not in the public API as you shouldn't be changing

variables in the middle of execution.



Kris



Quoting Vijay K Pandey :



> Hi,

>

> In Drools Flow (5.1) , if for a work item "Wait For Completion" is

> true - what is the best way of updating the variables (JPA entities)

> configured through the Variable Persistence strategy - from a session

> (loaded through JPAKnowledgeService) while the work item is in the

> "Pending" state. These variables (JPA entities) were passed to the

> "startProcess" method of the session (StatefulKnowledgeSession) when

> the process was earlier started.

>

> Thanks

> Vijay

>









Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

___

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Flow 5.1 - Update JPA Entity - while workitem is in pending state - variable persistence strategy

2009-11-23 Thread Vijay K Pandey
Hi,

In Drools Flow (5.1) , if for a work item "Wait For Completion" is true - what 
is the best way of updating the variables (JPA entities) configured through the 
Variable Persistence strategy - from a session (loaded through 
JPAKnowledgeService) while the work item is in the "Pending" state. These 
variables (JPA entities) were passed to the "startProcess" method of the 
session (StatefulKnowledgeSession) when the process was earlier started.

Thanks
Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow 5.1 - How to get hold of WorkingMemory inside the WorkItemHandler

2009-11-23 Thread Vijay K Pandey
Thanks Kris. I hope this is the right way of getting hold of the WorkingMemory 
before we call the startProcess method on the session.


StatefulKnowledgeSession ksession = 
JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );

CommandBasedStatefulKnowledgeSession sess = 
(CommandBasedStatefulKnowledgeSession)ksession;

  StatefulKnowledgeSessionImpl sessImpl =  (StatefulKnowledgeSessionImpl) 
((KnowledgeCommandContext)
sess.getCommandService().getContext()).getStatefulKnowledgesession();

WorkingMemory wm = sessImpl.session;



Vijay



-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Sunday, November 22, 2009 8:29 PM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1 - How to get hold of WorkingMemory 
inside the WorkItemHandler



No, not really.  But you can easily set / inject this working memory

when instantiating your work item handler, so you can use this reference

later.



Kris



Quoting Vijay K Pandey :



> Hi,

>

> In Drools Flow (5.1) is there any way of getting hold of the

> org.drools.WorkingMemory inside the WorkItemHandler?

>

> Thanks

> Vijay

>









Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

___

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow 5.1.0.M1 - Persistence - WorkItemInfo Entity

2009-11-23 Thread Vijay K Pandey
Thanks Kris.

This will be wonderful as I have to associate some domain objects (JPA 
entities) at the work item level.



Vijay

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Sunday, November 22, 2009 8:10 PM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Persistence - WorkItemInfo 
Entity



It is correct that the WorkItemInfo object embeds the values of its

parameters.  We coudl extend that the same way we do for process

instances and variables, to make sure you can use pluggable persistence

for work item parameters as well.  I opened a JIRA for this:

https://jira.jboss.org/jira/browse/JBRULES-2345



Kris



Quoting Vijay K Pandey :



> If "a" is correct - may be I can customize the "JPAWorkItemManager"

> for my usage? Am I on the right path or I am missing something.

>

> Thanks

> Vijay

> 

> From: rules-users-boun...@lists.jboss.org

> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Vijay K

> Pandey

> Sent: Wednesday, November 18, 2009 4:15 PM

> To: Rules Users List

> Subject: [rules-users] Drools Flow 5.1.0.M1 - Persistence -

> WorkItemInfo Entity

>

> I have a question related to the (Drools Flow 5.1.0.M1 - Persistence)

> on the data that gets stored as part of the

> org.drools.persistence.processinstance.WorkItemInfo.

>

> a)   If I am using variable persistence strategy - and I pass a

> JPA Entity(stored in its own table) to a session.startProcess("",

> map) and map this entity variable to a parameter in the work item

> node - then this entity will get stored in the WorkItemInfo table as

> a part of the serialized form in the column (workItemByteArray). So

> if that is true we have got the same data stored twice? Is this

> correct?

> b)   If "a" is true how can we avoid storing in the WorkItemInfo

> - is there somehow we can map the JPA entity to the WorkItemInfo - so

> that it doesn't gets stored twice?

>

>

> Thanks

> Vijay

>









Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

___

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Human Task Question on Mina client / server

2009-11-20 Thread Vijay K Pandey
Instead of "Approve" it should be "Human Task" in the below code

wm.registerWorkItemHandler("Approve", approveTask);



From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Todd Pagni
Sent: Friday, November 20, 2009 3:11 PM
To: Rules Users List
Subject: Re: [rules-users] Human Task Question on Mina client / server

Starting the server first does not fix the issue.   I still see the following 
error in the log also: [STDERR] Could not find work item handler for Human Task

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Salaboy
Sent: Friday, November 20, 2009 2:03 PM
To: Rules Users List
Cc: 
Subject: Re: [rules-users] Human Task Question on Mina client / server

You need to start the Mina server before starting the process

- Ing. Mauricio Salatino -

On Nov 20, 2009, at 6:45 PM, "Todd Pagni" 
mailto:todd.pa...@datacert.com>> wrote:
I am creating a human task in a flow, but I am unable to get the human task in 
the Mina client.  Should items that enter a humanTaskNode go into the task 
table in addition to the workItemInfo table?  Do I need to do anything to get 
the work item set as a potential owner for Administrator so it is returned to 
the Mina client?

I running drools 5.0.1 in JBoss:


1.   Create the human task node in the flow:


   addActionStep(factory, 
3).joinNode(4).type(Join.TYPE_XOR).done().humanTaskNode(5)
.name("Approve")
.actorId("Administrator")
.taskName("Approve")
.comment("hi")
.content("random content")


2.   Start the flow process (after this step I a row in the workItemInfo 
table):



  StatefulKnowledgeSession ksession = km.getSession(kb);



  WSHumanTaskHandler approveTask = new WSHumanTaskHandler();





  /*  Setup workitemmanager here? */

org.drools.runtime.process.WorkItemManager wm =  
ksession.getWorkItemManager();



wm.registerWorkItemHandler("Approve", approveTask);







ksession.setGlobal("entity", e);



ksession.startProcess(DuckFlowBuilder.PROCESS_NAME);



return ksession;



See the following in the log after this step:
14:37:15,349 INFO  [STDOUT] Hibernate: insert into SessionInfo (dirty, 
lastModificationDate, rulesByteArray, startDate) values (?, ?, ?, ?)
14:37:15,364 INFO  [STDOUT] Hibernate: insert into ProcessInstanceInfo 
(lastModificationDate, lastReadDate, processId, processInstanceByteArray, 
startDate, state, OPTLOCK) values (?, ?, ?, ?, ?, ?, ?)
14:37:15,364 INFO  [STDOUT] Entity name: Mallardes, Step: 3
14:37:15,364 INFO  [STDOUT] Hibernate: insert into WorkItemInfo (creationDate, 
name, processInstanceId, state, OPTLOCK, workItemByteArray) values (?, ?, ?, ?, 
?, ?)
14:37:15,364 ERROR [STDERR] Could not find work item handler for Human Task
14:37:15,364 INFO  [STDOUT] Hibernate: update ProcessInstanceInfo set 
lastModificationDate=?, lastReadDate=?, processId=?, 
processInstanceByteArray=?, startDate=?, state=?, OPTLOCK=? where 
processInstanceId=? and OPTLOCK=?
14:37:15,364 INFO  [STDOUT] Hibernate: update WorkItemInfo set creationDate=?, 
name=?, processInstanceId=?, state=?, OPTLOCK=?, workItemByteArray=? where 
workItemId=? and OPTLOCK=?

14:37:15,364 INFO  [STDOUT] Hibernate: update SessionInfo set dirty=?, 
lastModificationDate=?, rulesByteArray=?, startDate=? where id=?



3.   Start the mina server (don't see anything in the task table)

  EntityManagerFactory emf = 
Persistence.createEntityManagerFactory("org.drools.task");
 taskService = new 
TaskService(emf,SystemEventListenerFactory.getSystemEventListener())
 server = new MinaTaskServer( taskService );
Thread thread = new Thread( server );
thread.start();
Thread.sleep( 500 );
System.out.println("Server started ...");


4.   Run the mina client (no results returned)
   BlockingTaskSummaryResponseHandler summaryHandler =
   new BlockingTaskSummaryResponseHandler()
   client.getTasksAssignedAsPotentialOwner("Administrator", 
"en-UK",summaryHandler);

   List tasks = summaryHandler.getResults();


Thanks,
Todd
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow 5.1.0.M1 - org.drools.audit.event.LogEvent

2009-11-20 Thread Vijay K Pandey
Thanks Kris for clarifying it.

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Friday, November 20, 2009 10:28 AM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - 
org.drools.audit.event.LogEvent

The idea was to have human task related events as separate events in the
audit logs.  But as far as I know, these have not yet been integrated,
and are not used yet.

Kris

Quoting Vijay K Pandey :

> I was going through the org.drools.audit.event.LogEvent class and
> have a question on the following values and what kind of events they
> relate to - are they related to "Human Task" or something else
>
>
> public static final int BEFORE_TASK_INSTANCE_CREATED=
> 28;
> public static final int AFTER_TASK_INSTANCE_CREATED =
> 29;
> public static final int BEFORE_TASK_INSTANCE_COMPLETED  =
> 30;
> public static final int AFTER_TASK_INSTANCE_COMPLETED   =
> 31;
>
>
>
> Thanks
>
> Vijay
>




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Flow 5.1 - How to get hold of WorkingMemory inside the WorkItemHandler

2009-11-19 Thread Vijay K Pandey
Hi,

In Drools Flow (5.1) is there any way of getting hold of the 
org.drools.WorkingMemory inside the WorkItemHandler?

Thanks
Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How do I resume a paused process?

2009-11-19 Thread Vijay K Pandey
You need to have at least the process instance id or the work item id to get 
your things done.



session.startProcess("processName");  This will always starts a new process



You have to get hold of your process instance or you can directly complete the 
work item if you have the work item id.



StatefulKnowledgeSession ksession = 
JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase, null,
getEnvironment());

WorkflowProcessInstance inst = 
(WorkflowProcessInstance)ksession.getProcessInstance(<>);

get hold of the work item and complete it

  OR
If you have the work item id already you can do this directly

ksession.getWorkItemManager().completeWorkItem(<>, null);





-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Scott Stevenson
Sent: Thursday, November 19, 2009 11:00 AM
To: Rules Users List
Subject: [rules-users] How do I resume a paused process?



I have a process that pauses after a few nodes are executed because it

reaches a Human Task node. I retrieve the persisted session with the

following code:



JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase, null,

getEnvironment());



Once I have this session object I'm not sure how to resume the paused

process? I want to signal the Human Task work item as complete and have

the process resume at that point. I've tried this code:



WorkItemManager wm = session.getWorkItemManager();

wm.registerWorkItemHandler("Approve", new WSHumanTaskHandler());

WorkflowProcessInstance pi = (WorkflowProcessInstance)

session.startProcess("processName");



Object[] nodes = pi.getNodeInstances().toArray();

WorkItem wi = ((HumanTaskNodeInstance) nodes[0]).getWorkItem();

wm.completeWorkItem(wi.getId(), null);

session.dispose();



The result of this is that the workflow restarts from the first node and

completes to the end. I expected that the workflow would start at the

persisted location. What am I missing here?





Scott Stevenson



___

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow :Persistence Problem : Restore StatefulKnowledgeSession from database

2009-11-18 Thread Vijay K Pandey
I don't understand what you meant by storing the HttpServletRequest object? 
With the default marshalling strategy for JPA in place I don't think you can 
insert a non serializable object?  How come this piece of code is working fine 
at your end?
loadSession.insert(request);

Which set of objects are you looking from the request? May be you want to get 
hold of the request parameter map  -- or create a list of  attribute map and 
insert those instead of HttpServletRequest object

Am I missing something of what you meant in your email?

From: pardeep.ru...@lntinfotech.com [mailto:pardeep.ru...@lntinfotech.com]
Sent: Wednesday, November 18, 2009 10:15 PM
To: Vijay K Pandey; rules-users@lists.jboss.org
Cc: kris.verlae...@cs.kuleuven.be
Subject: RE: [rules-users] Drools Flow :Persistence Problem : Restore 
StatefulKnowledgeSession from database


Hi Vijay,
Thanks for your reply.
The problem is that object that I am inserting it into the session object is 
NOT serializable, as you know HttpServletRequest object is not serializable.
So because of this I am not able to store this object into the database.
So that's why I am asking how can i do this if my object is not serilizable.


Thanks & Regards

Pardeep Ruhil
nt (s) If you are not the intended recipient, please do not use or disseminate 
the information, notify the sender and delete it from your system.

Vijay K Pandey 

11/18/2009 10:56 PM

To

"pardeep.ru...@lntinfotech.com" , 
"rules-users@lists.jboss.org" 

cc

"kris.verlae...@cs.kuleuven.be" 

Subject

RE: [rules-users] Drools Flow :Persistence Problem : Restore 
StatefulKnowledgeSession from database










You have to load the same 'StatefulKnowledgeSession' in which you have inserted 
your objects. The inserted objects are serialized and stored in the column 
"rules_byte_array" of the session_info table.

So you have to load the same session - to get to your inserted objects.

There is a difference the way process map objects are handled - such as

Map parameters = new HashMap();
parameters.put("x", "hello");
parameters.put("y", "hey I am y");
ksession.startProcess( "myprocess", parameters );

In the above case the parameters are not stored as part of the "session info" 
table. These are stored separately like in "process instance info" table + 
(some/other tables if you use variable persistence strategy)- so if you don't 
have the rules which are based on the objects you are inserting - you can get 
the same done through process parameters in which case you can get hold of the 
process instance through  any new session or the same session and then its 
parameters.

Vijay



From: pardeep.ru...@lntinfotech.com [mailto:pardeep.ru...@lntinfotech.com]
Sent: Wednesday, November 18, 2009 12:38 AM
To: rules-users@lists.jboss.org
Cc: kris.verlae...@cs.kuleuven.be; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow :Persistence Problem : Restore 
StatefulKnowledgeSession from database


Hi Kris,
Thanks for you valuable input and Vijay of course clearing some of my doubts by 
asking question on this.

Much of my doubt are clear except one.
When we are reloading the StatefulKnowledgeSession from the database using the 
below line

StatefulKnowledgeSession loadSession= 
JPAKnowledgeService.loadStatefulKnowledgeSession(id, kbase, null, env);

This session object is different from the one that is created when we first 
created
StatefulknowledgeSession object using

StatefulKnowledgeSession initialSession= 
JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);

Am I right ?

Now In my case I have a HumanWorkItemHandler class for handling the humantask 
and there is ActionWorkITemHandler for my customAction workItem, which both are 
initailsed with the initialSession object.
Now when I load the session from the database to complete the 
HumanWorkItemHandler task I got a different session object i.e. loadSession.
Now when I insert something in the loadsession using  
loadSession.insert(request); So that I can use the same in 
ActionWorkItemHandler to exceute the action for the request.
I am not able to retrieve the same request object i.e. (HttpServletRequest) 
from the session in ActionWorkItemHandler
as when i do
   Collection obj = loadSession.getObject();
I get request as null.   Because this loadSession is different from the one I 
have inserted.

Kindly help in this, or I have misunderstood the concept.

Thanks & Regards

Pardeep Ruhil
Kris Verlaenen 

11/17/2009 04:17 PM


To

Rules Users List , Vijay K Pandey 


cc

"pardeep.ru...@lntinfotech.com" 

Subject

Re: [rules-users] Drools Flow :Persistence Problem : Restore 
StatefulKnowledgeSession from database














Preferably you should cache the session itself as well (so you

Re: [rules-users] Drools Flow 5.1.0.M1 - Persistence - WorkItemInfo Entity

2009-11-18 Thread Vijay K Pandey
I just ran a test one having the JPA entity and another test without the JPA 
entity and compared the 'workItemByteArray' - looks like they are same - so I 
guess these variables are not saved again as part of workiteminfo.

Another question on this is there some good way to associate a JPA entity with 
the workitem? Currently the association is only with the Process Instance Info? 
Is there any work around to associate it with the WorkItemInfo - so that this 
JPA entity can be queried through the 'work item info id'?

Thanks
Vijay

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mauricio Salatino
Sent: Wednesday, November 18, 2009 5:47 PM
To: Rules Users List
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Persistence - WorkItemInfo 
Entity

 I don't think so, I don't have the code here, but for what I remember all the 
contextInstances that contains variables are scanned in order to expternalize 
the variable persistence.
I will take a look at that when I have the code handy.
Greetings.
2009/11/18 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>
The JPA entity is getting stored properly in its own table through variable 
persistent strategy - but will the same entity also get stored as part of the 
serialized form in the column (workItemByteArray) of entity WorkItemInfo.


From: 
rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> 
[mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>]
 On Behalf Of Mauricio Salatino
Sent: Wednesday, November 18, 2009 4:40 PM
To: Rules Users List
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Persistence - WorkItemInfo 
Entity

Hmm .. for what I remember the variables if are configured to be persisted 
using JPA using the Strategies, probably are externalized. Are you sure that 
are not being persisted with variable persistence strategy rigth now?
2009/11/18 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>
If "a" is correct - may be I can customize the "JPAWorkItemManager" for my 
usage? Am I on the right path or I am missing something.

Thanks
Vijay

From: 
rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> 
[mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>]
 On Behalf Of Vijay K Pandey
Sent: Wednesday, November 18, 2009 4:15 PM
To: Rules Users List
Subject: [rules-users] Drools Flow 5.1.0.M1 - Persistence - WorkItemInfo Entity

I have a question related to the (Drools Flow 5.1.0.M1 - Persistence) on the 
data that gets stored as part of the 
org.drools.persistence.processinstance.WorkItemInfo.

a)   If I am using variable persistence strategy - and I pass a JPA 
Entity(stored in its own table) to a session.startProcess("", map) and map this 
entity variable to a parameter in the work item node - then this entity will 
get stored in the WorkItemInfo table as a part of the serialized form in the 
column (workItemByteArray). So if that is true we have got the same data stored 
twice? Is this correct?
b)   If "a" is true how can we avoid storing in the WorkItemInfo - is there 
somehow we can map the JPA entity to the WorkItemInfo - so that it doesn't gets 
stored twice?


Thanks
Vijay

___
rules-users mailing list
rules-users@lists.jboss.org<mailto: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<mailto: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 5.1.0.M1 - Persistence - WorkItemInfo Entity

2009-11-18 Thread Vijay K Pandey
The JPA entity is getting stored properly in its own table through variable 
persistent strategy - but will the same entity also get stored as part of the 
serialized form in the column (workItemByteArray) of entity WorkItemInfo.


From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mauricio Salatino
Sent: Wednesday, November 18, 2009 4:40 PM
To: Rules Users List
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Persistence - WorkItemInfo 
Entity

Hmm .. for what I remember the variables if are configured to be persisted 
using JPA using the Strategies, probably are externalized. Are you sure that 
are not being persisted with variable persistence strategy rigth now?
2009/11/18 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>
If "a" is correct - may be I can customize the "JPAWorkItemManager" for my 
usage? Am I on the right path or I am missing something.

Thanks
Vijay

From: 
rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> 
[mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>]
 On Behalf Of Vijay K Pandey
Sent: Wednesday, November 18, 2009 4:15 PM
To: Rules Users List
Subject: [rules-users] Drools Flow 5.1.0.M1 - Persistence - WorkItemInfo Entity

I have a question related to the (Drools Flow 5.1.0.M1 - Persistence) on the 
data that gets stored as part of the 
org.drools.persistence.processinstance.WorkItemInfo.

a)   If I am using variable persistence strategy - and I pass a JPA 
Entity(stored in its own table) to a session.startProcess("", map) and map this 
entity variable to a parameter in the work item node - then this entity will 
get stored in the WorkItemInfo table as a part of the serialized form in the 
column (workItemByteArray). So if that is true we have got the same data stored 
twice? Is this correct?
b)   If "a" is true how can we avoid storing in the WorkItemInfo - is there 
somehow we can map the JPA entity to the WorkItemInfo - so that it doesn't gets 
stored twice?


Thanks
Vijay

___
rules-users mailing list
rules-users@lists.jboss.org<mailto: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 5.1.0.M1 - Persistence - WorkItemInfo Entity

2009-11-18 Thread Vijay K Pandey
If "a" is correct - may be I can customize the "JPAWorkItemManager" for my 
usage? Am I on the right path or I am missing something.

Thanks
Vijay

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Vijay K Pandey
Sent: Wednesday, November 18, 2009 4:15 PM
To: Rules Users List
Subject: [rules-users] Drools Flow 5.1.0.M1 - Persistence - WorkItemInfo Entity

I have a question related to the (Drools Flow 5.1.0.M1 - Persistence) on the 
data that gets stored as part of the 
org.drools.persistence.processinstance.WorkItemInfo.

a)   If I am using variable persistence strategy - and I pass a JPA 
Entity(stored in its own table) to a session.startProcess("", map) and map this 
entity variable to a parameter in the work item node - then this entity will 
get stored in the WorkItemInfo table as a part of the serialized form in the 
column (workItemByteArray). So if that is true we have got the same data stored 
twice? Is this correct?
b)   If "a" is true how can we avoid storing in the WorkItemInfo - is there 
somehow we can map the JPA entity to the WorkItemInfo - so that it doesn't gets 
stored twice?


Thanks
Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Flow 5.1.0.M1 - Persistence - WorkItemInfo Entity

2009-11-18 Thread Vijay K Pandey
I have a question related to the (Drools Flow 5.1.0.M1 - Persistence) on the 
data that gets stored as part of the 
org.drools.persistence.processinstance.WorkItemInfo.

a)   If I am using variable persistence strategy - and I pass a JPA 
Entity(stored in its own table) to a session.startProcess("", map) and map this 
entity variable to a parameter in the work item node - then this entity will 
get stored in the WorkItemInfo table as a part of the serialized form in the 
column (workItemByteArray). So if that is true we have got the same data stored 
twice? Is this correct?
b)   If "a" is true how can we avoid storing in the WorkItemInfo - is there 
somehow we can map the JPA entity to the WorkItemInfo - so that it doesn't gets 
stored twice?


Thanks
Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow :Persistence Problem : Restore StatefulKnowledgeSession from database

2009-11-18 Thread Vijay K Pandey
You have to load the same 'StatefulKnowledgeSession' in which you have inserted 
your objects. The inserted objects are serialized and stored in the column 
"rules_byte_array" of the session_info table.

So you have to load the same session - to get to your inserted objects.

There is a difference the way process map objects are handled - such as

Map parameters = new HashMap();
parameters.put("x", "hello");
parameters.put("y", "hey I am y");
ksession.startProcess( "myprocess", parameters );

In the above case the parameters are not stored as part of the "session info" 
table. These are stored separately like in "process instance info" table + 
(some/other tables if you use variable persistence strategy)- so if you don't 
have the rules which are based on the objects you are inserting - you can get 
the same done through process parameters in which case you can get hold of the 
process instance through  any new session or the same session and then its 
parameters.

Vijay

From: pardeep.ru...@lntinfotech.com [mailto:pardeep.ru...@lntinfotech.com]
Sent: Wednesday, November 18, 2009 12:38 AM
To: rules-users@lists.jboss.org
Cc: kris.verlae...@cs.kuleuven.be; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow :Persistence Problem : Restore 
StatefulKnowledgeSession from database


Hi Kris,
Thanks for you valuable input and Vijay of course clearing some of my doubts by 
asking question on this.

Much of my doubt are clear except one.
When we are reloading the StatefulKnowledgeSession from the database using the 
below line

StatefulKnowledgeSession loadSession= 
JPAKnowledgeService.loadStatefulKnowledgeSession(id, kbase, null, env);

This session object is different from the one that is created when we first 
created
StatefulknowledgeSession object using

 StatefulKnowledgeSession initialSession= 
JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);

Am I right ?

Now In my case I have a HumanWorkItemHandler class for handling the humantask 
and there is ActionWorkITemHandler for my customAction workItem, which both are 
initailsed with the initialSession object.
Now when I load the session from the database to complete the 
HumanWorkItemHandler task I got a different session object i.e. loadSession.
Now when I insert something in the loadsession using  
loadSession.insert(request); So that I can use the same in 
ActionWorkItemHandler to exceute the action for the request.
I am not able to retrieve the same request object i.e. (HttpServletRequest) 
from the session in ActionWorkItemHandler
as when i do
Collection obj = loadSession.getObject();
I get request as null.   Because this loadSession is different from the one I 
have inserted.

Kindly help in this, or I have misunderstood the concept.

Thanks & Regards

Pardeep Ruhil


Kris Verlaenen 

11/17/2009 04:17 PM

To

Rules Users List , Vijay K Pandey 


cc

"pardeep.ru...@lntinfotech.com" 

Subject

Re: [rules-users] Drools Flow :Persistence Problem : Restore 
StatefulKnowledgeSession from database










Preferably you should cache the session itself as well (so you don't
have to recreate it all the time) and reuse that across you application.
 Or you could have multiple independent sessions as well.  If you store
the key of the session somewhere, you can easily restore this session
(or sessions) after failure.

Kris

Quoting Vijay K Pandey :

> Let's say where we don't need timers - in those cases one can create
> (create only if its not there) a global session (create the
> sessioninfo at the drools startup - store the session primary key
> somewhere) - reuse this session across everywhere?
>
> Vijay
> -Original Message-
> From: rules-users-boun...@lists.jboss.org
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris
> Verlaenen
> Sent: Monday, November 16, 2009 5:12 PM
> To: Rules Users List; pardeep.ru...@lntinfotech.com
> Subject: Re: [rules-users] Drools Flow :Persistence Problem : Restore
> StatefulKnowledgeSession from database
>
> Pardeep,
>
> The behavior you are describing is indeed correct.  The session in
> this
> case is a global session, meaning that it will be used for all
> process
> instances.  Note however that, unless you are using timers, all
> other
> state (process instance state, work items, etc.) is persisted
> separately
> and the session state will basically be empty.
>
> It is also possible to have one session per process instance (or
> whatever partitioning you like).  A session has a unique id (which
> you
> can specify when reloading the session).  You'll then have to load
> the
> right session before continuing the execution of your process
> instance.
>
> Kris
>
> Quoting 

[rules-users] Drools Flow 5.1.0.M1 - org.drools.audit.event.LogEvent

2009-11-17 Thread Vijay K Pandey
I was going through the org.drools.audit.event.LogEvent class and have a 
question on the following values and what kind of events they relate to - are 
they related to "Human Task" or something else


public static final int BEFORE_TASK_INSTANCE_CREATED= 28;
public static final int AFTER_TASK_INSTANCE_CREATED = 29;
public static final int BEFORE_TASK_INSTANCE_COMPLETED  = 30;
public static final int AFTER_TASK_INSTANCE_COMPLETED   = 31;



Thanks

Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow :Persistence Problem : Restore StatefulKnowledgeSession from database

2009-11-17 Thread Vijay K Pandey
Is session (StatefulKnowledgeSession) thread safe?

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Tuesday, November 17, 2009 4:48 AM
To: Rules Users List; Vijay K Pandey
Cc: pardeep.ru...@lntinfotech.com
Subject: Re: [rules-users] Drools Flow :Persistence Problem : Restore 
StatefulKnowledgeSession from database

Preferably you should cache the session itself as well (so you don't
have to recreate it all the time) and reuse that across you application.
  Or you could have multiple independent sessions as well.  If you store
the key of the session somewhere, you can easily restore this session
(or sessions) after failure.

Kris

Quoting Vijay K Pandey :

> Let's say where we don't need timers - in those cases one can create
> (create only if its not there) a global session (create the
> sessioninfo at the drools startup - store the session primary key
> somewhere) - reuse this session across everywhere?
>
> Vijay
> -Original Message-
> From: rules-users-boun...@lists.jboss.org
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris
> Verlaenen
> Sent: Monday, November 16, 2009 5:12 PM
> To: Rules Users List; pardeep.ru...@lntinfotech.com
> Subject: Re: [rules-users] Drools Flow :Persistence Problem : Restore
> StatefulKnowledgeSession from database
>
> Pardeep,
>
> The behavior you are describing is indeed correct.  The session in
> this
> case is a global session, meaning that it will be used for all
> process
> instances.  Note however that, unless you are using timers, all
> other
> state (process instance state, work items, etc.) is persisted
> separately
> and the session state will basically be empty.
>
> It is also possible to have one session per process instance (or
> whatever partitioning you like).  A session has a unique id (which
> you
> can specify when reloading the session).  You'll then have to load
> the
> right session before continuing the execution of your process
> instance.
>
> Kris
>
> Quoting pardeep.ru...@lntinfotech.com:
>
> > Hi Salaboy,
> > Thanks for you replying.
> > Yes, of course it is storing multiple process instance Id in the
> > database.
> > But, what I feel is that it will fail when I am trying to run two
> > workflow
> > at the same time simultaneously, using the same code by
> dynamically
> > providing the workflow name and the parameters for each of them.
> > Ideally there should be two entries for the
> StatfulKnowledgeSession
> > object
> > because when I try to load the StatefulKnowledgeSession object
> from
> > the
> > database it will give me the session object of the workflow which
> is
> > last
> > executed.
> >
> > For example lets  suppose I have two workflow 1 and 2 having two
> > humantask
> > in each of them . So when I finish the first Human Task of both
> > workflow
> > one by one.  SessionInfo  present in the database is of workflow 2
> > (if 2
> > is executed last). Because there is no field in the sessioninfo
> > entity of
> > the database regarding to which workflow it belongs to. Am I right
> ?
> > So when I  try to finish the 1st workflow by executing the 2nd
> > humantask
> > left in it , I need to reload the StatfulKnowledgeSession object
> from
> > the
> > database. As there is no way of distinguishing that the session
> > object
> > store in the database is of which workflow , there might be a
> problem
> > as I
> > may get the ksession object of 2nd workflow.
> >
> > In case of Process Instance it is fine , because there is a field
> > 'processId' which will distinguish which processInstanceId belongs
> to
> >
> > which worklowId or processId.
> > But in case of Session , there is noting as such.
> > I don't what I am saying is handled in drools persistence. Please
> let
> > me
> > know if it there or not.
> >
> > Thanks & Regards
> >
> > Pardeep Ruhil
> >
> >
> >
> __
>
>
>
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow :Persistence Problem : Restore StatefulKnowledgeSession from database

2009-11-16 Thread Vijay K Pandey
Let's say where we don't need timers - in those cases one can create (create 
only if its not there) a global session (create the sessioninfo at the drools 
startup - store the session primary key somewhere) - reuse this session across 
everywhere?

Vijay
-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Monday, November 16, 2009 5:12 PM
To: Rules Users List; pardeep.ru...@lntinfotech.com
Subject: Re: [rules-users] Drools Flow :Persistence Problem : Restore 
StatefulKnowledgeSession from database

Pardeep,

The behavior you are describing is indeed correct.  The session in this
case is a global session, meaning that it will be used for all process
instances.  Note however that, unless you are using timers, all other
state (process instance state, work items, etc.) is persisted separately
and the session state will basically be empty.

It is also possible to have one session per process instance (or
whatever partitioning you like).  A session has a unique id (which you
can specify when reloading the session).  You'll then have to load the
right session before continuing the execution of your process instance.

Kris

Quoting pardeep.ru...@lntinfotech.com:

> Hi Salaboy,
> Thanks for you replying.
> Yes, of course it is storing multiple process instance Id in the
> database.
> But, what I feel is that it will fail when I am trying to run two
> workflow
> at the same time simultaneously, using the same code by dynamically
> providing the workflow name and the parameters for each of them.
> Ideally there should be two entries for the StatfulKnowledgeSession
> object
> because when I try to load the StatefulKnowledgeSession object from
> the
> database it will give me the session object of the workflow which is
> last
> executed.
>
> For example lets  suppose I have two workflow 1 and 2 having two
> humantask
> in each of them . So when I finish the first Human Task of both
> workflow
> one by one.  SessionInfo  present in the database is of workflow 2
> (if 2
> is executed last). Because there is no field in the sessioninfo
> entity of
> the database regarding to which workflow it belongs to. Am I right ?
> So when I  try to finish the 1st workflow by executing the 2nd
> humantask
> left in it , I need to reload the StatfulKnowledgeSession object from
> the
> database. As there is no way of distinguishing that the session
> object
> store in the database is of which workflow , there might be a problem
> as I
> may get the ksession object of 2nd workflow.
>
> In case of Process Instance it is fine , because there is a field
> 'processId' which will distinguish which processInstanceId belongs to
>
> which worklowId or processId.
> But in case of Session , there is noting as such.
> I don't what I am saying is handled in drools persistence. Please let
> me
> know if it there or not.
>
> Thanks & Regards
>
> Pardeep Ruhil
>
>
> __




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow 5.1.0.M1 - Pooling of WSHumanTaskHandler and MinaTaskClient - IoSession

2009-11-15 Thread Vijay K Pandey
Thanks Kris. I had planned to change the WSHumanTaskHandler as I also needed to 
provide deadlines/escalation/notification data while creating the task.

Vijay
-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Sunday, November 15, 2009 6:46 PM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Pooling of WSHumanTaskHandler 
and MinaTaskClient - IoSession

Yes, definitely making sense.

In your case, it seems like the task completion event (registered using
an event listener) should not necessarily be handled by the session that
created the task, but that it would be useful to have a pool of session
for handling user requests and one for handling system events (like
timers or task completion events).  We are hoping to provide this kind
of flexibility (decoupling the event registration) when providing that
more generic communication between the engine and the task service.

But if it makes sense for now to share the same physical connection, you
can definitely tweak the WSHumanTaskHandler implementation.  These work
item handlers are simply the binding between the engine and the
underlying service and easy to change.

Kris

Quoting Vijay K Pandey :

> Thanks Kris. I did saw the connect method and saw that it only
> creates a new connection if the client is null, but my question was
> more at the level of "session" (StatefulKnowledgeSession) and
> MinaTaskClient creation.
>
>
>
> StatefulKnowledgeSession ksession =
> JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );
>
> ksession.getWorkItemManager().registerWorkItemHandler("Human
> Task", new WSHumanTaskHandler());
>
>
>
> So with each StatefulKnowledgeSession - we will have a new "connect".
> I think pooling the WSHumanTaskHandler would not make any sense bcoz
> the executeWorkItem method registers the MinaTaskClient with the
> MinaTaskServer for several events.
>
>
>
> Now another main component for us is the MinaTaskClient where we will
> be performing lots of operation where we won't register for any
> events. In that case I think we can pool the MinaTaskClient - may be
> even 1 MinaTaskClient can work for all the non registered client
> operations - as MINA IoSession is thread safe, need to make sure the
> IoFilter to be thread safe - but to be on better side we can pool
> MinaTaskClient.
>
>
>
> I hope I am making some sense? Do let me know your recommendation.
>
>
>
> Thanks
>
> Vijay
>
>
>
> -Original Message-
> From: rules-users-boun...@lists.jboss.org
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris
> Verlaenen
> Sent: Sunday, November 15, 2009 1:47 PM
> To: Rules Users List; Vijay K Pandey
> Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Pooling of
> WSHumanTaskHandler and MinaTaskClient - IoSession
>
>
>
> One WSHumanTaskHandler should cache the client, so that it does not
>
> recreate a new connection every time.  Note that, in the connect()
>
> method, you only create a new connection if the client is null.
>
>
>
> Kris
>
>
>
> Quoting Vijay K Pandey :
>
>
>
> > Hi,
>
> >
>
> > We have a web based application that currently deals with MQ
> Workflow
>
> > for all the WSHT related processes/tasks. We are in the process of
>
> > migrating to Drools Flow. In our current scenario we pool MQ
> workflow
>
> > session (through apache commons pooling) - and our hundreds of web
>
> > users use these sessions to get their word done (like starting a
> new
>
> > process, retrieving a task, complete/forwarding/terminating tasks
>
> > etc) - what we have seen is that in an 8hr window we have around
>
> > 20,000 calls to mq workflow (around 42 calls/minute) - and it
> scales
>
> > pretty good with mq workflow session pooling in place.
>
> >
>
> > Should I go ahead and extend WSHumanTaskHandler and MinaTaskClient
> so
>
> > that they don't go through "connect" on every operation and get
> the
>
> > MINA IoSession from some pool - as it might consume quite a bit of
>
> > resources/time consuming to have a separate physical connections
> for
>
> > each operation.
>
> >
>
> > Looking forward for your recommendations.
>
> >
>
> > Thanks
>
> > Vijay
>
> >
>
>
>
>
>
>
>
>
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>
> ___
>
> rules-users mailing list
>
> rules-users@lists.jboss.org
>
> https://lists.jboss.org/mailman/listinfo/rules-users
>




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - How to get the WorkItem change state after restart of MinaTaskServer

2009-11-15 Thread Vijay K Pandey
Thanks Kris. Will keep a tab on this JIRA.

Vijay
-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Sunday, November 15, 2009 1:33 PM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - How to get the 
WorkItem change state after restart of MinaTaskServer

Still under development:
https://jira.jboss.org/jira/browse/JBRULES-2002

Kris

Quoting Vijay K Pandey :

> Kris,
>
> Should I look into the latest snapshot regarding this? Is something
> already in place or will it be in some future releases?
>
> Thanks
> Vijay
> -Original Message-
> From: rules-users-boun...@lists.jboss.org
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris
> Verlaenen
> Sent: Friday, November 13, 2009 10:04 AM
> To: Rules Users List; Vijay K Pandey
> Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - How to
> get the WorkItem change state after restart of MinaTaskServer
>
> Vijay,
>
> The current implementation of the communication between the human
> task
> service and the engine is indeed not error-safe.  We are currently
> working on making a more stable communication foundation (where
> different communication technologies could be used) to solve this
> issue.
>
> Kris
>
> Quoting Vijay K Pandey :
>
> > Hi,
> >
> > I have the following simple process having the WSHT 'HumanTask'
> > (Drools Flow 5.1.0.M1)
> >
> > Start Node--> Human Task --> End Node
> >
> > Under the following scenario:
> >
> > a)   MinaTaskServer service is started
> > b)   Drools Flow Process is started - as it reaches the Human
> > Task ( having 'Wait for completion' as true) - following 4
> commands
> > are executed on the mina service
> >i.
> >  AddTaskRequest ---> This basically creates the task in the WSHT
> task
> > tables
> >  ii.
> > RegisterForEventRequest --> This is called 3 times to register for
> > following task events (TaskCompletedEvent, TaskFailedEvent,
> > TaskSkippedEvent)
> > c)   I guess the above 3 events (b ii) are registered for a
> > callback to the Drools process so that the 'work item' (related to
> > Human Task) state can be properly changed when the above 3 task
> event
> > occurs - and the drools process can move forward.
> >
> > Now my question is what if the Mina service has to be stopped in
> > between (task has been created but not yet reached the completed
> > status) - then we lose all the registered events (as these are not
> > persistent events) - now when we restart the Mina service we query
> > the task - and let's say we changed the state through "Reserved-->
> > InProgress-->Completed".  Now since the registered events are
> lost,
> > how does the work item will be marked as "completed" (as the
> > associated WSHT task has completed) so that the drools process can
> > move forward - basically end in this case?
> >
> > Any insight will be highly appreciated.
> >
> > Thanks
> > Vijay
> >
> >
>
>
>
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow 5.1.0.M1 - Pooling of WSHumanTaskHandler and MinaTaskClient - IoSession

2009-11-15 Thread Vijay K Pandey
Thanks Kris. I did saw the connect method and saw that it only creates a new 
connection if the client is null, but my question was more at the level of 
"session" (StatefulKnowledgeSession) and MinaTaskClient creation.



StatefulKnowledgeSession ksession = 
JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );

ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new 
WSHumanTaskHandler());



So with each StatefulKnowledgeSession - we will have a new "connect". I think 
pooling the WSHumanTaskHandler would not make any sense bcoz the 
executeWorkItem method registers the MinaTaskClient with the MinaTaskServer for 
several events.



Now another main component for us is the MinaTaskClient where we will be 
performing lots of operation where we won't register for any events. In that 
case I think we can pool the MinaTaskClient - may be even 1 MinaTaskClient can 
work for all the non registered client operations - as MINA IoSession is thread 
safe, need to make sure the IoFilter to be thread safe - but to be on better 
side we can pool MinaTaskClient.



I hope I am making some sense? Do let me know your recommendation.



Thanks

Vijay



-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Sunday, November 15, 2009 1:47 PM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Pooling of WSHumanTaskHandler 
and MinaTaskClient - IoSession



One WSHumanTaskHandler should cache the client, so that it does not

recreate a new connection every time.  Note that, in the connect()

method, you only create a new connection if the client is null.



Kris



Quoting Vijay K Pandey :



> Hi,

>

> We have a web based application that currently deals with MQ Workflow

> for all the WSHT related processes/tasks. We are in the process of

> migrating to Drools Flow. In our current scenario we pool MQ workflow

> session (through apache commons pooling) - and our hundreds of web

> users use these sessions to get their word done (like starting a new

> process, retrieving a task, complete/forwarding/terminating tasks

> etc) - what we have seen is that in an 8hr window we have around

> 20,000 calls to mq workflow (around 42 calls/minute) - and it scales

> pretty good with mq workflow session pooling in place.

>

> Should I go ahead and extend WSHumanTaskHandler and MinaTaskClient so

> that they don't go through "connect" on every operation and get the

> MINA IoSession from some pool - as it might consume quite a bit of

> resources/time consuming to have a separate physical connections for

> each operation.

>

> Looking forward for your recommendations.

>

> Thanks

> Vijay

>









Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

___

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Flow 5.1.0.M1 - Pooling of WSHumanTaskHandler and MinaTaskClient - IoSession

2009-11-13 Thread Vijay K Pandey
Hi,

We have a web based application that currently deals with MQ Workflow for all 
the WSHT related processes/tasks. We are in the process of migrating to Drools 
Flow. In our current scenario we pool MQ workflow session (through apache 
commons pooling) - and our hundreds of web users use these sessions to get 
their word done (like starting a new process, retrieving a task, 
complete/forwarding/terminating tasks etc) - what we have seen is that in an 
8hr window we have around 20,000 calls to mq workflow (around 42 calls/minute) 
- and it scales pretty good with mq workflow session pooling in place.

Should I go ahead and extend WSHumanTaskHandler and MinaTaskClient so that they 
don't go through "connect" on every operation and get the MINA IoSession from 
some pool - as it might consume quite a bit of resources/time consuming to have 
a separate physical connections for each operation.

Looking forward for your recommendations.

Thanks
Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - How to get the WorkItem change state after restart of MinaTaskServer

2009-11-13 Thread Vijay K Pandey
Kris,

Should I look into the latest snapshot regarding this? Is something already in 
place or will it be in some future releases?

Thanks
Vijay
-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Friday, November 13, 2009 10:04 AM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - How to get the 
WorkItem change state after restart of MinaTaskServer

Vijay,

The current implementation of the communication between the human task
service and the engine is indeed not error-safe.  We are currently
working on making a more stable communication foundation (where
different communication technologies could be used) to solve this issue.

Kris

Quoting Vijay K Pandey :

> Hi,
>
> I have the following simple process having the WSHT 'HumanTask'
> (Drools Flow 5.1.0.M1)
>
> Start Node--> Human Task --> End Node
>
> Under the following scenario:
>
> a)   MinaTaskServer service is started
> b)   Drools Flow Process is started - as it reaches the Human
> Task ( having 'Wait for completion' as true) - following 4 commands
> are executed on the mina service
>i.
>  AddTaskRequest ---> This basically creates the task in the WSHT task
> tables
>  ii.
> RegisterForEventRequest --> This is called 3 times to register for
> following task events (TaskCompletedEvent, TaskFailedEvent,
> TaskSkippedEvent)
> c)   I guess the above 3 events (b ii) are registered for a
> callback to the Drools process so that the 'work item' (related to
> Human Task) state can be properly changed when the above 3 task event
> occurs - and the drools process can move forward.
>
> Now my question is what if the Mina service has to be stopped in
> between (task has been created but not yet reached the completed
> status) - then we lose all the registered events (as these are not
> persistent events) - now when we restart the Mina service we query
> the task - and let's say we changed the state through "Reserved-->
> InProgress-->Completed".  Now since the registered events are lost,
> how does the work item will be marked as "completed" (as the
> associated WSHT task has completed) so that the drools process can
> move forward - basically end in this case?
>
> Any insight will be highly appreciated.
>
> Thanks
> Vijay
>
>




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - Client Operation - getTasksAssignedAsPotentialOwner - does not return Task if "Comment" property is not set

2009-11-13 Thread Vijay K Pandey
Thanks Kris, will look into the latest snapshot

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Friday, November 13, 2009 10:27 AM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - Client Operation 
- getTasksAssignedAsPotentialOwner - does not return Task if "Comment" property 
is not set

Actually, there is, and I believe the fix is already implemented in the
latest snapshot, have you tried this already?

https://jira.jboss.org/jira/browse/JBRULES-2324

Kris

Quoting Vijay K Pandey :

> Thanks Mauricio for the quick reply. Is there any JIRA associated
> with this?
>
> Thanks
> Vijay
> 
> From: rules-users-boun...@lists.jboss.org
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mauricio
> Salatino
> Sent: Thursday, November 12, 2009 12:35 PM
> To: Rules Users List
> Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - Client
> Operation - getTasksAssignedAsPotentialOwner - does not return Task
> if "Comment" property is not set
>
> Yes.. I report that before,
> but it's not really a problem. The comment makes a relationship with
> all the i18n things.
> For now you need to set the comment to be able to retrieve the tasks
> that you want.
> Greetings.
> 2009/11/12 Vijay K Pandey
> mailto:vpan...@mdes.ms.gov>>
> Hi,
>
> Looks like there is some issue in the named query
> "TasksAssignedAsPotentialOwner" for the (Drools Flow 5.1.0.M1 - Human
> Task - Client Operation - getTasksAssignedAsPotentialOwner).
>
> It does not return the Tasks if we don't specify anything in the
> "Comment" property of the "Human Task". The following code was used
> to retrieve the results
>
> BlockingTaskSummaryResponseHandler responseHandler = new
> BlockingTaskSummaryResponseHandler();
> client.getTasksAssignedAsPotentialOwner("Luke Cage", "en-UK",
> responseHandler);
>
> I looked at the generated SQL (given below) and look like it tries to
> match the 'task id' with the "subjects_id, names_id, descriptions_id"
> of the table I18NTEXT --- the values of the "subjects_id" and
> "descriptions_id" goes as null because there is no "comment"
> associated with the work item 'Human Task' and since its not a left
> outer join on the descriptions_id - hence no returned result.
>
>select
> task0_.id as col_0_0_,
> i18ntext4_.text as col_1_0_,
> subjects3_.text as col_2_0_,
> i18ntext5_.text as col_3_0_,
> task0_.status as col_4_0_,
> task0_.priority as col_5_0_,
> task0_.skipable as col_6_0_,
> task0_.task_data_actual_owner_id as col_7_0_,
> task0_.task_data_created_by_id as col_8_0_,
> task0_.created_on as col_9_0_,
> task0_.activation_time as col_10_0_,
> task0_.expiration_time as col_11_0_
> from
> WSHT_TASK task0_
> left outer join
> ORGANIZATIONAL_ENTITY user1_
> on task0_.task_data_created_by_id=user1_.id
> left outer join
> ORGANIZATIONAL_ENTITY user2_
> on task0_.task_data_actual_owner_id=user2_.id
> left outer join
> I18NTEXT subjects3_
> on task0_.id=subjects3_.task_subjects_id,
> I18NTEXT i18ntext4_,
> I18NTEXT i18ntext5_,
> ORGANIZATIONAL_ENTITY organizati6_
> where
> organizati6_.id=?
> and (
> organizati6_.id in (
> select
> potentialo9_.entity_id
> from
> PEOPLE_ASSIGNMENTS_POTENTIAL_OWNERS potentialo9_
> where
> task0_.id=potentialo9_.task_id
> )
> )
> and i18ntext4_.language=?
> and (
> i18ntext4_.id in (
> select
> names10_.id
> from
> I18NTEXT names10_
> where
> task0_.id=names10_.task_names_id
> )
> )
> and subjects3_.language=?
> and i18ntext5_.language=?
> and (
> i18ntext5_.id in (
> select
> descriptio11_.id
> from
> I18NTEXT descriptio11_
> where
> task0_.id=descriptio11_.task_descriptions_id
> )
> )
> and (
> task0_.status in (
> 

[rules-users] Drools Flow 5.1.0.M1 - Human Task - How to get the WorkItem change state after restart of MinaTaskServer

2009-11-12 Thread Vijay K Pandey
Hi,

I have the following simple process having the WSHT 'HumanTask' (Drools Flow 
5.1.0.M1)

Start Node--> Human Task --> End Node

Under the following scenario:

a)   MinaTaskServer service is started
b)   Drools Flow Process is started - as it reaches the Human Task ( having 
'Wait for completion' as true) - following 4 commands are executed on the mina 
service
   i.  
AddTaskRequest ---> This basically creates the task in the WSHT task tables
 ii.  
RegisterForEventRequest --> This is called 3 times to register for following 
task events (TaskCompletedEvent, TaskFailedEvent, TaskSkippedEvent)
c)   I guess the above 3 events (b ii) are registered for a callback to the 
Drools process so that the 'work item' (related to Human Task) state can be 
properly changed when the above 3 task event occurs - and the drools process 
can move forward.

Now my question is what if the Mina service has to be stopped in between (task 
has been created but not yet reached the completed status) - then we lose all 
the registered events (as these are not persistent events) - now when we 
restart the Mina service we query the task - and let's say we changed the state 
through "Reserved--> InProgress-->Completed".  Now since the registered events 
are lost, how does the work item will be marked as "completed" (as the 
associated WSHT task has completed) so that the drools process can move forward 
- basically end in this case?

Any insight will be highly appreciated.

Thanks
Vijay

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - Client Operation - getTasksAssignedAsPotentialOwner - does not return Task if "Comment" property is not set

2009-11-12 Thread Vijay K Pandey
Thanks, I guess "Comment" will not harm so for now will set the same as the 
"Task Name"


From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mauricio Salatino
Sent: Thursday, November 12, 2009 1:48 PM
To: Rules Users List
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - Client Operation 
- getTasksAssignedAsPotentialOwner - does not return Task if "Comment" property 
is not set

I think not, because it's only that, I just always add a comment for that query 
works.

2009/11/12 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>
Thanks Mauricio for the quick reply. Is there any JIRA associated with this?

Thanks
Vijay

From: 
rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> 
[mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>]
 On Behalf Of Mauricio Salatino
Sent: Thursday, November 12, 2009 12:35 PM
To: Rules Users List
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - Client Operation 
- getTasksAssignedAsPotentialOwner - does not return Task if "Comment" property 
is not set

Yes.. I report that before,
but it's not really a problem. The comment makes a relationship with all the 
i18n things.
For now you need to set the comment to be able to retrieve the tasks that you 
want.
Greetings.
2009/11/12 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>
Hi,

Looks like there is some issue in the named query 
"TasksAssignedAsPotentialOwner" for the (Drools Flow 5.1.0.M1 - Human Task - 
Client Operation - getTasksAssignedAsPotentialOwner).

It does not return the Tasks if we don't specify anything in the "Comment" 
property of the "Human Task". The following code was used to retrieve the 
results

BlockingTaskSummaryResponseHandler responseHandler = new 
BlockingTaskSummaryResponseHandler();
client.getTasksAssignedAsPotentialOwner("Luke Cage", "en-UK", 
responseHandler);

I looked at the generated SQL (given below) and look like it tries to match the 
'task id' with the "subjects_id, names_id, descriptions_id" of the table 
I18NTEXT --- the values of the "subjects_id" and "descriptions_id" goes as null 
because there is no "comment" associated with the work item 'Human Task' and 
since its not a left outer join on the descriptions_id - hence no returned 
result.

   select
task0_.id as col_0_0_,
i18ntext4_.text as col_1_0_,
subjects3_.text as col_2_0_,
i18ntext5_.text as col_3_0_,
task0_.status as col_4_0_,
task0_.priority as col_5_0_,
task0_.skipable as col_6_0_,
task0_.task_data_actual_owner_id as col_7_0_,
task0_.task_data_created_by_id as col_8_0_,
task0_.created_on as col_9_0_,
task0_.activation_time as col_10_0_,
task0_.expiration_time as col_11_0_
from
WSHT_TASK task0_
left outer join
ORGANIZATIONAL_ENTITY user1_
on task0_.task_data_created_by_id=user1_.id
left outer join
ORGANIZATIONAL_ENTITY user2_
on task0_.task_data_actual_owner_id=user2_.id
left outer join
I18NTEXT subjects3_
on task0_.id=subjects3_.task_subjects_id,
I18NTEXT i18ntext4_,
I18NTEXT i18ntext5_,
ORGANIZATIONAL_ENTITY organizati6_
where
organizati6_.id=?
and (
organizati6_.id in (
select
potentialo9_.entity_id
from
PEOPLE_ASSIGNMENTS_POTENTIAL_OWNERS potentialo9_
where
task0_.id=potentialo9_.task_id
)
)
and i18ntext4_.language=?
and (
i18ntext4_.id in (
select
names10_.id
from
I18NTEXT names10_
where
task0_.id=names10_.task_names_id
)
)
and subjects3_.language=?
and i18ntext5_.language=?
and (
i18ntext5_.id in (
select
descriptio11_.id
from
I18NTEXT descriptio11_
where
task0_.id=descriptio11_.task_descriptions_id
)
)
and (
task0_.status in (
'Created' , 'Ready' , 'Reserved' , 'InProgress' , 'Suspended'
)
)
and (
task0_.expiration_time is null
)

Can someone throw some light on this? Do we have to have "Comment" property set?

Thanks
Vijay

___
rules-users mailing list
rules-users@lists.jbos

Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - Client Operation - getTasksAssignedAsPotentialOwner - does not return Task if "Comment" property is not set

2009-11-12 Thread Vijay K Pandey
Thanks Mauricio for the quick reply. Is there any JIRA associated with this?

Thanks
Vijay

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mauricio Salatino
Sent: Thursday, November 12, 2009 12:35 PM
To: Rules Users List
Subject: Re: [rules-users] Drools Flow 5.1.0.M1 - Human Task - Client Operation 
- getTasksAssignedAsPotentialOwner - does not return Task if "Comment" property 
is not set

Yes.. I report that before,
but it's not really a problem. The comment makes a relationship with all the 
i18n things.
For now you need to set the comment to be able to retrieve the tasks that you 
want.
Greetings.
2009/11/12 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>
Hi,

Looks like there is some issue in the named query 
"TasksAssignedAsPotentialOwner" for the (Drools Flow 5.1.0.M1 - Human Task - 
Client Operation - getTasksAssignedAsPotentialOwner).

It does not return the Tasks if we don't specify anything in the "Comment" 
property of the "Human Task". The following code was used to retrieve the 
results

BlockingTaskSummaryResponseHandler responseHandler = new 
BlockingTaskSummaryResponseHandler();
client.getTasksAssignedAsPotentialOwner("Luke Cage", "en-UK", 
responseHandler);

I looked at the generated SQL (given below) and look like it tries to match the 
'task id' with the "subjects_id, names_id, descriptions_id" of the table 
I18NTEXT --- the values of the "subjects_id" and "descriptions_id" goes as null 
because there is no "comment" associated with the work item 'Human Task' and 
since its not a left outer join on the descriptions_id - hence no returned 
result.

   select
task0_.id as col_0_0_,
i18ntext4_.text as col_1_0_,
subjects3_.text as col_2_0_,
i18ntext5_.text as col_3_0_,
task0_.status as col_4_0_,
task0_.priority as col_5_0_,
task0_.skipable as col_6_0_,
task0_.task_data_actual_owner_id as col_7_0_,
task0_.task_data_created_by_id as col_8_0_,
task0_.created_on as col_9_0_,
task0_.activation_time as col_10_0_,
task0_.expiration_time as col_11_0_
from
WSHT_TASK task0_
left outer join
ORGANIZATIONAL_ENTITY user1_
on task0_.task_data_created_by_id=user1_.id
left outer join
ORGANIZATIONAL_ENTITY user2_
on task0_.task_data_actual_owner_id=user2_.id
left outer join
I18NTEXT subjects3_
on task0_.id=subjects3_.task_subjects_id,
I18NTEXT i18ntext4_,
I18NTEXT i18ntext5_,
ORGANIZATIONAL_ENTITY organizati6_
where
organizati6_.id=?
and (
organizati6_.id in (
select
potentialo9_.entity_id
from
PEOPLE_ASSIGNMENTS_POTENTIAL_OWNERS potentialo9_
where
task0_.id=potentialo9_.task_id
)
)
and i18ntext4_.language=?
and (
i18ntext4_.id in (
select
names10_.id
from
I18NTEXT names10_
where
task0_.id=names10_.task_names_id
)
)
and subjects3_.language=?
and i18ntext5_.language=?
and (
i18ntext5_.id in (
select
descriptio11_.id
from
I18NTEXT descriptio11_
where
task0_.id=descriptio11_.task_descriptions_id
)
)
and (
task0_.status in (
'Created' , 'Ready' , 'Reserved' , 'InProgress' , 'Suspended'
)
)
and (
task0_.expiration_time is null
)

Can someone throw some light on this? Do we have to have "Comment" property set?

Thanks
Vijay

___
rules-users mailing list
rules-users@lists.jboss.org<mailto: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 5.1.0.M1 - Human Task - Client Operation - getTasksAssignedAsPotentialOwner - does not return Task if "Comment" property is not set

2009-11-12 Thread Vijay K Pandey
Hi,

Looks like there is some issue in the named query 
"TasksAssignedAsPotentialOwner" for the (Drools Flow 5.1.0.M1 - Human Task - 
Client Operation - getTasksAssignedAsPotentialOwner).

It does not return the Tasks if we don't specify anything in the "Comment" 
property of the "Human Task". The following code was used to retrieve the 
results

BlockingTaskSummaryResponseHandler responseHandler = new 
BlockingTaskSummaryResponseHandler();
client.getTasksAssignedAsPotentialOwner("Luke Cage", "en-UK", 
responseHandler);

I looked at the generated SQL (given below) and look like it tries to match the 
'task id' with the "subjects_id, names_id, descriptions_id" of the table 
I18NTEXT --- the values of the "subjects_id" and "descriptions_id" goes as null 
because there is no "comment" associated with the work item 'Human Task' and 
since its not a left outer join on the descriptions_id - hence no returned 
result.

   select
task0_.id as col_0_0_,
i18ntext4_.text as col_1_0_,
subjects3_.text as col_2_0_,
i18ntext5_.text as col_3_0_,
task0_.status as col_4_0_,
task0_.priority as col_5_0_,
task0_.skipable as col_6_0_,
task0_.task_data_actual_owner_id as col_7_0_,
task0_.task_data_created_by_id as col_8_0_,
task0_.created_on as col_9_0_,
task0_.activation_time as col_10_0_,
task0_.expiration_time as col_11_0_
from
WSHT_TASK task0_
left outer join
ORGANIZATIONAL_ENTITY user1_
on task0_.task_data_created_by_id=user1_.id
left outer join
ORGANIZATIONAL_ENTITY user2_
on task0_.task_data_actual_owner_id=user2_.id
left outer join
I18NTEXT subjects3_
on task0_.id=subjects3_.task_subjects_id,
I18NTEXT i18ntext4_,
I18NTEXT i18ntext5_,
ORGANIZATIONAL_ENTITY organizati6_
where
organizati6_.id=?
and (
organizati6_.id in (
select
potentialo9_.entity_id
from
PEOPLE_ASSIGNMENTS_POTENTIAL_OWNERS potentialo9_
where
task0_.id=potentialo9_.task_id
)
)
and i18ntext4_.language=?
and (
i18ntext4_.id in (
select
names10_.id
from
I18NTEXT names10_
where
task0_.id=names10_.task_names_id
)
)
and subjects3_.language=?
and i18ntext5_.language=?
and (
i18ntext5_.id in (
select
descriptio11_.id
from
I18NTEXT descriptio11_
where
task0_.id=descriptio11_.task_descriptions_id
)
)
and (
task0_.status in (
'Created' , 'Ready' , 'Reserved' , 'InProgress' , 'Suspended'
)
)
and (
task0_.expiration_time is null
)

Can someone throw some light on this? Do we have to have "Comment" property set?

Thanks
Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow BAM Module(5.1.0.M1) - Why primary key's are of string/varchar type

2009-11-03 Thread Vijay K Pandey
Created a JIRA



https://jira.jboss.org/jira/browse/JBRULES-2325



Vijay



-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Tuesday, November 03, 2009 4:44 AM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow BAM Module(5.1.0.M1) - Why primary key's 
are of string/varchar type



Best might indeed be to update the id to a long instead of a String.

Also check out

http://opensource.atlassian.com/projects/hibernate/browse/HB-1113



Could you open a JIRA for this?



Kris



Quoting Vijay K Pandey :



> Thanks for the reply Kris.

>

>

>

> Before posting to the forum I tested with different name of "id"

> column such as "primaryid". The name "id" is not a problem as I have

> already generated the DDL for the tables of WSHT task and all the

> tables got created fine with "id" as the primary key column with

> 'bigint' as the column type.

>

>

>

> So just to test it again I changed the 'id' column name to

> 'primaryid' - the error is same

>

>

>

> Error: Incorrect column specifier for column 'primaryid'

>

> SQLState:  42000

>

> ErrorCode: 1063

>

>

>

> When i converted the varchar to bigint for the 'id' column - tables

> got created fine.

>

>

>

> Do let me know what do you think and how should I approach this

> issue?

>

>

>

> Vijay

>

>

>

> -Original Message-

> From: rules-users-boun...@lists.jboss.org

> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris

> Verlaenen

> Sent: Monday, November 02, 2009 6:11 PM

> To: Rules Users List; Vijay K Pandey

> Subject: Re: [rules-users] Drools Flow BAM Module(5.1.0.M1) - Why

> primary key's are of string/varchar type

>

>

>

> Does changing the type of the id field from String to long fix your

>

> issue?  Because to me it seems that MySQL is not accepting the name

> "id"

>

> as a valid column name?  I guess changing the mapping so that it uses

> a

>

> different column name could fix the issue?

>

>

>

> Kris

>

>

>

> Quoting Vijay K Pandey :

>

>

>

> > I am using Drools Flow BAM (5.1.0.M1) module to store the

> processes

>

> > instances for audit purpose. I generated the DDL with the help of

>

> > Hibernate Tools against the MYSQL 5.1(INNODB)

>

> >

>

> > DDL for the 2 tables are given below -- the interesting part is

> the

>

> > "id" column as "varchar"  this gives error when we try to

> execute

>

> > the DDL against the mysql.

>

> >

>

> >create table AUDIT_NODE_INSTANCE_LOG (

>

> > id varchar(255) not null auto_increment,

>

> > type integer,

>

> > nodeInstanceId varchar(255),

>

> > nodeId varchar(255),

>

> > processInstanceId bigint,

>

> > processId varchar(255),

>

> > DATE datetime,

>

> > primary key (id)

>

> > ) ENGINE=InnoDB;

>

> >

>

> > create table AUDIT_PROCESS_INSTANCE_LOG (

>

> > id varchar(255) not null auto_increment,

>

> > processInstanceId bigint,

>

> > processId varchar(255),

>

> > START_DATE datetime,

>

> > END_DATE datetime,

>

> > primary key (id)

>

> > ) ENGINE=InnoDB;

>

> >

>

> > The error we get is

>

> >

>

> > Error: Incorrect column specifier for column 'id'

>

> > SQLState:  42000

>

> > ErrorCode: 1063

>

> > Error occured in:

>

> > create table AUDIT_NODE_INSTANCE_LOG (

>

> > id varchar(255) not null auto_increment,

>

> > type integer,

>

> > nodeInstanceId varchar(255),

>

> > nodeId varchar(255),

>

> > processInstanceId bigint,

>

> > processId varchar(255),

>

> > DATE datetime,

>

> > primary key (id)

>

> > ) ENGINE=InnoDB

>

> >

>

> > I used a naming strategy for the hibernate that's why the above

> table

>

> > names.

>

> >

>

> > My question is when the primary key generation is "native" why not

>

> > let these columns be of  type 'long' and get generated as "bigint"

>

> > for the sql type.

>

> >

&g

Re: [rules-users] Drools Flow BAM Module(5.1.0.M1) - Why primary key's are of string/varchar type

2009-11-02 Thread Vijay K Pandey
Thanks for the reply Kris.



Before posting to the forum I tested with different name of "id" column such as 
"primaryid". The name "id" is not a problem as I have already generated the DDL 
for the tables of WSHT task and all the tables got created fine with "id" as 
the primary key column with 'bigint' as the column type.



So just to test it again I changed the 'id' column name to 'primaryid' - the 
error is same



Error: Incorrect column specifier for column 'primaryid'

SQLState:  42000

ErrorCode: 1063



When i converted the varchar to bigint for the 'id' column - tables got created 
fine.



Do let me know what do you think and how should I approach this issue?



Vijay



-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Monday, November 02, 2009 6:11 PM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow BAM Module(5.1.0.M1) - Why primary key's 
are of string/varchar type



Does changing the type of the id field from String to long fix your

issue?  Because to me it seems that MySQL is not accepting the name "id"

as a valid column name?  I guess changing the mapping so that it uses a

different column name could fix the issue?



Kris



Quoting Vijay K Pandey :



> I am using Drools Flow BAM (5.1.0.M1) module to store the processes

> instances for audit purpose. I generated the DDL with the help of

> Hibernate Tools against the MYSQL 5.1(INNODB)

>

> DDL for the 2 tables are given below -- the interesting part is the

> "id" column as "varchar"  this gives error when we try to execute

> the DDL against the mysql.

>

>create table AUDIT_NODE_INSTANCE_LOG (

> id varchar(255) not null auto_increment,

> type integer,

> nodeInstanceId varchar(255),

> nodeId varchar(255),

> processInstanceId bigint,

> processId varchar(255),

> DATE datetime,

> primary key (id)

> ) ENGINE=InnoDB;

>

> create table AUDIT_PROCESS_INSTANCE_LOG (

> id varchar(255) not null auto_increment,

> processInstanceId bigint,

> processId varchar(255),

> START_DATE datetime,

> END_DATE datetime,

> primary key (id)

> ) ENGINE=InnoDB;

>

> The error we get is

>

> Error: Incorrect column specifier for column 'id'

> SQLState:  42000

> ErrorCode: 1063

> Error occured in:

> create table AUDIT_NODE_INSTANCE_LOG (

> id varchar(255) not null auto_increment,

> type integer,

> nodeInstanceId varchar(255),

> nodeId varchar(255),

> processInstanceId bigint,

> processId varchar(255),

> DATE datetime,

> primary key (id)

> ) ENGINE=InnoDB

>

> I used a naming strategy for the hibernate that's why the above table

> names.

>

> My question is when the primary key generation is "native" why not

> let these columns be of  type 'long' and get generated as "bigint"

> for the sql type.

>

> If they can't be changed - should we just extend the above classes

> and have these fields as long/bigint.

>

> Any suggestion will be appreciated.

>

> Thanks

> Vijay

>









Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

___

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools Flow BAM Module(5.1.0.M1) - Why primary key's are of string/varchar type

2009-11-02 Thread Vijay K Pandey
I am using Drools Flow BAM (5.1.0.M1) module to store the processes instances 
for audit purpose. I generated the DDL with the help of Hibernate Tools against 
the MYSQL 5.1(INNODB)

DDL for the 2 tables are given below -- the interesting part is the "id" column 
as "varchar"  this gives error when we try to execute the DDL against the 
mysql.

   create table AUDIT_NODE_INSTANCE_LOG (
id varchar(255) not null auto_increment,
type integer,
nodeInstanceId varchar(255),
nodeId varchar(255),
processInstanceId bigint,
processId varchar(255),
DATE datetime,
primary key (id)
) ENGINE=InnoDB;

create table AUDIT_PROCESS_INSTANCE_LOG (
id varchar(255) not null auto_increment,
processInstanceId bigint,
processId varchar(255),
START_DATE datetime,
END_DATE datetime,
primary key (id)
) ENGINE=InnoDB;

The error we get is

Error: Incorrect column specifier for column 'id'
SQLState:  42000
ErrorCode: 1063
Error occured in:
create table AUDIT_NODE_INSTANCE_LOG (
id varchar(255) not null auto_increment,
type integer,
nodeInstanceId varchar(255),
nodeId varchar(255),
processInstanceId bigint,
processId varchar(255),
DATE datetime,
primary key (id)
) ENGINE=InnoDB

I used a naming strategy for the hibernate that's why the above table names.

My question is when the primary key generation is "native" why not let these 
columns be of  type 'long' and get generated as "bigint" for the sql type.

If they can't be changed - should we just extend the above classes and have 
these fields as long/bigint.

Any suggestion will be appreciated.

Thanks
Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Same rule across multiple ruleflow groups

2009-10-06 Thread Vijay K Pandey
Hi,

I hope someone can advise me on this. I need a way to use the same rule across 
multiple ruleflow groups. Is this possible?

We have Process A which uses following rules in a particular ruleflowgroup

Rule A
Rule B
Rule C

We have Process B which uses following rules in a particular ruleflowgroup

Rule D
Rule B
Rule E

How can we define "Rule B" (which is common across both processes) so that it 
can be used in multiple processes across different ruleflow group?

We don't want to duplicate the rules.

Thanks
Vijay


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools 5 OSGI bundle/plugin

2009-09-23 Thread Vijay K Pandey
Hi,

Is there any OSGI bundle/plugin for Drools 5 or anyone has worked upon it?

Thanks
Vijay


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drrols 5 Expert --> Sequential vs Inference

2009-08-17 Thread Vijay K Pandey
Can anyone comment on my questions? If you need any more information please let 
me know.

Thanks
Vijay


From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Vijay K Pandey
Sent: Saturday, August 15, 2009 2:52 PM
To: Rules Users List
Subject: Re: [rules-users] Drrols 5 Expert --> Sequential vs Inference


Here is more information on this.



a)Our business transactions (OLTP + batches (sequential)) can result in the 
range of 500K to 750k of transactions in a day. All these are short running 
transactions and max # of business rules that can get executed in it can be in 
the range of 50-75

b)Each transaction can roughly interact with around 10 to 15 RDBMS tables 
with CRUD operations

c)Read can result of no more than 100 records and CUD of no more than 25 
records max in a single transaction

d)We do cache lookup/master data - but we don't cache the transactional 
data (few tables have around 10 million records) --- within a business process 
there is always a likelihood of checking least 5 to 10 associated transaction 
data for the inserted fact. Our transactional data is always changing.

e)Not all the rules are evaluated for each input - we can have a max of 
around 20 to 25 business rules max for a given input.

f)We do have the lookup/master data perfected - which form a good amount of 
LHS condition but along with that mostly all our business process have rules 
that have to do some checks against associated transactional data which can't 
be perfected.

Thanks

Vijay

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Greg Barton
Sent: Saturday, August 15, 2009 12:53 AM
To: Rules Users List
Subject: Re: [rules-users] Drrols 5 Expert --> Sequential vs Inference



Answering this question in any meaningful way without more information is 
difficult.  My first instinct is to wonder if the database calls really need to 
be done directly from the LHS of the rules, especially with this many of them.  
I hope you're able to cache the database queries.



Anyway, in general, if you have that many rules it is usually best to keep them 
in a fashion that's easily manageable, and that's what RBMSs are for.  Apart 
from that it's hard to address your question without more information.  Are all 
of the 3500*0.9 rules evaluated for each input?  Can the data from the database 
be prefetched into working memory instead of fetched in each LHS?  How often 
does this fetched data change? There are many paths you could follow mattering 
on the answers to these questions and others.



--- On Fri, 8/14/09, Vijay K Pandey  wrote:



> From: Vijay K Pandey 

> Subject: [rules-users] Drrols 5 Expert --> Sequential vs Inference

> To: "rules-users@lists.jboss.org" 

> Date: Friday, August 14, 2009, 10:52 PM

>

> Hi,

>

> We have around 3500

> business rules and

> rules are mainly look up value based or based on the

> associated data in the

> RDBMS.

>

> There are around 90%

> processes where we

> only need sequential rules check, the other 10% of

> processes requires the

> inference capability.

>

> My

> questions:

>

> a)

> Which is the best

> way to go for this

> - should we set up all the rules as inference through

> stateful session or

> segregate 90% as sequential and others as inference. Will

> this segregation

> going to give better performance in Drools 5 and

> later?

>

> b)

> Lots of our LHS

> depends on the data from

> RDBMS - we insert 1 fact - then make use of

> "from/collect" to get hold of various

> associated data ---then do

> some checks on the data fetched from RDBMS -- so is it

> better to program them

> in java directly or as sequential rules?

>

> Any guidance will be

> helpful?

>

> Thanks

>

>

> Vijay

>









___

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drrols 5 Expert --> Sequential vs Inference

2009-08-15 Thread Vijay K Pandey
Here is more information on this.



a)Our business transactions (OLTP + batches (sequential)) can result in the 
range of 500K to 750k of transactions in a day. All these are short running 
transactions and max # of business rules that can get executed in it can be in 
the range of 50-75

b)Each transaction can roughly interact with around 10 to 15 RDBMS tables 
with CRUD operations

c)Read can result of no more than 100 records and CUD of no more than 25 
records max in a single transaction

d)We do cache lookup/master data - but we don't cache the transactional 
data (few tables have around 10 million records) --- within a business process 
there is always a likelihood of checking least 5 to 10 associated transaction 
data for the inserted fact. Our transactional data is always changing.

e)Not all the rules are evaluated for each input - we can have a max of 
around 20 to 25 business rules max for a given input.

f)We do have the lookup/master data perfected - which form a good amount of 
LHS condition but along with that mostly all our business process have rules 
that have to do some checks against associated transactional data which can't 
be perfected.

Thanks

Vijay

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Greg Barton
Sent: Saturday, August 15, 2009 12:53 AM
To: Rules Users List
Subject: Re: [rules-users] Drrols 5 Expert --> Sequential vs Inference



Answering this question in any meaningful way without more information is 
difficult.  My first instinct is to wonder if the database calls really need to 
be done directly from the LHS of the rules, especially with this many of them.  
I hope you're able to cache the database queries.



Anyway, in general, if you have that many rules it is usually best to keep them 
in a fashion that's easily manageable, and that's what RBMSs are for.  Apart 
from that it's hard to address your question without more information.  Are all 
of the 3500*0.9 rules evaluated for each input?  Can the data from the database 
be prefetched into working memory instead of fetched in each LHS?  How often 
does this fetched data change? There are many paths you could follow mattering 
on the answers to these questions and others.



--- On Fri, 8/14/09, Vijay K Pandey  wrote:



> From: Vijay K Pandey 

> Subject: [rules-users] Drrols 5 Expert --> Sequential vs Inference

> To: "rules-users@lists.jboss.org" 

> Date: Friday, August 14, 2009, 10:52 PM

>

> Hi,

>

> We have around 3500

> business rules and

> rules are mainly look up value based or based on the

> associated data in the

> RDBMS.

>

> There are around 90%

> processes where we

> only need sequential rules check, the other 10% of

> processes requires the

> inference capability.

>

> My

> questions:

>

> a)

> Which is the best

> way to go for this

> - should we set up all the rules as inference through

> stateful session or

> segregate 90% as sequential and others as inference. Will

> this segregation

> going to give better performance in Drools 5 and

> later?

>

> b)

> Lots of our LHS

> depends on the data from

> RDBMS - we insert 1 fact - then make use of

> "from/collect" to get hold of various

> associated data ---then do

> some checks on the data fetched from RDBMS -- so is it

> better to program them

> in java directly or as sequential rules?

>

> Any guidance will be

> helpful?

>

> Thanks

>

>

> Vijay

>









___

rules-users mailing list

rules-users@lists.jboss.org

https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drrols 5 Expert --> Sequential vs Inference

2009-08-14 Thread Vijay K Pandey
Hi,



We have around 3500 business rules and rules are mainly look up value based or 
based on the associated data in the RDBMS.



There are around 90% processes where we only need sequential rules check, the 
other 10% of processes requires the inference capability.



My questions:



a)Which is the best way to go for this - should we set up all the rules as 
inference through stateful session or segregate 90% as sequential and others as 
inference. Will this segregation going to give better performance in Drools 5 
and later?



b)Lots of our LHS depends on the data from RDBMS - we insert 1 fact - then 
make use of "from/collect" to get hold of various associated data ---then do 
some checks on the data fetched from RDBMS -- so is it better to program them 
in java directly or as sequential rules?



Any guidance will be helpful?



Thanks

Vijay




___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

2009-08-14 Thread Vijay K Pandey
Thanks Tihomir. Edson also suggested the same and it worked. Thanks

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Tihomir Surdilovic
Sent: Friday, August 14, 2009 1:48 PM
To: Rules Users List
Subject: Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

Try adding the DSL before the DSLR:

   





Vijay K Pandey wrote:
>
> Hi,
>
>
>
> I am trying to get a very simple DSL working but all the time it gives
> the error of *Unable to expand:* If I take the DSL away everything
> runs fine, not sure whats going on.
>
>
>
> So what I did is strip away all other stuff and just added a plain
> simple DSL -- but still the same error
>
>
>
> *Unable to expand: LOGGING*
>
>
>
> *DSLR file Contents:*
>
>
>
> package test.rules
>
> dialect "mvel"
>
>
>
> expander testing.dsl
>
>
>
> rule "TestingCheck"
>
>
>
>   when
>
>   then
>
> *LOGGING *
>
> end
>
>
>
> *DSL file content*
>
> [consequence][]LOGGING=System.out.println("hello");
>
>
>
> *ChangeSet XML file (test_changeset.xml)*
>
> 
>  xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
>
>
> xs:schemaLocation='http://drools.org/drools-5.0/change-set
> drools-change-set-5.0.xsd' >
>
>
>
>
>
>
>
>
>
> 
>
>
>
> *I am loading the changeset set via*
>
>
>
> KnowledgeBuilder kbuilder =
> KnowledgeBuilderFactory.newKnowledgeBuilder();
>
> kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"),
> ResourceType.CHANGE_SET);
>
>
>
> Any hint what is going wrong?
>
>
>
> Thanks
>
> Vijay
>
>
>
> 
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

2009-08-14 Thread Vijay K Pandey
Suggestion (DSL first) by Edson works perfectly. Thanks a lot Edson!.

Thanks
Vijay

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Edson Tirelli
Sent: Friday, August 14, 2009 12:24 PM
To: Rules Users List
Subject: Re: [rules-users] Drools 5 - Not sure why this simple DSL not working


   Not true. [consequence] and [then] are synonyms, and [consequence] is the 
preferred way.

   I think the problem is the order in which you are loading the resources. Add 
the DSL before adding the DSLR.

   []s
   Edson
2009/8/14 Premkumar Stephen mailto:pre...@gmail.com>>
you need to change
[consequence][]LOGGING=System.out.println("hello");
to
[then][]LOGGING=System.out.println("hello");
Regards,
Prem


2009/8/14 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>

Thanks, but I have gone through this before and I don't see any issue in the 
DRL & DSL file I wrote. Also within the eclipse plug-in, "Rete View" comes up 
fine for the DRL but while running as java application, "Unable to expand:" 
error comes.





From: 
rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> 
[mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>]
 On Behalf Of Premkumar Stephen
Sent: Friday, August 14, 2009 11:53 AM
To: Rules Users List
Subject: Re: [rules-users] Drools 5 - Not sure why this simple DSL not working



http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html
 Section 4.10.2

2009/8/14 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>

Hi,



I am trying to get a very simple DSL working but all the time it gives the 
error of Unable to expand: If I take the DSL away everything runs fine, not 
sure whats going on.



So what I did is strip away all other stuff and just added a plain simple DSL 
-- but still the same error



Unable to expand: LOGGING



DSLR file Contents:



package test.rules

dialect "mvel"



expander testing.dsl



rule "TestingCheck"



  when

  then

LOGGING

end



DSL file content

[consequence][]LOGGING=System.out.println("hello");



ChangeSet XML file (test_changeset.xml)



   

   

   

   





I am loading the changeset set via



KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"), 
ResourceType.CHANGE_SET);



Any hint what is going wrong?



Thanks

Vijay



___
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users



___
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users



--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com<http://www.jboss.com>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

2009-08-14 Thread Vijay K Pandey
Thanks, but I have gone through this before and I don't see any issue in the 
DRL & DSL file I wrote. Also within the eclipse plug-in, "Rete View" comes up 
fine for the DRL but while running as java application, "Unable to expand:" 
error comes.


From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Premkumar Stephen
Sent: Friday, August 14, 2009 11:53 AM
To: Rules Users List
Subject: Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html
 Section 4.10.2

2009/8/14 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>

Hi,



I am trying to get a very simple DSL working but all the time it gives the 
error of Unable to expand: If I take the DSL away everything runs fine, not 
sure whats going on.



So what I did is strip away all other stuff and just added a plain simple DSL 
-- but still the same error



Unable to expand: LOGGING



DSLR file Contents:



package test.rules

dialect "mvel"



expander testing.dsl



rule "TestingCheck"



  when

  then

LOGGING

end



DSL file content

[consequence][]LOGGING=System.out.println("hello");



ChangeSet XML file (test_changeset.xml)



   

   

   

   





I am loading the changeset set via



KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"), 
ResourceType.CHANGE_SET);



Any hint what is going wrong?



Thanks

Vijay



___
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools 5 - Not sure why this simple DSL not working

2009-08-14 Thread Vijay K Pandey
Hi,



I am trying to get a very simple DSL working but all the time it gives the 
error of Unable to expand: If I take the DSL away everything runs fine, not 
sure whats going on.



So what I did is strip away all other stuff and just added a plain simple DSL 
-- but still the same error



Unable to expand: LOGGING



DSLR file Contents:



package test.rules

dialect "mvel"



expander testing.dsl



rule "TestingCheck"



  when

  then

LOGGING

end



DSL file content

[consequence][]LOGGING=System.out.println("hello");



ChangeSet XML file (test_changeset.xml)



   

   

   

   





I am loading the changeset set via



KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"), 
ResourceType.CHANGE_SET);



Any hint what is going wrong?



Thanks

Vijay

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] short circuit in Drools from or collect or accumulate

2009-08-11 Thread Vijay K Pandey
Hi,

I have the following scenario which i want to implement as rules

a) List = get the list of bean through hibernate  ---> this is not an issue

b) for each bean found in "a" -- iterate over and fire hibernate query to 
retrieve another bean based on the query parameter from first bean

c) break the for loop of "b" as sson as we found there is no result from the 
query.

I am having issue in getting the short circuit in there ? Is this achievable 
through the use of from, collect or accumulate ?

As soon the rule meets the short circuit -- i dont want to execute "n" number 
of other queries unecessary.

Thanks for the help.

Vijay
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users