Exit Instruction and Dependencies

9 views
Skip to first unread message

mauro

unread,
Dec 27, 2011, 9:36:36 AM12/27/11
to DTRules
at the end I convinced my collegues to use DTRules for one project of
my Company

- Exit instruction (or something equivalent) is supported by DTRules
grammar? I have
to test some input variables and raise arror if values are not
allowed. Wiothout Exit instruction I had
to raise a flag that I test in condition of each Excel sheets to avoid
running of other conditions

- Dependencies: could you confirm me this situation:
dtrules-engine: no dependency
el: java-cup-10k.jar, Flex.jar, dtrules-engine.jar
compilerutil: dtrules-engine.jar, poi-3.7-20101029.jar

I noticed also that dtrules-engine does not run if el is not in its
classpath but el is not needed for compilation

- did you already released SNAPSHOT 5.0 or are you still working on
it?


Thanks,
Mauro

paul snow

unread,
Dec 27, 2011, 1:31:56 PM12/27/11
to dtr...@googlegroups.com
at the end I convinced my collegues to use DTRules for one project of
my Company

Great!
 
- Exit instruction (or something equivalent) is supported by DTRules
grammar? I have to test some input variables and raise arror if values
are not allowed. Wiothout Exit instruction I had to raise a flag that I test
in condition of each Excel sheets to avoid running of other conditions

I am not sure I understand this question.  If a condition doesn't match, then
other conditions are not evaluated.  For example, if you have the following:

C1    Y   N
C2    N
C3         Y

A1    X
A2          X

If C1 fails (i.e. doesn't match, so will only match N) then C2 will never be
evaluated, but C3 will be.  On the other hand, if C1 matches, then C2 
will be evaluated, but not C3.

- Dependencies: could you confirm me this situation:
dtrules-engine: no dependency
el: java-cup-10k.jar, Flex.jar, dtrules-engine.jar
compilerutil: dtrules-engine.jar, poi-3.7-20101029.jar

This is correct.
 
I noticed also that dtrules-engine does not run if el is not in its
classpath but el is not needed for compilation

dtrules will complain if you do not have el in the classpath, but it will run.
 
- did you already released SNAPSHOT 5.0 or are you still working on
it?

The 5.0 SNAPSHOT is frozen, but I haven't had the time to do enough 
testing to make the 5.0 release.  At this point in time, no more features 
will be added to 5.0 SNAPSHOT, but I may make bug fixes.  
 

Thanks,
Mauro

I hope this helps.  If you email me decision tables you are working on, and
point out what you are trying to do, I can give you more specific guidance. 

Paul 

mauro

unread,
Dec 28, 2011, 3:32:51 AM12/28/11
to DTRules
I try to make an example about my first question.
Suppose that you have 2 tables:
table_1, table_2,

table_2 is calling table_1 in init


in table_1 you make some conditions and in case these condition are
not mattched you set a variable called ErrorCode (defined integer in
EDD, with default value=0) to a positive value=1.
Practically table_1 is:

C1 Y
C2 Y
C3 Y
otherwise
*






A1 X
A2 X
A3 X
Set ErrorCode=1 X


The logic is that if ErrorCode > 0 the other conditions in table_2
should not be run and the application should just show the output with
ErrorCode filled. I had to do like so in table_2:


ErrorCode=0 Y Y Y N
C1 Y
C2 Y
C3 Y


A1 X
A2 X
A3 X
SetErrorCode=ErrorCode Y



So I wanted to ask you if you had an EXIT/RETURN instruction that
allows to exit program immediately in particular cases like this one.
In this case I could use it directly in table_1

paul snow

unread,
Dec 28, 2011, 10:00:00 AM12/28/11
to dtr...@googlegroups.com
I see what you want.  There is a syntax for catching exceptions that would work with a little effort, but it seems we are missing the syntax for throwing an error.

The syntax for catching errors is:

   perform <Decision Table for your program> and on error 
                add <error entity name> to the context and 
               perform <error handling decision table name>

The problem is that we don't have code to raise an error.  You could always divide by zero to raise an error, but that is pretty ugly.

I will add the Exit syntax you want to EL, as well as the syntax to set up and throw an error.  For now, I think testing the variable may be what you have to do, as annoying as that might be.

Paul

mauro fraboni

unread,
Dec 28, 2011, 3:41:58 PM12/28/11
to dtr...@googlegroups.com
You wrote that el is not needed to run dtrules-engine; neither
compilerutil needs el: at this point I do not understand how can the
application raise compilation errors if components do not use el? Is
not el that implements the grammar and check that grammar is correct
in dt and edd?
Thanks

paul snow

unread,
Dec 28, 2011, 5:21:03 PM12/28/11
to dtr...@googlegroups.com

To run the decision tables, you do not need compileutiles nor El.  You only need them to convert excel and to compile.

Reply all
Reply to author
Forward
0 new messages