Re: [rules-users] Starting resource change scanner and notifier in drools-server.

2010-11-03 Thread Mark Proctor

It won't detect changes on the classpath. Needs to be file or http.

Mark
On 03/11/2010 21:49, Jason Davidson wrote:

Hello,

Any tips on this?  I'm seeing this same behavior using Drools 5.1.1:

Spring Beans:




















Changeset:

http://drools.org/drools-5.0/change-set'

xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'

xs:schemaLocation='http://drools.org/drools-5.0/change-set 
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'>




http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST";

type='PKG'basicAuthentication="enabled"username="admin"password="admin"/>







At startup I see that the KnowledgeAgent registers a listener but 
never detects changes:


[2010:11:307 15:11:506:info] ResourceChangeScanner reconfigured with 
interval=60


[2010:11:307 15:11:506:info] ResourceChangeScanner created with 
default interval=60


[2010:11:307 15:11:506:info] ResourceChangeScanner reconfigured with 
interval=10


[2010:11:307 15:11:528:info] ResourceChangeNotification created

[2010:11:307 15:11:528:debug] ResourceChangeNotification monitor added 
monitor=org.drools.io.impl.resourcechangescanneri...@616181be


[2010:11:307 15:11:529:debug] KnowledgeAgent building resource map

[2010:11:307 15:11:529:info] KnowledegAgent has started listening for 
ChangeSet notifications


[2010:11:307 15:11:529:info] KnowledgeAgent created, with configuration:

monitorChangeSetEvents=true scanResources=true scanDirectories=true 
newInstance=true


[2010:11:307 15:11:530:info] KnowledgeAgent applying ChangeSet

[2010:11:307 15:11:531:debug] KnowledgeAgent processing sub 
ChangeSet=[ClassPathResource path='drools-changeset.xml']


[2010:11:307 15:11:919:debug] KnowledgeAgent notifier subscribing to 
resource=[UrlResource 
path='http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST']


[2010:11:307 15:11:920:debug] ResourceChangeNotification subscribing 
listener=org.drools.agent.impl.knowledgeagenti...@d2a7c1e to 
resource=[UrlResource 
path='http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST']


[2010:11:307 15:11:920:debug] ResourceChangeScanner subcribing 
notifier=org.drools.io.impl.resourcechangenotifieri...@603a9c52 to 
resource=[UrlResource 
path='http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST']


[2010:11:307 15:11:920:debug] KnowledgeAgent rebuilding KnowledgeBase 
using ChangeSet



Thanks!

Jason


2010/9/23 Clandes Tino >


Hi,
I've also faced the same problem.
Hope somebody could give a hint.
thanks & best,
milan

