[rules-users] Drools Guvnor and jboss single sign on

2009-12-08 Thread সাহিদ
Hello,

I have couple of web applications other than Guvnor deployed in JBoss.
I use jboss single sign on [1] for authentication. But guvnor does not
seem to be working. I believe there are some issues with JBoss Seam
and JBoss SSO. But is there any work around to integrate JBoss SSO
with Guvnor? Please help.

1. http://www.jboss.org/community/wiki/JBossWebSingleSignOn

Thanks in advance,
-- 
Sahid.
Argue with idiots, and you become an idiot. - PG
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Debuggin in Eclipse

2009-12-08 Thread chris richmond
Restarting, cleaning, etchas no effect.   Sighagain



2009/12/8 Ross H 

> Try doing a project clean, and check that eclipse is copying all the drls
> into the output folder, by default this is bin. If that's not working you
> might need to try and put together a small example that shows the problem
> and share that.
>
>  On Tue, Dec 8, 2009 at 7:52 PM, chris richmond-2 [via Drools - Java Rules
> Engine] <[hidden 
> email]
> > wrote:
>
>>  They are all source folders in eclipse, so they should be.
>>
>>
>>
>>
>>On Mon, Dec 7, 2009 at 6:58 PM, Ross H <[hidden 
>> email]
>> > wrote:
>>
>>>
>>> Using a FileInputStream works for me with a non standard folder
>>> structure.
>>> Are all your folders on the eclipse build path?
>>>
>>>
>>> chris richmond-2 wrote:
>>> >
>>> > Ok, I have a project working with Eclipse Galileo 3.5.1 and it works
>>> fine.
>>> > I
>>> > can create new drools projects and they debug fine with the DroolsTest
>>> > example.  However I have a very larege existing project that does not
>>> use
>>> > the src/main/java and src/main/rules src folder structure and the
>>> project
>>> > runs fine, and I can "Debug as Drools Application" no problem, however
>>> it
>>> > will never stop on any breakpoints in the rules file.  Does this have
>>> > anything to do with the fact that I am not using the default src/rules
>>> > direcories structure?  Or, is it dependent on loading the DRL file in a
>>> > particular method.  I am loading the file usin this method:
>>> >
>>> >
>>> > java.io.FileInputStream fis = *new* java.io.FileInputStream(
>>> >
>>> > *new* java.io.File(*"C:\\Path\\To\\Some\\Dir\\rules.drl*));
>>> >
>>> >  builder.add(ResourceFactory.*newInputStreamResource*(fis),
>>> >
>>> > ResourceType.*DRL*);
>>> >
>>> > Should I be loading the fule file using the DroolsTest sample code
>>> method
>>> > like below?
>>> >
>>> > KnowledgeBuilder kbuilder =
>>> > KnowledgeBuilderFactory.*newKnowledgeBuilder*();
>>> >
>>> > kbuilder.add(ResourceFactory.*newClassPathResource*("Sample.drl"),
>>> > ResourceType.*DRL*);
>>> >
>>> > Does these even make a difference?  Or any ideas why I can't get any
>>> debug
>>> > breakpoints in my rule file in my custom project to go into break-time?
>>> >
>>> >
>>> > Thanks,
>>> >
>>> > Chris
>>> >
>>> > ___
>>> > rules-users mailing list
>>> > [hidden 
>>> > email]
>>>
>>> > https://lists.jboss.org/mailman/listinfo/rules-users
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://n3.nabble.com/Debuggin-in-Eclipse-tp71134p71211.html
>>> Sent from the Drools - User mailing list archive at Nabble.com.
>>> ___
>>> rules-users mailing list
>>> [hidden 
>>> email]
>>>
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>> ___
>> rules-users mailing list
>> [hidden 
>> email]
>>  https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
> --
> View this message in context: Re: [rules-users] Debuggin in 
> Eclipse
>
> Sent from the Drools - User mailing list 
> archiveat Nabble.com.
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
___
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 Todd Pagni
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


[rules-users] Human Task Work Item

2009-12-08 Thread Todd Pagni
>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] Multiple packages approach

2009-12-08 Thread Ross H
The other factor to consider is how you do your premium calculations. If
they are mainly in the rules and with many common elements then Greg's
points 1 and 2 apply.

On the other hand if the calculations are mainly in java code or lookups and
your rules coordinate the use of this code then other factors will determine
your choice, particularly the multi product/brand/channel combinations.

The key determining factor in all of this is probably the %commonality
between rules.

On Tue, Dec 8, 2009 at 1:58 AM, Greg Barton  wrote:

> I know there are further emails where you settle on a multiple KB approach,
> but here's my advice at this stage:
>
> 1) If your rules involve tight integration between premium evaluations,
> then a single KB is preferable.  i.e. While evaluating premium A and B for
> customer C, if the partial evaluation for A can influence B, then use a
> single KB.  If A and B must be evaluated to completion, then use multiple
> KBs.  Also, if you would like to avoid the rule complexity in preventing
> integration between the rules, then use multiple KBs. (Rules in one KB,
> unless you explicitly specify, will just interact on their own.  That's the
> main feature of rulebased systems, in fact.)
>
> 2) If your premium evaluation rulesets have many common elements then a
> single KB is preferable.  i.e. X% of the evaluation rules are identical
> between evaluations, with only the final Y% being different.  Mattering on
> how large X is, you could have increased efficiency by only doing that
> processing once.
>
> 3) If you want to scale horizontally, then multiple KBs are best.  i.e. you
> would like to process evaluations of premiums in parallel, on one or
> multiple hosts.
>
> --- On Mon, 12/7/09, Torfox  wrote:
>
> > From: Torfox 
> > Subject: Re: [rules-users] Multiple packages approach
> > To: rules-users@lists.jboss.org
> > Date: Monday, December 7, 2009, 2:10 AM
> >
> > Hi Ross,
> >
> > Thank your for your response.
> >
> > Here is a wider context of my application. I'm implementing
> > insurance
> > premium comparison system. So the system applies the same
> > fact (customer
> > information) to many sets of rules. Every set of rules
> > represents a single
> > insurance product. The result of execution of every rule
> > set is an object
> > describing premium value and some calculation logs. By
> > clearing the context
> > I re-initiation of this resulting object in WorkingMemory,
> > before the next
> > set of rules is activated. I don't know yet if that kind of
> > action is
> > possible  in drools - does drools execute rules
> > package after package? I
> > haven't found yet an explanation of package role in the
> > rule execution
> > process.
> >
> > Bye,
> > Bartosz
> >
> >
> > Ross H wrote:
> > >
> > > Hi Bartosz,
> > >
> > > I think the answer is "it depends", and that is in the
> > context of the
> > > application you are trying to develop. I don't quite
> > understand your
> > > statement about clearing the calculation context when
> > the session is
> > > stateless.
> > >
> > > Whichever approach, I would wrap it as a pricing
> > service with business
> > > methods, and then under the covers you can use
> > whatever strategy you like
> > > and change that without impacting your application.
> > >
> > > I'm also not sure if you are asking from a perspective
> > of performance, so
> > > is
> > > it better to have number of smaller KnowledgeBases or
> > one large one from a
> > > memory/response aspect, and that depends on the number
> > of rules,
> > > complexity
> > > of conditions, and of course your fact model.
> > >
> > > On the other hand if you want to manage the lifecycle
> > of your products
> > > independently (say the pricing rules change
> > frequently), and as you say
> > > the
> > > rulesets are independent, then it might be better to
> > have separate
> > > KnowledgeBases from a management perspective. How do
> > you deploy the rules,
> > > embedded, Rule Agent, BRMS ...
> > >
> > > Maybe some more info on your solution space would help
> > others to give you
> > > a
> > > better response.
> > >
> > > Regards Ross
> > >
> > > On Sun, Dec 6, 2009 at 7:43 PM, Torfox 
> > > wrote:
> > >
> > >>
> > >> Hi,
> > >>
> > >> I'm trying to achieve the following result. There
> > are many rule sets,
> > >> every
> > >> set is responsible for insurance premium
> > calculation and these sets are
> > >> independent (every set applies to a single
> > product). I have organized the
> > >> rules into packages, where package identifies
> > product.
> > >> After calculation of every rule set I have a
> > resulting object insurance
> > >> premium and calculation log.
> > >>
> > >> What is the best pattern to execute those rules.
> > E.g. can I put all
> > >> packages
> > >> into a single KnowledgeBase and execute
> > StatelessKnowledgeSession
> > >> providing
> > >> that the last rule of every rule set clears the
> > calculation context?
> > >> Or is it better to create separate Knowled

