Re: [rules-users] How to make available declarative model to all packages.

2012-07-26 Thread Michael Anstis
I have tried with 5.4.0.Final and found everything to work as required.

These are the steps I followed (which don't appear out of the ordinary):-

1) Create new Declarative Model (let's call in GADM) in Global Area
2) Define GADM.
3) Save GADM.
4) Create new Package (called P1)
5) Create new Package (called P2)
6) Create new Declarative Model in P1 (import GADM from Global Area)
7) Create new Declarative Model in P2 (import GADM from Global Area)
8) Create new Rule (called P1R1) in P1
9) GADM is visible to P1R1
10) Create new Rule (called P2R1) in P2
11) GADM is visible to P2R1.

With kind regards,

Mike

On 25 July 2012 08:03, rodolphio m.rindflei...@gameartstudio.de wrote:

 I'm using Guvnor 5.4




 --
 View this message in context:
 http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018892.html
 Sent from the Drools: User forum 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] How to make available declarative model to all packages.

2012-07-26 Thread rodolphio
I tried your steps you mentioned above with the existing repository: same
problem.
I setup a new repository in guvnor and tried your steps you mentioned above:
no problems.

It seems that the old repository has been chrashed for some reasons I can't
fix out.

So far it seems to work correctly now.

Thanks.



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018921.html
Sent from the Drools: User forum 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] How to make available declarative model to all packages.

2012-07-25 Thread rodolphio
Hi manstis,

I allready have made the 2 steps you mentioned above. This is not the
problem.

The problem is the following step 3:
Going to the Edit tab in the package x.y.z and adding the types from the
imported declarative model  in the list named Configuration: Imported
types, because if I click on the green + there is no type from the
declarative model to choose.

And my rule in the package x.y.z needs the missing type. So the package
cannot be build.

I hope I have expressed my problem now clear enough.

Thanks in advance.





--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018889.html
Sent from the Drools: User forum 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] How to make available declarative model to all packages.

2012-07-25 Thread Michael Anstis
OK, great I understand :)

What version of Guvnor are you using?

On 25 July 2012 07:18, rodolphio m.rindflei...@gameartstudio.de wrote:

 Hi manstis,

 I allready have made the 2 steps you mentioned above. This is not the
 problem.

 The problem is the following step 3:
 Going to the Edit tab in the package x.y.z and adding the types from
 the
 imported declarative model  in the list named Configuration: Imported
 types, because if I click on the green + there is no type from the
 declarative model to choose.

 And my rule in the package x.y.z needs the missing type. So the package
 cannot be build.

 I hope I have expressed my problem now clear enough.

 Thanks in advance.





 --
 View this message in context:
 http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018889.html
 Sent from the Drools: User forum 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] How to make available declarative model to all packages.

2012-07-25 Thread rodolphio
I'm using Guvnor 5.4




--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018892.html
Sent from the Drools: User forum 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] How to make available declarative model to all packages.

2012-07-24 Thread rodolphio
I have made following:

In Guvnor you have to create a Model also in your specific packages and
select import from global area. Then you have to go to the configuration
of the package and add the classes you want to use in your package.

My problem is that i can't add the classes I want to use in my package.

And than I tried to resolve the problem by deleting the imported declarative
model from the package and deleting the declarative model, I can't create a
declarative model in global area without creating automatically the same
declarative model in the package I want to import it.


Any advices? Thanks a lot



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018875.html
Sent from the Drools: User forum 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] How to make available declarative model to all packages.

2012-07-24 Thread Michael Anstis
TBH, I don't understand what it is you are having problems with: this
thread seems to have gone full-circle.

As Esteban states, to share a model in multiple Guvnor packages you need to:
1) Create a model in the Global Area
2) Create a mode in the individual package (choosing to import from Global
Area)

The model can be either POJO or Declarative (as long as they are consistent
across Global Area and packages).

Regarding your KnowledgeBuilder problem. Do the packages build in Guvnor?

