You need to follow these steps if u want process data in rules.
IN - Code
U need to put process instance in working memory so that the rule can evaluate the conditions in when part.
a. Do this In a script task just after start node kcontext.getKnowledgeRuntime().insert(kcontext.getProcessInstance())
Or Register a Process event listener, and in afterProcessStarted() event add this line session.insert(event.getProcessInstance())
IN - RULES
Sample Rule 1 :
eval(Integer.parseInt((String)$process.getVariable("piAgeVariable")) > 30)
1. I am not sure about JBPM-6, but in JBPM 5.4 if u don't fire the rule when u enter the node, then rule is not fired. Resolution to this is Be sure that u have placed this line just before u enter the rules node. ksession.fireAllRules(); .
2. Keep one thing in mind to retract the process instaces properly after rule node is executed using the kcontext.getKnowledgeRuntime().retract() or the eventListener approach. Else this process instance will remain in working memory and will be part of rules evaluation when anyother JBPM process instance triggers fireAllRules().
on top of what was already mentioned you can take advantage of data input and output (and their associations) on business rule task to insert and the retract the data from working memory. Take a look at screen cast 3 on this blog post. It guides you through using rule task in process in jbpm6.
Thank you for the blog. I was able to reproduce your process and make my own. My problem was that I named a project with mixed case, but the forms and process did not behave properly unless I used all lower case (e.g., my package was "MixedCase" but I had to refer to it as "org.jbpm.mixedcase".