This is the code that I am using in the OnEntryActions part of my workItem.

System.out.println(context.getProcessInstance().getWorkingMemory());
FactHandle fac=context.getProcessInstance().getWorkingMemory().insert(new Name("santosh"));
System.out.println(fac);
org.drools.runtime.rule.WorkingMemory wrk=context.getProcessInstance().getWorkingMemory();
System.out.println(wrk);
System.out.println(wrk.getObject(fac));
 

But it gives this error:

Process Compilation error : org.drools.lang.descr.ProcessDescr@1ecfe07
com/sample/Process_com_sample_0.java (20:933) : Type mismatch: cannot convert from org.drools.WorkingMemory to org.drools.runtime.rule.WorkingMemory

Process Compilation error : org.drools.lang.descr.ProcessDescr@1ecfe07
com/sample/Process_com_sample_0.java (20:933) : Type mismatch: cannot convert from org.drools.WorkingMemory to org.drools.runtime.rule.WorkingMemory

Process Compilation error : org.drools.lang.descr.ProcessDescr@1ecfe07
com/sample/Process_com_sample_0.java (20:933) : Type mismatch: cannot convert from org.drools.WorkingMemory to org.drools.runtime.rule.WorkingMemory

java.lang.IllegalArgumentException: Could not parse knowledge.
at com.sample.ProcessTest.readKnowledgeBase(ProcessTest.java:47)
at com.sample.ProcessTest.main(ProcessTest.java:24)

Can anyone help how to get around this error???

Thank You.
Santosh Mukherjee


On Thu, Jul 15, 2010 at 5:33 PM, santosh mukherjee <sam.sensation@gmail.com> wrote:
Hi,

I have inserted some objects into the process session through ksession.insert(Object arg0) method call in the class file that starts the process.Now I want to access those objects in my workItem on entry action code. Can I do it? If yes please let me know how??

Thanks
Santosh Mukherjee.


On Wed, Jul 14, 2010 at 4:37 PM, Chris Raschl <c.raschl-mailinglists@dyless.com> wrote:
Am 14.07.2010 12:05, schrieb santosh mukherjee:
> Hi,
>
> I want to add some of my own customized components to Drools Flow components pannel. How can this be done. Is there some API available to do so ??

Hi,
i guess you want to add domain specific work items to use them in the process designer
in eclispe. There is no API, to do that you just have to add a drools.rulebase.conf file
and your own work item definition to your META-INF directory.

There is an example in the drools flow manual:

http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-flow/html_single/index.html#d4e1033

Remind: You'll have to re-open the process to make the work items appear.

Hope this helps,
chris
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users