-
1. Re: workItem definition doesn't work
salaboy21 Jun 9, 2011 12:12 PM (in response to stellina_rosa)sounds like a typo to me.
Check the package names and the class names and if you are deploying those classes in the right path.
Greetings.
-
2. Re: workItem definition doesn't work
stellina_rosa Jun 9, 2011 12:15 PM (in response to salaboy21)the new classes are stored in the same packages where are stored the old class that refers at workItem. I don't understand...... I tried to change the old workItem(adding a new parameter in the configuration) but when I restart it doesn't change!!! :((((((
-
3. Re: workItem definition doesn't work
salaboy21 Jun 9, 2011 12:16 PM (in response to stellina_rosa)Hmm.. where are you placing the packages?
What are you doing exactly? Are you seeing an error?
-
4. Re: workItem definition doesn't work
stellina_rosa Jun 9, 2011 12:20 PM (in response to salaboy21)no error.
these are my packages:
1)src/main/java - com.sample : here there are the ProcessTest.java class and myClassWorkItemHandler.java (where there are the metod abort and executeWorkItem);
2)src/main/resource - META-INF: here there are the .conf file and the drools.rulebase.conf file
I repeat, last week I haven't any problem with new workItem...
-
5. Re: workItem definition doesn't work
stellina_rosa Jun 13, 2011 6:07 AM (in response to stellina_rosa)Hi... I'm trying to create the work item "notification" explained in the guide... but it doesn't work... in the editor there isn't the new node!!!
I can't understand... please help me...!!!!
-
6. Re: workItem definition doesn't work
melc Jun 14, 2011 4:16 AM (in response to stellina_rosa)Hello, I would advise to post all your data from all files here (attach them if you want) and also any exceptions that you might be getting.
-
7. Re: workItem definition doesn't work
stellina_rosa Jun 15, 2011 4:18 AM (in response to melc)Hello Chris..! thank you for your answer... !
ok, i'll post you my files..
In the ProcessTest.java class there is the registration of others workItem: LancioDLVWorkItem e TrasformaInOggettiWorkItem works.... the other NO!!
I'll post you the Notification workItem (the code is the same of the tutorial...) and it doesn't work.
I haven't any error/exception... very strange behavior!
ps. .conf files are in the folder META-INF in resource, .java class are in src/main/java
THANK YOU
-
file .java.rar.zip 2.2 KB
-
file .conf.rar.zip 605 bytes
-
-
8. Re: workItem definition doesn't work
melc Jun 15, 2011 6:20 AM (in response to stellina_rosa)Hello,
Well, after a first scan of your files i noticed in file MyWorkDefinitions.conf a comma after "displayName":"Notification" which i think it shouldn't be there (but i don't think tha'ts the problem.... )
In drools.rulebase.conf which conf file actually works? is it LancioDLVWorkDefinitions.conf or TrasformaInOggettiWorkDefinitions.conf? Which workitemhandlers work? What if you change the order of the conf files and place the MyWorkDefinitions.conf first? are you certain that it does not go in the executeWorkItem method of NotificationWorkItemHandler ?
Regarding the registration of handlers everything looks fine. However another way also works by using the conf file specified in drools.session.conf (check out the META-INF folder of jbpm-gwt-console-server.war).
For example you can place a drools.session.conf file in your META-INF having the following line,
drools.workItemHandlers = CustomWorkItemHandlers.conf
and then put at the same place a CustomWorkItemHandlers.conf file with the following line,
[
"Log": new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(),
"Notification": new com.sample.NotificationWorkItemHandler(),
]
also don't ommit the files that you already have i.e. drools.rulebase.conf and MyWorkDefinitions.conf
after that no need for registration of your handlers in your code, they should work right away.
-
9. Re: workItem definition doesn't work
stellina_rosa Jun 15, 2011 11:33 AM (in response to melc)Hi Chris!
in drools.rulebase.conf works only LancioDLVWorkDefinitions.conf and TrasformaInOggettiWorkDefinitions.conf.
I can't understand why these two work items works fine and the other (that I created at the same way) doesn't work......