On 24 July 2012 16:36, rodolphio m.rindflei...@gameartstudio.de wrote:

 I have made following:

 In Guvnor you have to create a Model also in your specific packages and
 select import from global area. Then you have to go to the configuration
 of the package and add the classes you want to use in your package.

 My problem is that i can't add the classes I want to use in my package.

 And than I tried to resolve the problem by deleting the imported
 declarative
 model from the package and deleting the declarative model, I can't create a
 declarative model in global area without creating automatically the same
 declarative model in the package I want to import it.


 Any advices? Thanks a lot



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018875.html
 Sent from the Drools: User forum 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] How to make available declarative model to all packages.

2011-12-22 Thread Esteban Aliverti
In Guvnor you have to create a Model also in your specific packages and
select import from global area. Then you have to go to the configuration
of the package and add the classes you want to use in your package.

Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Thu, Dec 22, 2011 at 5:05 AM, srinivasasanda srinivasasa...@gmail.comwrote:

 Hi Salaboy,
I have a problem please give me some solution..


 packagelisturl=
 http://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/webdav/packages
(which show the list of package ==
Contents of this
 Folder:
defaultPackage
mortgages
sample
demo

Storeing the result in buffered reader, and manuplateing the
 eachline and adding all the package to the kbuilder()

 packageurl=
 http://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/package/



 ...

 System.out.println(GlobalConfig.getConfigParameterValue(packagelisturl));
URL packages = new
 URL(GlobalConfig.getConfigParameterValue(packagelisturl));
URLConnection yc = packages.openConnection();
BufferedReader in = new BufferedReader(new
 InputStreamReader(yc.getInputStream()));
String inputLine;
inputLine = in.readLine();
System.out.print(inputLine+inputLine);
while ((inputLine = in.readLine()) != null)
 {
System.out.print(inputLine+inputLine);
String

 urlstr=GlobalConfig.getConfigParameterValue(packageurl)++inputLine+/LATEST;
URL url = new URL(urlstr);
UrlResource urlResource =
 (UrlResource)ResourceFactory.newUrlResource(url);

 urlResource.setBasicAuthentication(enabled);
urlResource.setUsername(admin);
urlResource.setPassword(admin);
_kbuilder.add(urlResource,
 ResourceType.PKG);
System.out.println(added pacakges into
 _kbuilder+urlstr);
 }
in.close();
  . some other code
 to fire rules.

This code works fine with simple java application and
 geting the result.

but when i try to use this in some web application , the
 packages are not adding to kbuilder  and it shows the following error


 2011-12-21 20:31:01,819 INFO  [STDOUT] (http-127.0.0.1-8080-5) after
 creating kbuilder
 2011-12-21 20:31:01,819 INFO  [STDOUT] (http-127.0.0.1-8080-5)

 http://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/webdav/packages
 2011-12-21 20:31:01,819 INFO  [STDOUT] (http-127.0.0.1-8080-4) INFO  21-12
 20:31:01,819 (NilAuthenticator.java:authenticate:35) All users are guests.
 2011-12-21 20:31:01,819 INFO  [STDOUT] (http-127.0.0.1-8080-4) INFO  21-12
 20:31:01,819 (RepositoryServlet.java:allowUser:114) null authenticated for
 rest api
 2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5)
 inputLineContents of this Folder:
 2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5)
 inputLinedefaultPackage
 2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) added
 pacakges into

 _kbuilderhttp://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST
 2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) Provider
 org.drools.io.impl.ResourceProviderImpl could not be set.
 2011-12-21 20:31:01,835 ERROR [org.in.treetech.bss.common.cache]
 (http-127.0.0.1-8080-5)  RuleEngine  234  Provider
 org.drools.io.impl.ResourceProviderImpl could not be set.
 2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) After adding
 packages
 2011-12-21 20:31:01,835 ERROR [org.in.treetech.bss.common.cache]
 (http-127.0.0.1-8080-5)  RuleEngine  173  Provider
 org.drools.impl.KnowledgeBaseProviderImpl could not be set.
 2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) After
 creation of Kbase
 2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) FactName
 issample-person
 2011-12-21 20:31:01,835 ERROR [org.in.treetech.bss.common.cache]
 (http-127.0.0.1-8080-5)  RuleEngine  390  null
 2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) Rule engine
 ended


 So for helped  a lot Thanks , Thank u very much,

 Regards 

[rules-users] How to make available declarative model to all packages.

2011-12-21 Thread srinivasasanda
Hi All,

