Esteban, Sorry for the delay,
Yes, I compiled binary package in Guvnor,
I am getting same Exceptions if I keep kbase.getProcess():
java.lang.NullPointerException
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1090)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:301)
at com.simple.Mainclass.main(Mainclass.java:30)
Thanks and regards,
Manohar Kokkula
Mailto: manohar.kokk...@tcs.com
-----rules-users-boun...@lists.jboss.org wrote: -----
To: Rules Users List <rules-users@lists.jboss.org>
From: Esteban Aliverti
Sent by: rules-users-boun...@lists.jboss.org
Date: 01/09/2012 08:34PM
Subject: Re: [rules-users] API's used for loading process in Eclipse
Have you compiled your package in Guvnor?What is the result of kbase.getProcesses() ?Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com
2012/1/9 Manohar Kokkula <manohar.kokk...@tcs.com>Conten in ProcessChangeSet.xml:
<change-set xmlns='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 /home/manohar/Desktop/ChangeSet/ProcessExample-xsd/change-set-1.0.0.xsd' >
<add>
<resource source='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST' type='PKG' />
</add>
</change-set>
I downloaded change-set-1.0.0.xsd and kept in the folder ChangeSet.
Mailto: manohar.kokk...@tcs.com
Thanks and regards,
Manohar Kokkula
-----rules-users-boun...@lists.jboss.org wrote: -----To: Rules Users List <rules-users@lists.jboss.org>
From: Esteban Aliverti
Sent by: rules-users-boun...@lists.jboss.org
Date: 01/09/2012 08:16PM
Subject: Re: [rules-users] API's used for loading process in Eclipse
What is the content of com/simple/ProcessChangeSet.xml?Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com
2012/1/9 Manohar Kokkula <manohar.kokk...@tcs.com>Hi
I am using Drool-5.2.0 final, Guvnor 5.2.0 final and designer-2.0-jboss.war in Drools-Guvnor.
In Designer, I created simple process with start node, one task node, and end node. I made Task type of task node as "Script". I entered simple java code as System.out.print("Hi "); in the Script option of the task node.
Sorry I dont know API's used for loading this process in Eclipse.
So can any one tell me the API's used for loading this process in Eclipse.?
I tried alot, but i am getting exceptions as:
java.lang.NullPointerException
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1090)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:301)
at com.simple.Mainclass.main(Mainclass.java:30)
I am also sending my code:
package com.simple;
import org.drools.KnowledgeBase;
import org.drools.agent.KnowledgeAgent;
import org.drools.agent.KnowledgeAgentFactory;
import org.drools.io.Resource;
import org.drools.io.ResourceFactory;
import org.drools.rule.FactType;
import org.drools.runtime.StatefulKnowledgeSession;
public class Mainclass {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try
{
KnowledgeBase kbase=readBase();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
ksession.startProcess("sayhi"); //ID of the process which is created in Designer
// ksession.fireAllRules();
ksession.dispose();
}
catch(Throwable t)
{
t.printStackTrace();
}
}
private static KnowledgeBase readBase()
{
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("AccountAgent");
Resource changeset = ResourceFactory.newClassPathResource("com/simple/ProcessChangeSet.xml");
kagent.applyChangeSet(changeset);
KnowledgeBase kbase = kagent.getKnowledgeBase();
return kbase;
}
}
Please guide me in proper way.
Thanks in advance.
Thanks and regards,
Manohar Kokkula
Sub Focus Area Product Expert - BPM/BRE
CEG - Open Source Technology Group
YantraPark,Thane(West)
Mumbai
Ph:- +91 8793839453
Mailto: manohar.kokk...@tcs.com
Website: http://www.tcs.com
___________________________________________
Experience certainty: IT Services
Business Solutions
Outsourcing
____________________________________________=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
_______________________________________________
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 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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users