Hmm, that's only half the story... Think about this ...

'Create Date' > ($TIMESTAMP$ - (7 * 24 * 60 * 60))
AND
<whatever LJ Longwing quoted below>

i.e. qualifiers that involve arithmetic operations as well. The 
recursiveness/complexity grows even more... :)

Unless you're really trying to emulate the qualification evaluation (like AR 
workflow runtimes such as Server/Midtier/UserTool typically do), I suggest not 
to go deal with all this complexity yourself. Rather see, if your utility can 
get by, simply by offering a string representation of the qualifier. To do 
these, you can surely use ARServerUser.formatQualification/parseQualification 
etc routines within Java API to convert AR given qualifier object to a readable 
string format or the reverse. However, if your requirement is to really build 
the "qualifier tree object" and process it some how - then make sure that your 
logic indeed covers logical operators (Longwing quoted these below), as well as 
arithmetic operations and finally deal with field/keyword references 
appropriately.

HTH
Appajee

________________________________
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of LJ Longwing
Sent: Tuesday, October 27, 2009 8:15 AM
To: [email protected]
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Wow...ask a tough one....ok....took me FOREVER to figure out Qualifiers....but 
here is basically what you need to do.

A QualifierInfo object has three main parts, LeftOperand, Operation, and 
RightOperand.  To explain these parts I will give you an example

('Status' = "Fixed") AND ('Create Date' < $DATE$)

Ok, if that is your QualifierInfo object, here are your pieces

LeftOperand = ('Status' = "Fixed")
Operation = AND
RightOperand = ('Create Date' < $DATE$)

So, what I have done in several programs now is to write an iterative 
subroutine, if you check the operation to determine if it is a relational 
operation (< > = != etc).  If it's not, I throw RightOperand back into the sub 
till it is, If it is then you know you are down to a single operand, and then 
you can parse the field/value on left and right for what you want to check/test 
for.

Please let me know if this helps any....it's still a bit fuzzy in my head, but 
I understand it well enough as it is to do what I need to do.

_Platinum Sponsor: [email protected] ARSlist: "Where the Answers Are"_

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:[email protected] ARSlist: "Where the Answers Are"

Reply via email to