I have created declarative model in global area but even it is not visible
to other packages, how to some model to available to the all packages.


Thanks in Advance


--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p3605644.html
Sent from the Drools: User forum 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] How to make available declarative model to all packages.

2011-12-21 Thread Salaboy
Did you try importing the declared types in the other drl? 
Package.declared type

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

On 21/12/2011, at 22:41, srinivasasanda srinivasasa...@gmail.com wrote:

 Hi All,
 
 I have created declarative model in global area but even it is not visible
 to other packages, how to some model to available to the all packages.
 
 
 Thanks in Advance
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p3605644.html
 Sent from the Drools: User forum 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] How to make available declarative model to all packages.

2011-12-21 Thread srinivasasanda
Hi Salaboy,
I have a problem please give me some solution..

   
packagelisturl=http://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/webdav/packages
(which show the list of package ==
Contents of this
Folder:
defaultPackage
mortgages
sample
demo

Storeing the result in buffered reader, and manuplateing the
eachline and adding all the package to the kbuilder()
   
packageurl=http://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/package/

   
...
   
System.out.println(GlobalConfig.getConfigParameterValue(packagelisturl));
URL packages = new
URL(GlobalConfig.getConfigParameterValue(packagelisturl));
URLConnection yc = packages.openConnection();
BufferedReader in = new BufferedReader(new
InputStreamReader(yc.getInputStream()));
String inputLine;
inputLine = in.readLine();
System.out.print(inputLine+inputLine);
while ((inputLine = in.readLine()) != null)
 {
System.out.print(inputLine+inputLine);
String
urlstr=GlobalConfig.getConfigParameterValue(packageurl)++inputLine+/LATEST;
URL url = new URL(urlstr);
UrlResource urlResource =
(UrlResource)ResourceFactory.newUrlResource(url);
   
urlResource.setBasicAuthentication(enabled);
urlResource.setUsername(admin);
urlResource.setPassword(admin);
_kbuilder.add(urlResource,
ResourceType.PKG);
System.out.println(added pacakges into
_kbuilder+urlstr);
 }
in.close();
  . some other code
to fire rules.

This code works fine with simple java application and
geting the result.

but when i try to use this in some web application , the
packages are not adding to kbuilder  and it shows the following error


2011-12-21 20:31:01,819 INFO  [STDOUT] (http-127.0.0.1-8080-5) after
creating kbuilder
2011-12-21 20:31:01,819 INFO  [STDOUT] (http-127.0.0.1-8080-5)
http://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/webdav/packages
2011-12-21 20:31:01,819 INFO  [STDOUT] (http-127.0.0.1-8080-4) INFO  21-12
20:31:01,819 (NilAuthenticator.java:authenticate:35) All users are guests.
2011-12-21 20:31:01,819 INFO  [STDOUT] (http-127.0.0.1-8080-4) INFO  21-12
20:31:01,819 (RepositoryServlet.java:allowUser:114) null authenticated for
rest api
2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5)
inputLineContents of this Folder:
2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5)
inputLinedefaultPackage
2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) added
pacakges into
_kbuilderhttp://localhost:8080/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST
2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) Provider
org.drools.io.impl.ResourceProviderImpl could not be set.
2011-12-21 20:31:01,835 ERROR [org.in.treetech.bss.common.cache]
(http-127.0.0.1-8080-5)  RuleEngine  234  Provider
org.drools.io.impl.ResourceProviderImpl could not be set.
2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) After adding
packages
2011-12-21 20:31:01,835 ERROR [org.in.treetech.bss.common.cache]
(http-127.0.0.1-8080-5)  RuleEngine  173  Provider
org.drools.impl.KnowledgeBaseProviderImpl could not be set.
2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) After
creation of Kbase
2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) FactName
issample-person
2011-12-21 20:31:01,835 ERROR [org.in.treetech.bss.common.cache]
(http-127.0.0.1-8080-5)  RuleEngine  390  null
2011-12-21 20:31:01,835 INFO  [STDOUT] (http-127.0.0.1-8080-5) Rule engine
ended


So for helped  a lot Thanks , Thank u very much,

Regards  Thanks
Srinivasaprasad


--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p3605810.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users