changeset.xml issue while accessing gurvor rule package
by Sai Nadh
good noon to all,
finally i am able to read change-set.xml
but i am unable to parse it...
please anyone can help me ...
my change-set.xml file is
<?xml version="1.0" encoding="UTF-8"?/>
<change-set xmlns='http://drools.org/drools-5.4/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.4/change-set'
'
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...'
>
<add>
<resource source='
http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/ProductPosi...
'
type="PKG" basicAuthentication="enabled" username="admin"
password="admin"/>
</add>
</change-set>
i am getting exceptions like
(null: 1, 38): The XML declaration must end with "?>".
java.lang.RuntimeException: Unable to parse ChangeSet
at
org.drools.agent.impl.KnowledgeAgentImpl.getChangeSet(KnowledgeAgentImpl.java:448)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:180)
at
com.org.alert.test.SampleTestClass.createKnowledgeBase(SampleTestClass.java:80)
at com.org.alert.test.SampleTestClass.main(SampleTestClass.java:26)
Caused by: org.xml.sax.SAXParseException: The XML declaration must end with
"?>".
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanXMLDeclOrTextDecl(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanXMLDeclOrTextDecl(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$XMLDeclDriver.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:296)
at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:175)
at org.drools.xml.XmlChangeSetReader.read(XmlChangeSetReader.java:70)
at
org.drools.agent.impl.KnowledgeAgentImpl.getChangeSet(KnowledgeAgentImpl.java:446)
... 3 more
java.lang.RuntimeException: Unable to parse ChangeSet
at
org.drools.agent.impl.KnowledgeAgentImpl.getChangeSet(KnowledgeAgentImpl.java:453)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:180)
at
com.org.alert.test.SampleTestClass.createKnowledgeBase(SampleTestClass.java:80)
at com.org.alert.test.SampleTestClass.main(SampleTestClass.java:26)
regards
sai
12 years, 1 month
my drools versions details
by Sai Nadh
i am using following versions
drools-distribution-5.4.0.Final
guvnor-distribution-5.4.0.Final
Eclipse-HELIOS
--
*Regards*
*SAI NADH*
12 years, 1 month
fun projects :)
by Mark Proctor
If anyone wants to get involved in a fun task, we would like to get two existing components ported from SWT to SVG/GWT. So that those components can be used in the UberFire project - our new web based workbench.
Audit Viewer
Also migrate to support ErraiJSon, instead of our XStream dump, for seamless client and server marshalling.
Rete Viewer
The ReteViewer should be ported to svg/gwt, again using ErraiJSon to provide the tree format.
The above two also have an endless list of features that could be added, to make them more useful - especially the Audit Viewer. With more continuous work the AuditViewer can really help us to improve runtime diagnostics.
UberFire is not officially alpha launched yet, so it needs some cleaning and some docs up before we make it wider known. Although I did mention it here with screenshots and a video (link towards end):
http://drools.46999.n3.nabble.com/rules-users-UderFire-tp4019929p4019938....
If you want to get involved, come onto irc and we'll talk you through getting started. UberFire really is a very cool project, it's completely standalone from Drools&jBPM, and a good project to be involved in, as you can use it for your own workbench projects.
Just ask for manstis or porcelli (irc nicks)
http://www.jboss.org/drools/irc
#droolsdev
Mark
12 years, 1 month
Matching against regex failing?
by qwertyqwerty
Hi
in my decision table in the action column i want to validate a value against
a regex, and return the boolean back as a response. The condition i have
is:
eval($t.getTestVal() matches("[A-Z"))
The DRL that gets generated is:
eval($t.getTestVal() matches(\"[A-Z\")));
It seems to be adding the escape characters in which i don't want, and i
suspect is causing me my issue. The error coming out is:
Errors when compiling rules [19,0]: [ERR 102] Line 19:0 mismatched input ''
[19,0]: [ERR 102] Line 19:0 mismatched input '<eof>' in rule
--
View this message in context: http://drools.46999.n3.nabble.com/Matching-against-regex-failing-tp402037...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
BPMN 2.0 versioning
by Alberto R. Galdo
Hi,
As you may know, previous releases of JBPM had support for jPDL
processes versioning.
As per the deployment process, the process was serialized as Java
objects into the database as blobs once it was converted as such at
deployment time.
From that time on, every process in execution was linked to it's process
serialization ( the version that was active at that moment ) and subsequent
serializations of newer versions of the same process where versioned and
the new process instances keep track of what version of the process
definition they were linked to. That made very easy the task of updating
process definitions in an application just keeping in mind that previous
process instances will execute by the previous process definition and newer
process instances will follow the latest process definition version.
Now, in JBPM 5.x things don't seem to work that way anymore. Processes
are defined using BPMN 2.0, live in a Drools KnowledgeSession, and seems
there's no support for process definition versioning.
So, how would you solve the problem of having in the same
KnowledgeSession different versions of the same process ( each having it's
bag of process instances attached ) in JBPM 5.x ? Is it that even
possible?. We have a long time running application that has up to 7
different versions of a process and this really is a feature we need.
Seems that one solution would be to have different versions of the
process definition live in the knowledge session bound to different process
names and make your application aware of that when launching new instances
... but that seems more of a workaround ... Is this really the unique
solution for this?
Greets,
Alberto R. Galdo
argaldo(a)gmail.com
12 years, 1 month
regarding drools guvnor and eclipse IDE
by Sai Nadh
How can i access the rules (which i have created in Drools Guvnor) to my
java application?
plz give me some example....
i have tried with below code, is there any mistakes?? if yes pls mention....
private static KnowledgeBase createKnowledgeBase() {
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( "MyAgent"
);
KnowledgeAgentConfiguration kaconf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
kaconf.setProperty( "drools.agent.scanDirectories", "false" );
kagent.applyChangeSet( ResourceFactory.newUrlResource("
http://localhost:8080/guvnor/rest/packages/ProductPositionAlert/assets/ch...")
);
return kbase;
}
my guvnor package sanpshot details are
[image: Inline image 2]
thanks in advance
--
*Regards*
* sainadh*
* *
12 years, 1 month
Task Handler blocking
by Alberto R. Galdo
Hi All,
We have an application where we are using JBPM for our processes. In our
application there's a strong requirement to maintain the same
KnowledgeSession between restarts even though that we are not using rules
at all, just BPMN 2.0 processes ( we are aware that JBPM needs it to
maintain process state, workitem state and so on ... but don't need
neither rules nor ReteOO loops in our app ).
Now we got to the tricky task handling part, were we have several
handlers that depend on I/O which blocks the entire execution of the
processes. And just because all our application depends on the *same*
shared stored knowledge session, all our other parallel processes that need
to execute processes are waiting ( like in a queue ) for the I/O to finish
and execute themselves whenever the execution of JBPM gets blocked by I/O.
We've tried to execute our handlers in different threads, but as we are
running inside a persisted environment JBPM looses the JTA transaction as
it is not bound to the current thread. Seems not a solution. We tried then
to implement thread communication mechanisms, yield() and notify() and just
made the problem worse.
Any insights on the subject? How can we execute parallel non-blocking
processes inside a shared and persisted KnowlegdeSession with JBPM?
Greets,
Alberto R. Galdo
argaldo(a)gmail.com
12 years, 1 month
Rete Tree node colors
by raffi
Hello,
after reading the documantation of the RETE algorithm here I have an
understanding problem.
I think the first step (after ReteNode) are the ObjectTypeNodes, colored in
blue in documentation. The view in eclipse shows me the red colored
AlphaNodes as first childs after the ReteNode. Afterwards there are the blue
colored ObjectTypeNodes. The number of these blue colored nodes corresponds
to the number of conditions for one type. That is why I ask about a possible
color changing.
Or do I have a generel misunderstanding there?
Greetings...
--
View this message in context: http://drools.46999.n3.nabble.com/Rete-Tree-node-colors-tp4020322.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month