Re: [rules-users] Debuggin in Eclipse

2009-12-08 Thread Ross H

Try doing a project clean, and check that eclipse is copying all the drls
into the output folder, by default this is bin. If that's not working you
might need to try and put together a small example that shows the problem
and share that.

On Tue, Dec 8, 2009 at 7:52 PM, chris richmond-2 [via Drools - Java Rules
Engine] 

> wrote:

> They are all source folders in eclipse, so they should be.
>
>
>
>
> On Mon, Dec 7, 2009 at 6:58 PM, Ross H <[hidden 
> email]
> > wrote:
>
>>
>> Using a FileInputStream works for me with a non standard folder structure.
>> Are all your folders on the eclipse build path?
>>
>>
>> chris richmond-2 wrote:
>> >
>> > Ok, I have a project working with Eclipse Galileo 3.5.1 and it works
>> fine.
>> > I
>> > can create new drools projects and they debug fine with the DroolsTest
>> > example.  However I have a very larege existing project that does not
>> use
>> > the src/main/java and src/main/rules src folder structure and the
>> project
>> > runs fine, and I can "Debug as Drools Application" no problem, however
>> it
>> > will never stop on any breakpoints in the rules file.  Does this have
>> > anything to do with the fact that I am not using the default src/rules
>> > direcories structure?  Or, is it dependent on loading the DRL file in a
>> > particular method.  I am loading the file usin this method:
>> >
>> >
>> > java.io.FileInputStream fis = *new* java.io.FileInputStream(
>> >
>> > *new* java.io.File(*"C:\\Path\\To\\Some\\Dir\\rules.drl*));
>> >
>> >  builder.add(ResourceFactory.*newInputStreamResource*(fis),
>> >
>> > ResourceType.*DRL*);
>> >
>> > Should I be loading the fule file using the DroolsTest sample code
>> method
>> > like below?
>> >
>> > KnowledgeBuilder kbuilder =
>> > KnowledgeBuilderFactory.*newKnowledgeBuilder*();
>> >
>> > kbuilder.add(ResourceFactory.*newClassPathResource*("Sample.drl"),
>> > ResourceType.*DRL*);
>> >
>> > Does these even make a difference?  Or any ideas why I can't get any
>> debug
>> > breakpoints in my rule file in my custom project to go into break-time?
>> >
>> >
>> > Thanks,
>> >
>> > Chris
>> >
>> > ___
>> > rules-users mailing list
>> > [hidden 
>> > email]
>>
>> > https://lists.jboss.org/mailman/listinfo/rules-users
>> >
>> >
>>
>> --
>> View this message in context:
>> http://n3.nabble.com/Debuggin-in-Eclipse-tp71134p71211.html
>> Sent from the Drools - User mailing list archive at Nabble.com.
>> ___
>> rules-users mailing list
>> [hidden 
>> email]
>>
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
> ___
> rules-users mailing list
> [hidden 
> email]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> --
>  View message @
> http://n3.nabble.com/Debuggin-in-Eclipse-tp71134p71350.html
> To unsubscribe from Re: Debuggin in Eclipse, click here< (link removed) =>.
>
>
>

-- 
View this message in context: 
http://n3.nabble.com/Debuggin-in-Eclipse-tp71134p71376.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Debuggin in Eclipse

2009-12-08 Thread chris richmond
They are all source folders in eclipse, so they should be.




On Mon, Dec 7, 2009 at 6:58 PM, Ross H  wrote:

>
> Using a FileInputStream works for me with a non standard folder structure.
> Are all your folders on the eclipse build path?
>
>
> chris richmond-2 wrote:
> >
> > Ok, I have a project working with Eclipse Galileo 3.5.1 and it works
> fine.
> > I
> > can create new drools projects and they debug fine with the DroolsTest
> > example.  However I have a very larege existing project that does not use
> > the src/main/java and src/main/rules src folder structure and the project
> > runs fine, and I can "Debug as Drools Application" no problem, however it
> > will never stop on any breakpoints in the rules file.  Does this have
> > anything to do with the fact that I am not using the default src/rules
> > direcories structure?  Or, is it dependent on loading the DRL file in a
> > particular method.  I am loading the file usin this method:
> >
> >
> > java.io.FileInputStream fis = *new* java.io.FileInputStream(
> >
> > *new* java.io.File(*"C:\\Path\\To\\Some\\Dir\\rules.drl*));
> >
> >  builder.add(ResourceFactory.*newInputStreamResource*(fis),
> >
> > ResourceType.*DRL*);
> >
> > Should I be loading the fule file using the DroolsTest sample code method
> > like below?
> >
> > KnowledgeBuilder kbuilder =
> > KnowledgeBuilderFactory.*newKnowledgeBuilder*();
> >
> > kbuilder.add(ResourceFactory.*newClassPathResource*("Sample.drl"),
> > ResourceType.*DRL*);
> >
> > Does these even make a difference?  Or any ideas why I can't get any
> debug
> > breakpoints in my rule file in my custom project to go into break-time?
> >
> >
> > Thanks,
> >
> > Chris
> >
> > ___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
> --
> View this message in context:
> http://n3.nabble.com/Debuggin-in-Eclipse-tp71134p71211.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