Hi,
I have included 2 test cases in the patch. If more are needed then just point me to
existing test cases and I will make of copy of those for the upgrade part. As you can see
the test cases that are included in the patch are also a copies of existing test cases.
Regards,
- Nimesh
From: rules-dev-bounces(a)lists.jboss.org [mailto:rules-dev-bounces@lists.jboss.org] On
Behalf Of Mark Proctor
Sent: Friday, October 31, 2008 5:25 PM
To: Rules Dev List
Subject: Re: [rules-dev] RE: [rules-users] Compatibility of Rule Flows from 4.0.7 to
5.0.0
Nimesh Muley wrote:
Hi,
Yes the patch detects which version and upgrades on the fly (Abrakadabra magic ;-)).
oh right, cool I'll check this out. I've been on conference for the last 3 weeks,
so I've got behind on looking at JIRAs, so if it's magic then I should be able to
just include it.
There is a system parameter ("drools.ruleflow.port"). The code checks for
version only when the system parameter is set to true. This was added so that there is no
overhead (CPU time) for users who are using rule flows in 5.0 only. Users using the old
rule flows in 5.0 and want upgrade must set this parameter to "true".
Main file to be checked for changes is
src/main/java/org/drools/compiler/ProcessBuilder.java. The other files are related to
cleanup (format as well as code) or test cases.
Modifying ProcessBuilder was easier / cleaner to control the upgrade of rule flows instead
of ProcessReader. If you feel otherwise then let me know and I will modify it.
If you feel more test cases should be added to make this more sturdy then let me know
which ones and I can submit the same too.
Don't know how many test cases you have, but more is always good, especially on
something with so many different possabilities. Especially for handling bad XML
gracefully.
Thanks.
Regards,
- Nimesh
From: rules-dev-bounces@lists.jboss.org<mailto:rules-dev-bounces@lists.jboss.org>
[mailto:rules-dev-bounces@lists.jboss.org] On Behalf Of Mark Proctor
Sent: Thursday, October 30, 2008 7:47 PM
To: Rules Dev List
Subject: Re: [rules-dev] RE: [rules-users] Compatibility of Rule Flows from 4.0.7 to
5.0.0
Nimesh Muley wrote:
Oh ok. I developed it because you mentioned whether it would be possible to plug it in
package reader.
I think we can close this JIRA as invalid.
The code handles the migration right, does it already hook into the package reader? I
wasn't sure, as i haven't read the code yet. Are you saying the patch will detect
which version of the XML it is, and upgrade on the fly?
My assumption was that it was just some code to migrate from 4 to 5, but someone still
needs to execute that, so it seemed the easiest route was to do this via an eclipse option
for now - as hooking into packagebuilder with auto detection was more work and needed more
testing, but if you have done this already....
In case there is a change of mind later on we already have a patch for it ;-).
see above.
Thanks.
Regards,
- Nimesh
From: rules-dev-bounces@lists.jboss.org<mailto:rules-dev-bounces@lists.jboss.org>
[mailto:rules-dev-bounces@lists.jboss.org] On Behalf Of Mark Proctor
Sent: Thursday, October 30, 2008 5:10 PM
To: Rules Dev List
Subject: Re: [rules-dev] RE: [rules-users] Compatibility of Rule Flows from 4.0.7 to
5.0.0
Nimesh Muley wrote:
Hi,
I have raised a feature request for this
https://jira.jboss.org/jira/browse/JBRULES-1797
and also submitted a patch (JBRULES-1797.patch.zip) for the same. If there are any changes
in the patch kindly let me know.
I believe kris is going to add a feature to eclipse where you can select a ruleflow for it
to convert, don't think we are going to go for auto-detection and conversion on the
fly with the packagebuilder.
Mark
Thanks.
Regards,
- Nimesh
From: rules-dev-bounces@lists.jboss.org<mailto:rules-dev-bounces@lists.jboss.org>
[mailto:rules-dev-bounces@lists.jboss.org] On Behalf Of Nimesh Muley
Sent: Monday, October 06, 2008 10:08 AM
To: 'rules-dev@lists.jboss.org<mailto:rules-dev@lists.jboss.org>'
Subject: [rules-dev] RE: [rules-users] Compatibility of Rule Flows from 4.0.7 to 5.0.0
Hi,
By going through the code it seems possible to achieve this by modifying
ProcessBuilder.addProcessFromFile. Easiest check would be to see whether the XML contains
element called as "process". Since XML Parsing is internal to the individual
releases (4.0 uses XStream and 5.0 uses XMLReader), I am not sure whether we should form a
XML document from the reader to check if the process belongs to version 4.0 or
compliant.
Brute force check would be indexOf ("<process") >= 0 then it is 5.0 else
4.0 ;-). I am sure there would be better ways than this kind of check.
I do not mind taking this further. Due to lack of in depth knowledge about drools, I am
not able to decide what the approach should be for checking the version.
This would be a really good feature as it would mean that drools 5.0 is backward compliant
for rule flows J. And this adds lot of confidence to enterprises.
p.s. Since this was now moving towards dev, I have moved the thread to the dev mailing
list.
Thanks.
Regards,
- Nimesh
From:
rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mark Proctor
Sent: Saturday, October 04, 2008 9:37 PM
To: Rules Users List
Subject: Re: [rules-users] Compatibility of Rule Flows from 4.0.7 to 5.0.0
You are a star, that saves us a lot of work :) I'm wondering if we can work this into
the package reader and some how have it detect whether something is version 4 or 5 and
convert first if it's 4, fancy having a look and seeing if that's possible?
Mark
Nimesh Muley wrote:
Hi,
I have attached a file for translating rule flows from 4.0 to 5.0. I have tested my flows
with the XSL and it works fine. However, the XSLT may not be quite slick or compact as I
have touched upon XSLT after a long time. I have covered all the nodes available (ruleSet,
start, end, join, split, milestone, action and subProcess).
There is one issue in the XSLT. I have not added the xmlns attribute to the process
element. Reason is that this attribute appears in child nodes too with empty string, even
though it is not mentioned for the child nodes. This attribute is needed in the
'process' node because the Eclipse editor for 5.0 ignores the process node if
there are more than 2 sub processes in that ruleflow. Am not sure why this is happening
but that has been my observation.
In case XSLT is not present as an attachment then let me know the location where it can be
uploaded.
Thanks.
Regards,
- Nimesh
From:
rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mark Proctor
Sent: Tuesday, September 30, 2008 7:26 PM
To: Rules Users List
Subject: Re: [rules-users] Compatibility of Rule Flows from 4.0.7 to 5.0.0
No they are not compatible, 5.0 has a new ePDL XML language that is human writable. I
suggest that somone in the community starts looking into an XSLT to translate them.
Mark
Vikrant Yagnick wrote:
Hi All,
I wanted to know if RuleFlows made using the Eclipse 4.0.7 RuleFlow Builder will work with
5.0.0. When, I try to upload a 4.0.7 ruleflow into Guvnor, I get a NullPointerException
and before that the following:
Cannot find the declaration of element
'org.drools.ruleflow.core.impl.RuleFlowProcessImpl'.
I checked the 5.0.0M1 jars for drools-core, and this class seems to have been removed from
there. Also, after installing the 5.0.0 plug-in into Eclipse, my rule-flow nodes have all
gone.
Also, this may be a minor bug but it says(both in the docs and the BRMS Guvnor M1
Release):
"Ruleflows allow flow control between rules. The eclipse plugin provides a graphical
editor. Upload ruleflow .rf files for inclusion in this package.":
Should the .rf say .rfm ?
Cheers,
Vikrant
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek
Limited, unless specifically indicated to that effect. Mastek Limited does not accept any
responsibility or liability for it. This e-mail and attachments (if any) transmitted with
it are confidential and/or privileged and solely for the use of the intended person or
entity to which it is addressed. Any review, re-transmission, dissemination or other use
of or taking of any action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the recipient to
run the virus check on e-mails and attachments before opening them. If you have received
this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
________________________________
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek
Limited, unless specifically indicated to that effect. Mastek Limited does not accept any
responsibility or liability for it. This e-mail and attachments (if any) transmitted with
it are confidential and/or privileged and solely for the use of the intended person or
entity to which it is addressed. Any review, re-transmission, dissemination or other use
of or taking of any action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the recipient to
run the virus check on e-mails and attachments before opening them. If you have received
this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
________________________________
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek
Limited, unless specifically indicated to that effect. Mastek Limited does not accept any
responsibility or liability for it. This e-mail and attachments (if any) transmitted with
it are confidential and/or privileged and solely for the use of the intended person or
entity to which it is addressed. Any review, re-transmission, dissemination or other use
of or taking of any action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the recipient to
run the virus check on e-mails and attachments before opening them. If you have received
this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek
Limited, unless specifically indicated to that effect. Mastek Limited does not accept any
responsibility or liability for it. This e-mail and attachments (if any) transmitted with
it are confidential and/or privileged and solely for the use of the intended person or
entity to which it is addressed. Any review, re-transmission, dissemination or other use
of or taking of any action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the recipient to
run the virus check on e-mails and attachments before opening them. If you have received
this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
________________________________
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org<mailto:rules-dev@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-dev
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek
Limited, unless specifically indicated to that effect. Mastek Limited does not accept any
responsibility or liability for it. This e-mail and attachments (if any) transmitted with
it are confidential and/or privileged and solely for the use of the intended person or
entity to which it is addressed. Any review, re-transmission, dissemination or other use
of or taking of any action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the recipient to
run the virus check on e-mails and attachments before opening them. If you have received
this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
________________________________
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org<mailto:rules-dev@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-dev
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek
Limited, unless specifically indicated to that effect. Mastek Limited does not accept any
responsibility or liability for it. This e-mail and attachments (if any) transmitted with
it are confidential and/or privileged and solely for the use of the intended person or
entity to which it is addressed. Any review, re-transmission, dissemination or other use
of or taking of any action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the recipient to
run the virus check on e-mails and attachments before opening them. If you have received
this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
________________________________
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org<mailto:rules-dev@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-dev
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek
Limited, unless specifically indicated to that effect. Mastek Limited does not accept any
responsibility or liability for it. This e-mail and attachments (if any) transmitted with
it are confidential and/or privileged and solely for the use of the intended person or
entity to which it is addressed. Any review, re-transmission, dissemination or other use
of or taking of any action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the recipient to
run the virus check on e-mails and attachments before opening them. If you have received
this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~