--- On *Mon, 20/9/10, Graham Thomson /mailto:gthom...@fizzback.com>>/* wrote:


From: Graham Thomson mailto:gthom...@fizzback.com>>
Subject: [rules-users] Starting resource change scanner and
notifier in drools-server.
To: rules-users@lists.jboss.org

Date: Monday, 20 September, 2010, 15:24



Hi,

I would like to ask for help with setting up drools-server
with Guvnor. I am using version 5.1.1 of both.

I am trying to set up an instance of drools-server in Tomcat
that periodically loads new updates of packages published in
Guvnor (both drools-server and Guvnor run in the same instance
of Tomcat).

My change set definition is as follows:


http://drools.org/drools-5.0/change-set%27>
  xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'

  xs:schemaLocation='http://drools.org/drools-5.0/change-set

http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'

>


http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package//LATEST"
  type="PKG" basicAuthentication="enabled"
username="" password="" />



My knowledge-services.xml configuration is as follows (based
on the unit test examples highlighted in

http://article.gmane.org/gmane.comp.java.drools.user/20992/match=drools+spring):


http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:drools="http://drools.org/schema/drools-spring";
  
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

http://drools.org/schema/drools-spring

http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/

Re: [rules-users] Marshalling Error : JBRULES-2453

2010-11-03 Thread Mark Proctor
On 03/11/2010 15:01, drooRam wrote:
> bump
you'll need to make a minimal self contained test that removes 
everything but what is necessary to show the problem, then attach it as 
a jira. The marshalling stuff is very cryptic and impossible to debug 
with a test case.

Mark

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


Re: [rules-users] UserTask parameters mapping and gwt-console

2010-11-03 Thread Kris Verlaenen
Juan,

You're pretty close to the actual solution ;)

The only problem is that you can't just map values to new work item 
parameters and expect them to show up in the task somehow.  There is one 
parameter called "Content" that can be used to put in data that might be 
needed / relevant during task execution.  If you for example have only 
one variable, you could map that to the Content parameter and access 
that from inside the form.  In case you have multiple values, we 
recommend you use a Map to put the different values in (you can create 
that in a simple action node or on-entry action and store it in an 
additional variable) and then map that to the Content parameter.  Note 
that we've tried to make your life easier by making sure that each of 
the entries in the map are known as a variable in your form so you 
should be able to use your forms as you defined them already.

Now, I know we could also extend our implementation to generate a Map 
for all unknown work item parameters and then put that as the Content 
(or merge with the Content), would people prefer this approach?  But 
then again, it's probably only 5 minutes work to create your own version 
of the WSHumanTaskHandler and tweak it so it does as I described above, 
and then use that as your integration code instead of our default one ;)

Kris

Juan Ignacio Barisich wrote:
> Hi.
> I'm using the gwt-console and trying to set a parameter mapping to 
> send some variables from the process to a task.
> First, the variables are setted in the process like:
> 
> 
>   
>  name="org.drools.process.core.datatype.impl.type.ObjectDataType" 
> className="String" />
>   
>   
>  name="org.drools.process.core.datatype.impl.type.ObjectDataType" 
> className="String" />
>   
> 
>   
> The parameter mapping is:
>  height="48" >
>   
>...
>   
>   
>   
> 
> Then I have a ftl file for the task form like:
> 
> ...
> 
> A value: ${myVariableA}
> Another value: ${myVariableB}
> ...
> 
> 
>
> With this code, when I select a task and click "View", I get the 
> following exception:
> -
> org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: 
> Failed to process form template
> 
> org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)
> 
> org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)
> 
> org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
> 
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)
> 
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
> 
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
> 
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 
> org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
> 
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> causa raíz
>
> java.lang.RuntimeException: Failed to process form template
> 
> org.drools.integration.console.forms.AbstractFormDispatcher.processTemplate(AbstractFormDispatcher.java:104)
> 
> org.drools.integration.console.forms.TaskFormDispatcher.provideForm(TaskFormDispatcher.java:111)
> 
> org.drools.integration.console.forms.FormDispatcherComposite.provideForm(FormDispatcherComposite.java:50)
> 
> org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormProcessingFacade.java:203)
> 
> org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormProcessingFacade.java:125)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> 
> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
> 
> org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
> 
> org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
> 
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
> 
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
> 
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servic

[rules-users] UserTask parameters mapping and gwt-console

2010-11-03 Thread Juan Ignacio Barisich
Hi.
I'm using the gwt-console and trying to set a parameter mapping to send some
variables from the process to a task.
First, the variables are setted in the process like:


  

  
  

  

  
The parameter mapping is:

  
   ...
  
  
  

Then I have a ftl file for the task form like:

...

A value: ${myVariableA}
Another value: ${myVariableB}
...



With this code, when I select a task and click "View", I get the following
exception:
-
org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException:
Failed to process form template

org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)

org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)

org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)

org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)

org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)

org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)

org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
causa raíz

java.lang.RuntimeException: Failed to process form template

org.drools.integration.console.forms.AbstractFormDispatcher.processTemplate(AbstractFormDispatcher.java:104)

org.drools.integration.console.forms.TaskFormDispatcher.provideForm(TaskFormDispatcher.java:111)

org.drools.integration.console.forms.FormDispatcherComposite.provideForm(FormDispatcherComposite.java:50)

org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormProcessingFacade.java:203)

org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormProcessingFacade.java:125)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)

org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)

org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)

org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)

org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)

org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)

org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)

org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
causa raíz

freemarker.core.InvalidReferenceException: Expression myVariableA is
undefined on line 5, column 39 in Evaluacion.
freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
freemarker.core.Expression.getStringValue(Expression.java:118)
freemarker.core.Expression.getStringValue(Expression.java:93)
freemarker.core.DollarVariable.accept(DollarVariable.java:76)
freemarker.core.Environment.visit(Environment.java:209)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:209)
freemarker.core.Environment.process(Environment.java:189)
freemarker.template.Template.process(Template.java:237)

org.drools.integration.console.forms.AbstractFormDispatcher.processTemplate(AbstractFormDispatcher.java:87)

org.drools.integration.console.forms.TaskFormDispatcher.provideForm(TaskFormDispatcher.java:111)

org.drools.integration.console.forms.FormDispatcherComposite.provideForm(FormDispatcherComposite.java:50)

org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormProcessingFacade.java:203)

org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormProcessingFacade.java:125)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.refl

Re: [rules-users] Starting resource change scanner and notifier in drools-server.

2010-11-03 Thread Jason Davidson
Hello,

Any tips on this?  I'm seeing this same behavior using Drools 5.1.1:

Spring Beans:

  

  

  

  

  



 



  

Changeset:





  http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST
"

   type='PKG' basicAuthentication="enabled" username="admin"
password="admin" />







At startup I see that the KnowledgeAgent registers a listener but never
detects changes:

[2010:11:307 15:11:506:info] ResourceChangeScanner reconfigured with
interval=60

[2010:11:307 15:11:506:info] ResourceChangeScanner created with default
interval=60

[2010:11:307 15:11:506:info] ResourceChangeScanner reconfigured with
interval=10

[2010:11:307 15:11:528:info] ResourceChangeNotification created

[2010:11:307 15:11:528:debug] ResourceChangeNotification monitor added
monitor=org.drools.io.impl.resourcechangescanneri...@616181be

[2010:11:307 15:11:529:debug] KnowledgeAgent building resource map

[2010:11:307 15:11:529:info] KnowledegAgent has started listening for
ChangeSet notifications

[2010:11:307 15:11:529:info] KnowledgeAgent created, with configuration:

monitorChangeSetEvents=true scanResources=true scanDirectories=true
newInstance=true

[2010:11:307 15:11:530:info] KnowledgeAgent applying ChangeSet

[2010:11:307 15:11:531:debug] KnowledgeAgent processing sub
ChangeSet=[ClassPathResource path='drools-changeset.xml']

[2010:11:307 15:11:919:debug] KnowledgeAgent notifier subscribing to
resource=[UrlResource path='
http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST
']

[2010:11:307 15:11:920:debug] ResourceChangeNotification subscribing
listener=org.drools.agent.impl.knowledgeagenti...@d2a7c1e to
resource=[UrlResource path='
http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST
']

[2010:11:307 15:11:920:debug] ResourceChangeScanner subcribing
notifier=org.drools.io.impl.resourcechangenotifieri...@603a9c52 to
resource=[UrlResource path='
http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST
']

[2010:11:307 15:11:920:debug] KnowledgeAgent rebuilding KnowledgeBase using
ChangeSet


Thanks!

Jason


2010/9/23 Clandes Tino 

> Hi,
> I've also faced the same problem.
> Hope somebody could give a hint.
>
> thanks & best,
> milan
>
> --- On *Mon, 20/9/10, Graham Thomson * wrote:
>
>
> From: Graham Thomson 
> Subject: [rules-users] Starting resource change scanner and notifier in
> drools-server.
> To: rules-users@lists.jboss.org
> Date: Monday, 20 September, 2010, 15:24
>
>
>
> Hi,
>
> I would like to ask for help with setting up drools-server with Guvnor. I
> am using version 5.1.1 of both.
>
> I am trying to set up an instance of drools-server in Tomcat that
> periodically loads new updates of packages published in Guvnor (both
> drools-server and Guvnor run in the same instance of Tomcat).
>
> My change set definition is as follows:
>
> 
>xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
>   xs:schemaLocation='http://drools.org/drools-5.0/change-set
>
> http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'
> >
>   
>type='PKG' basicAuthentication="enabled" username=""
> password="" />
> http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/ of my packages>/LATEST"
>   type="PKG" basicAuthentication="enabled" username=""
> password="" />
>   
> 
>
> My knowledge-services.xml configuration is as follows (based on the unit
> test examples highlighted in
> http://article.gmane.org/gmane.comp.java.drools.user/20992/match=drools+spring
> ):
>
> 
> http://www.springframework.org/schema/beans";
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>xmlns:drools="http://drools.org/schema/drools-spring";
>xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>http://drools.org/schema/drools-spring
> http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd
> ">
>
>   
>
>   
>
>node="node1"/>
>
>   
>
>   
> 
>/>
> 
>   
>
> 
>
> On loading drools-server, the resources listed in the change set are loaded
> and available.
>
> The problem is that when a new package built and published in Guvnor,
> drools-server does not detect this and update itself. The effect is the same
> as if a KnowledgeAgent were used locally and
>
>   ResourceFactory.getResourceChangeNotifierService().start();
>   ResourceFactory.getResourceChangeScannerService().start();
>
> were not called. This leads me to the assumption that drools-server does
> not start these services by default.
>
> My question is then can/how do I configure drools-server to start 

Re: [rules-users] process-designer deserialization error

2010-11-03 Thread melc

Great work!
Thank you very much for your help guys!!


-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/process-designer-deserialization-error-tp1833481p1837413.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] process-designer deserialization error

2010-11-03 Thread Antoine Toulme
The Process Designer is being developed here:
http://github.com/intalio/process-designer

We fixed the loading issue and it should work on Firefox and Safari as well
as on Chrome, even the beta dev.

We are working on implementing Chrome Frame support for IE right now.

Feel free to take it for a spin.

Thanks,

Antoine

On Wed, Nov 3, 2010 at 08:15, Kris Verlaenen
wrote:

> Hi,
>
> It is possible there are still issues between Oryx and Drools Eclipse
> plugin, as they are both using the same spec but not necessarily the
> same version (or interpreting the spec differently).  First of all, I
> would recommend updating to the latest version of the Oryx designer
> (unfortunately you'll have to use Chrome as browser in that case as it
> doesn't load on FF, something small we still have to fix) which can be
> found here:
>
> http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/1.0.0.026-SNAPSHOT/
>
> The reason is that the first version of the designer (which you were
> using) was still using the beta1 version of the BPMN2 spec.  The eclipse
> plugin is already using the beta2 version, and so is the latest version
> of the designer.  There is still limited support for the beta1 format,
> that's why eclipse will be able to open and save a BPMN2 file created in
> Oryx (it will use beta1 format in that case), but starting from Eclipse
> won't work in Oryx (as the old version of Oryx won't understand the
> beta2 format).  You can see the difference by looking at the namespace
> used for bpmn, which will be different for beta1 and beta2.
>
> The other problem you mentioned, the "g" namespace not being added to
> the BPMN2 file, is indeed a known issue that is already fixed on the
> latest trunk.  I suggest you download a latest version of the Eclipse
> plugin here:
>
> https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/
>
> Kris
>
> melc wrote:
> > I also get this error when creating a bpmn process in eclipse (galileo)
> and
> > trying to open/view it  in guvnor, having it committed first.
> >
> > I'm using jboss-5.1.0.GA and drools version 5.1 . The application server
> is
> > running on port 8080 (default configuration). I'm not using any rdbms
> only
> > what
> > comes bundled (h2 embedded db ) with drools.  For oryx designer i'm using
> > designer.war Revision 35836: /labs/jbossrules/contrib/designer as
> downloaded
> > from url,
> > http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/
> > as specified in,
> > http://blog.athico.com/2010/09/bpmn2-authoring-in-drools-guvnor.html
> >
> > The only way I have managed to view and edit a bpmn model inside guvnor
> by
> > using
> > the oryx designer and also being able to open for view and editing in
> > eclipse
> > with commits and updates back and forth with guvnor and everything to
> work
> > fine
> > is by,
> > 1. creating a model from scratch in oryx designer (
> > http://localhost:8080/designer/editor ), preferably just a start and end
> > point and maybe also a single task between them (start and end only works
> > fine).
> > 2. download the model from the option of oryx designer "Download BPMN 2.0
> DI
> > XML"
> > 3. import in eclipse from filesystem
> > 4. add/change stuff and add to guvnor
> >
> > Afterwards everything works fine whether edited and committed from guvnor
> > and
> > viewed in eclipse or edited and committed from eclipse and viewed in
> guvnor.
> >
> > By comparing the bpmn xml files created from oryx and from eclipse there
> > seem to
> > be differences that actually cause this error, since they stop occurring
> if
> > using the same syntax.
> > I'm still trying to find which different part actually casuses this, when
> i
> > find
> > it i will post it.
> >
> > Sorry for the long text, any help will be greatly appreciated!!
> > Thank you.
> >
> > p.s. just to make things more annoying I would like to mention that when
> > adding from eclipse
> > to a bpmn model that "works" a Rule Task element and then close the bpmn
> > model tab
> > in eclipse and reopen it a strange error appears, which occurs because of
> a
> > strange prefix 'g' character inserted in the xml of the bpmn. If it is
> > removed from the xml
> > everything works fine I suppose everything has to do with the
> different
> > xml
> > schemas, namespaces and tags used in the xml bpmn.. . .
> >
>
> ___
> 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] Building a rule base from the content of a directory

2010-11-03 Thread Bruno Freudensprung

Hello,

Sorry for the duplicate post, the previous one got inserted into another 
thread (also sorry for that). So here it is... in its own thread :-).


I plan to use the Drools Eclipse plugin in order to create rules with 
both the "Guided rule" editor and the "Rule resource" editor, and I 
would like to write a rather "generic" piece of code (using a 
KnowledgeBuilder) in order to setup a KnowledgeBase from the rule files 
contained in a directory.


Would you say that am I completly re-inventing something that already 
exists? If not, is there is a convention related to building a rule base 
from a directory containing a mix of Drools files (drools.package, BRL, 
DRL...) created with the Drools Eclipse plugin?


My first experiments showed that, in a directory containing only a BRL 
file and its associated "drools.package" file:


   * If I add both the "drools.package" file (as a DRL resource), then
 the BRL file (as a BRL resource) into the KnowledgeBuilder, I get
 a compilation error telling "Unable to resolve ObjectType 'Document'"
   * If I concatenate the content of the "drools.package" file and the
 result of the "BRL 2 DRL" conversion into a single DRL file, then
 add that unique DRL file (as a DRL resource) into the
 KnowledgeBuilder, everything is fine.

Does any of you have an idea where I am mistaken?
Many thanks in advance,

Best regards,

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


[rules-users] DROOLS 5.1 JBOSS 4.2.3 POSTGRES DUPLICATE KEY ERROR

2010-11-03 Thread fugu

Hello everybody

We are setting up  DROOLS 5-1+JBOS4.2.3+POSTGRES 8.4

When server starts up we get this error

10:22:37,228 ERROR [STDERR] SLF4J: Found binding in
[jar:file:/opt/jboss-4.2.3.GA/server/default/deploy/drools-guvnor.war/WEB-INF/lib/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
10:22:37,228 ERROR [STDERR] SLF4J: See
http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
10:22:39,609 INFO  [STDOUT] ERROR 03-11 10:22:39,601
(ConnectionRecoveryManager.java:logException:453)could not execute
statement, reason: ERROR: duplicate key value violates unique constraint
"publicbundle_pkey", state/code: 23505/0
10:22:39,623 INFO  [STDOUT] ERROR 03-11 10:22:39,616
(BundleDbPersistenceManager.java:storeBundle:1191)   failed to write bundle:
deadbeef-cafe-babe-cafe-babecafebabe
org.postgresql.util.PSQLException: ERROR: duplicate key value violates
unique constraint "publicbundle_pkey"
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:343)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:371)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:298)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:261)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:239)
at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.storeBundle(BundleDbPersistenceManager.java:1188)
at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.putBundle(AbstractBundlePersistenceManager.java:668)
at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.storeInternal(AbstractBundlePersistenceManager.java:610)
at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.store(AbstractBundlePersistenceManager.java:487)
at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.store(BundleDbPersistenceManager.java:561)
at
org.apache.jackrabbit.core.state.SharedItemStateManager.createRootNodeState(SharedItemStateManager.java:1672)
at
org.apache.jackrabbit.core.state.SharedItemStateManager.(SharedItemStateManager.java:207)
at
org.apache.jackrabbit.core.RepositoryImpl.createItemStateManager(RepositoryImpl.java:1458)
at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.doInitialize(RepositoryImpl.java:2034)
at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:1997)
at
org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:535)
at
org.apache.jackrabbit.core.RepositoryImpl.(RepositoryImpl.java:366)
at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:673)
at
org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:231)
at
org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:279)
at
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:375)
at
org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:123)
at
org.drools.guvnor.server.repository.RepositoryStartupService.newSession(RepositoryStartupService.java:151)
at
org.drools.guvnor.server.repository.RepositoryStartupService.create(RepositoryStartupService.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.core.Method

Re: [rules-users] process-designer deserialization error

2010-11-03 Thread Kris Verlaenen
Hi,

It is possible there are still issues between Oryx and Drools Eclipse 
plugin, as they are both using the same spec but not necessarily the 
same version (or interpreting the spec differently).  First of all, I 
would recommend updating to the latest version of the Oryx designer 
(unfortunately you'll have to use Chrome as browser in that case as it 
doesn't load on FF, something small we still have to fix) which can be 
found here: 
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/1.0.0.026-SNAPSHOT/

The reason is that the first version of the designer (which you were 
using) was still using the beta1 version of the BPMN2 spec.  The eclipse 
plugin is already using the beta2 version, and so is the latest version 
of the designer.  There is still limited support for the beta1 format, 
that's why eclipse will be able to open and save a BPMN2 file created in 
Oryx (it will use beta1 format in that case), but starting from Eclipse 
won't work in Oryx (as the old version of Oryx won't understand the 
beta2 format).  You can see the difference by looking at the namespace 
used for bpmn, which will be different for beta1 and beta2.

The other problem you mentioned, the "g" namespace not being added to 
the BPMN2 file, is indeed a known issue that is already fixed on the 
latest trunk.  I suggest you download a latest version of the Eclipse 
plugin here:
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/

Kris

melc wrote:
> I also get this error when creating a bpmn process in eclipse (galileo) and
> trying to open/view it  in guvnor, having it committed first. 
>
> I'm using jboss-5.1.0.GA and drools version 5.1 . The application server is
> running on port 8080 (default configuration). I'm not using any rdbms only
> what
> comes bundled (h2 embedded db ) with drools.  For oryx designer i'm using 
> designer.war Revision 35836: /labs/jbossrules/contrib/designer as downloaded
> from url,
> http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/
> as specified in,
> http://blog.athico.com/2010/09/bpmn2-authoring-in-drools-guvnor.html
>
> The only way I have managed to view and edit a bpmn model inside guvnor by
> using
> the oryx designer and also being able to open for view and editing in
> eclipse
> with commits and updates back and forth with guvnor and everything to work
> fine
> is by,
> 1. creating a model from scratch in oryx designer (
> http://localhost:8080/designer/editor ), preferably just a start and end
> point and maybe also a single task between them (start and end only works
> fine).
> 2. download the model from the option of oryx designer "Download BPMN 2.0 DI
> XML" 
> 3. import in eclipse from filesystem
> 4. add/change stuff and add to guvnor
>
> Afterwards everything works fine whether edited and committed from guvnor
> and
> viewed in eclipse or edited and committed from eclipse and viewed in guvnor.
>
> By comparing the bpmn xml files created from oryx and from eclipse there
> seem to
> be differences that actually cause this error, since they stop occurring if
> using the same syntax.
> I'm still trying to find which different part actually casuses this, when i
> find
> it i will post it.
>
> Sorry for the long text, any help will be greatly appreciated!!
> Thank you.
>
> p.s. just to make things more annoying I would like to mention that when
> adding from eclipse
> to a bpmn model that "works" a Rule Task element and then close the bpmn
> model tab
> in eclipse and reopen it a strange error appears, which occurs because of a
> strange prefix 'g' character inserted in the xml of the bpmn. If it is
> removed from the xml
> everything works fine I suppose everything has to do with the different
> xml
> schemas, namespaces and tags used in the xml bpmn.. . .
>   

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


[rules-users] Building a rule base from the content of a directory

2010-11-03 Thread Bruno Freudensprung

Hello,

I plan to use the Drools Eclipse plugin in order to create rules with 
both the "Guided rule" editor and the "Rule resource" editor, and I 
would like to write a rather "generic" piece of code (using a 
KnowledgeBuilder) in order to setup a KnowledgeBase from the rule files 
contained in a directory.


Would you say that am I completly re-inventing something that already 
exists? If not, is there is a convention related to building a rule base 
from a directory containing a mix of Drools files (drools.package, BRL, 
DRL...) created with the Drools Eclipse plugin?


My first experiments showed that, in a directory containing only a BRL 
file and its associated "drools.package" file:


   * If I add both the "drools.package" file (as a DRL resource), then
 the BRL file (as a BRL resource) into the KnowledgeBuilder, I get
 a compilation error telling "Unable to resolve ObjectType 'Document'"
   * If I concatenate the content of the "drools.package" file and the
 result of the "BRL 2 DRL" conversion into a single DRL file, then
 add that unique DRL file (as a DRL resource) into the
 KnowledgeBuilder, everything is fine.

Does any of you have an idea where I am mistaken?
Many thanks in advance,

Best regards,

Bruno.

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


Re: [rules-users] Marshalling Error : JBRULES-2453

2010-11-03 Thread drooRam

bump
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Marshalling-Error-JBRULES-2453-tp1792992p1835406.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] process-designer deserialization error

2010-11-03 Thread Kris Verlaenen
Alfredo,

Yes, the GuvnorAPIServlet seems to be connecting hardcoded to 
"http://localhost:8080/designer/bpmn2_0deserialization";.  I'll see if I 
can update this to something better or at least configurable.

Kris

AlfredoLatini wrote:
> Hi, 
> i have a problem with oryx process-designer and drools guvnor. I have
> created a process with process-designer and i saved it. Then i have opened
> this file with eclipse and i uploaded this file in guvnor repository. 
> I have opened the process in drools guvnor and the following exception
> occurred: 
>
> The server encountered an internal error () that prevented it from
> fulfilling this request.exception
> javax.servlet.ServletException:
> http://localhost:8080/designer/bpmn2_0deserialization
>
> org.drools.guvnor.server.GuvnorAPIServlet.service(GuvnorAPIServlet.java:73) 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
> org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42) 
>
> How can i fix this problem? 
>
> My jboss installation runs on port 8580 because 8080 is busy (oracleXE). 
>
> Thanks in advance 
>
> Alfredo. 
>
>   

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


Re: [rules-users] process-designer deserialization error

2010-11-03 Thread melc

I also get this error when creating a bpmn process in eclipse (galileo) and
trying to open/view it  in guvnor, having it committed first. 

I'm using jboss-5.1.0.GA and drools version 5.1 . The application server is
running on port 8080 (default configuration). I'm not using any rdbms only
what
comes bundled (h2 embedded db ) with drools.  For oryx designer i'm using 
designer.war Revision 35836: /labs/jbossrules/contrib/designer as downloaded
from url,
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/
as specified in,
http://blog.athico.com/2010/09/bpmn2-authoring-in-drools-guvnor.html

The only way I have managed to view and edit a bpmn model inside guvnor by
using
the oryx designer and also being able to open for view and editing in
eclipse
with commits and updates back and forth with guvnor and everything to work
fine
is by,
1. creating a model from scratch in oryx designer (
http://localhost:8080/designer/editor ), preferably just a start and end
point and maybe also a single task between them (start and end only works
fine).
2. download the model from the option of oryx designer "Download BPMN 2.0 DI
XML" 
3. import in eclipse from filesystem
4. add/change stuff and add to guvnor

Afterwards everything works fine whether edited and committed from guvnor
and
viewed in eclipse or edited and committed from eclipse and viewed in guvnor.

By comparing the bpmn xml files created from oryx and from eclipse there
seem to
be differences that actually cause this error, since they stop occurring if
using the same syntax.
I'm still trying to find which different part actually casuses this, when i
find
it i will post it.

Sorry for the long text, any help will be greatly appreciated!!
Thank you.

p.s. just to make things more annoying I would like to mention that when
adding from eclipse
to a bpmn model that "works" a Rule Task element and then close the bpmn
model tab
in eclipse and reopen it a strange error appears, which occurs because of a
strange prefix 'g' character inserted in the xml of the bpmn. If it is
removed from the xml
everything works fine I suppose everything has to do with the different
xml
schemas, namespaces and tags used in the xml bpmn.. . .

p.s.2 another post already exists maybe they should be merged or delete one
of them. Sorry for posting in both but don't know which one works
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/process-designer-deserialization-error-tp1833437p1834432.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] process-designer deserialization error

2010-11-03 Thread melc

I also get this error when creating a bpmn process in eclipse (galileo) and
trying to open/view it  in guvnor, having it committed first. 

I'm using jboss-5.1.0.GA and drools version 5.1 . The application server is
running on port 8080 (default configuration). I'm not using any rdbms only
what
comes bundled (h2 embedded db ) with drools.  For oryx designer i'm using 
designer.war Revision 35836: /labs/jbossrules/contrib/designer as downloaded
from url,
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/
as specified in,
http://blog.athico.com/2010/09/bpmn2-authoring-in-drools-guvnor.html

The only way I have managed to view and edit a bpmn model inside guvnor by
using
the oryx designer and also being able to open for view and editing in
eclipse
with commits and updates back and forth with guvnor and everything to work
fine
is by,
1. creating a model from scratch in oryx designer (
http://localhost:8080/designer/editor ), preferably just a start and end
point and maybe also a single task between them (start and end only works
fine).
2. download the model from the option of oryx designer "Download BPMN 2.0 DI
XML" 
3. import in eclipse from filesystem
4. add/change stuff and add to guvnor

Afterwards everything works fine whether edited and committed from guvnor
and
viewed in eclipse or edited and committed from eclipse and viewed in guvnor.

By comparing the bpmn xml files created from oryx and from eclipse there
seem to
be differences that actually cause this error, since they stop occurring if
using the same syntax.
I'm still trying to find which different part actually casuses this, when i
find
it i will post it.

Sorry for the long text, any help will be greatly appreciated!!
Thank you.

p.s. just to make things more annoying I would like to mention that when
adding from eclipse
to a bpmn model that "works" a Rule Task element and then close the bpmn
model tab
in eclipse and reopen it a strange error appears, which occurs because of a
strange prefix 'g' character inserted in the xml of the bpmn. If it is
removed from the xml
everything works fine I suppose everything has to do with the different
xml
schemas, namespaces and tags used in the xml bpmn.. . .
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/process-designer-deserialization-error-tp1833481p1834428.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] ActivationCancellationEvent

2010-11-03 Thread Michael Anstis
Please don't email me direct. I won't reply in the future. All questions and
answers are of value to the community as a whole.

AFAIK, Activation Cancelled events would trigger in reaction to the
revocation of a logically inserted fact that caused an activation to trigger
in the first place. It would not help identifying which pattern in a rule
was not matched causing your rule not to activate.

I don't believe there is a public API (or any) that could be used to trace
which RETE nodes matched for a given rule's definition and hence which did
not for you to identify unmatched patterns. Someone correct me if I am
wrong.

Of the top of my head, you could possibly achieve what you are looking for
by structuring your rules differently; having each pattern in a separate
rule and tracking accumulated rule activations yourself. Not nice, not
helpful if rules are authored by anybody other than a techy, but it might
just work

rule "bootstrap"
salience 100
when
not exists Tracker(rule ==  "rule 1")
then
insert(new Tracker("rule 1"));
end

rule "rule 1 - subrule 1"
when
$t : Tracker(rule == "rule 1")
MySubPattern1( ... )
then
$t.addMatchSubRule("subrule 1");
update($t);
end

rule "rule 1 - subrule 2"
when
$t : Tracker(rule == "rule 1")
MySubPattern2( ... )
then
$t.addMatchedSubRule("subrule 2");
update($t);
end

If Tracker(rule == "rule 1") does not contain stages 1 and 2 then you can
determine which pattern did not match.

Untried, untested.

Cheers,

Mike


On 3 November 2010 09:31,  wrote:

> Dear Manstis,
>
> Hope you are doing good.
>
> I saw your post regarding  AgendaEventlisterner.
>
> I got your zip file, the code is working fine.
>
> But the activationcancellation method is not getting invoked. I need to
> identify which condition in the rule failed.
>
> Can you pls help me.
>
> Regards,
>
> Renganathan P
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] process-designer deserialization error

2010-11-03 Thread AlfredoLatini

Hi, 
i have a problem with oryx process-designer and drools guvnor. I have
created a process with process-designer and i saved it. Then i have opened
this file with eclipse and i uploaded this file in guvnor repository. 
I have opened the process in drools guvnor and the following exception
occurred: 

The server encountered an internal error () that prevented it from
fulfilling this request.exception
javax.servlet.ServletException:
http://localhost:8080/designer/bpmn2_0deserialization
   
org.drools.guvnor.server.GuvnorAPIServlet.service(GuvnorAPIServlet.java:73) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42) 

How can i fix this problem? 

My jboss installation runs on port 8580 because 8080 is busy (oracleXE). 

Thanks in advance 

Alfredo. 

-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/process-designer-deserialization-error-tp1833481p1833481.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