Hello,

it's me again. My description was a bit imprecise before. The file 'Sample.drl' 
should actually be deployed in the database. At least I selected the 
'Sample.drl' in the Deployment tab of the eclipse plugin together with some 
java classes that my process or belonging drools rules need 
('FireRulesActionHandler.java' and 'IntValue.java'). Then I deployed the 
process and the named files to the server and the "Deployment 
successful"-Dialog appeared. 

The problem is that when running the process not all of the files are 
available. The 'FireRulesActionHandler" seems to be there because it is 
executed just fine but the 'Sample.drl' and the 'IntValue' class seem to be 
unavailable. I access the 'Sample.drl' through a FileInputStream now as a 
workaround: 

  | Reader reader = new InputStreamReader(new 
FileInputStream("C:/Temp/Sample.drl"));
  |  but still the 'IntValue' class cannot be found by the JBPM webapp during 
execution of the process. The error stack says:
anonymous wrote : 
  | 20:28:49,176 ERROR [[FacesServlet]] Servlet.service() for servlet 
FacesServlet threw exception
  | javax.faces.FacesException: Error calling action method of component with 
id taskform:transitionButton
  | [...]
  | Caused by: org.drools.rule.InvalidRulePackage: Unable to resolve ObjectType 
'IntValue'

The 'Sample.drl' rule file, which contains the rules that are being fired by 
the FireRulesActionHandler, which is called during execution of the process, 
looks as follows:


  | package com.sample.action
  | #package com.sample
  | 
  | import org.jbpm.context.exe.ContextInstance;
  | import org.jbpm.taskmgmt.def.Task;
  | import org.jbpm.taskmgmt.exe.TaskInstance;
  | import org.jbpm.taskmgmt.def.TaskMgmtDefinition;
  | import org.jbpm.graph.exe.ProcessInstance;
  | import org.jbpm.graph.exe.ExecutionContext;
  | import com.sample.action.IntValue;
  | 
  | rule "Check Number"
  |   when
  |     ci : ContextInstance()
  |     IntValue (intVal : value, value > 100)
  |   then
  |     ci.setVariable("number", "999"); 
  |     System.out.println("Changed number!");
  | end
  | 

And as I said, when testing the whole process including firing rules and 
everything through the jbpm API without deploying it and using the web app then 
it is executing just fine... 

The files should be stored somewhere in the database when they are being 
deployed right? But where exactly are they supposed to go? 
Does anybody know why this is not working?
Many thanks in advance!
Maurice

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015347#4015347

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015347
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to