Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-11-19 Thread Rod Harris
Yes Misi,

I too am seeing the same bugs with the way that the dev studio parses
qualifications  expressions. In patch 2 I found a number of perfectly
valid table field qualifications were being rejected by the parser. In
patch 3 this is not occuring but it is removing parentheses in set
fields and totally changing the meaning of the expression on
occasions. Sometimes I have had to break things up into multiple
operations just to be sure that the parser wouldn't break it.

I'm hoping that patch 4 improves things a bit. There are a few little
bugs in Dev studio that are holding development speed back a little at
the moment. This is one as well as the need to sometimes select fields
more than once to get them to take in a set fields.

I'd rather go back to the old admin tool parser where it went overkill
with all of the parenthesis than the current flawed parsing.

The ideal solution would be to be able to store qualifications in the
schema as entered in dev studio and have the system honour the
precedence rules as documented. Surely this is possible but I expect
we will have to wait for release 8.


Rod



2009/11/19 Misi Mladoniczky m...@rrr.se:
 Hi Fred,

 Why would this have anything to do with flat files???

 The only reason for this that I can think of, is that the developers did
 not get enough time to do it right.

 I can not imagine a programmer that would not LOVE the challenge of
 optimizing a thing like this, and get payed to do it ;-)

        Best Regards - Misi, RRR AB, http://www.rrr.se

 Products from RRR Scandinavia:
 * RRR|License - Not enough Remedy licenses? Save money by optimizing.
 * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
 * RRR|Translator - Manage and automate your language translations.
 Find these products, and many free tools and utilities, at http://rrr.se.

 According to the Workflow Objects docs there is a operator precedence.

 Operator precedence

 When you use multiple operators to construct qualification criteria, they
 are evaluated in the following order:
   1 ( )
   2 NOT (!) - (unary minus)
   3 * / %
   4 + -
   5  =  = = != LIKE
   6 AND ()
   7 OR (||)
 Operators of the same precedence are performed left to right.
 You can use parentheses in an expression to override operator precedence.
 AR System evaluates expressions inside parentheses first before evaluating
 those outside.

 Part of the design of adding parenthesis probably goes back to when Remedy
 supported using flat files as a database.

 Fred

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Lyle Taylor
 Sent: Monday, November 02, 2009 2:12 PM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 It's possible that that's the motivation behind how it's currently
 architected, but it's not a very good excuse.  The SQL will all get
 dynamically generated based on the qualification tree generated by parsing
 the qualification string, not on the qualification string itself.  It's
 very doable to define qualification strings so that operator precedence,
 etc., is in line with common practice, and that wouldn't affect Remedy's
 ability to be DB agnostic in the slightest.  The only difference that it
 makes is that parsing the qualification strings becomes slightly more
 complicated (but still very doable - there are tools that will write much
 of this code for you - e.g., lex/yacc, etc.).  Once you've parsed the
 qualification string according to whatever rules you've put in place, you
 end up with the same data structure that they currently have which will
 then be used to generate the SQL just like they do now.  The current
 scheme is unnecessarily simplistic and actually makes the system more
 difficult to use because of the excessive number of parentheses in
 qualification schemese.

 Lyle

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Rick Cook
 Sent: Monday, November 02, 2009 12:46 PM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 Lyle, my take on that is that Remedy is trying to be DB agnostic.  Rather
 than compete with how each DB processes SQL, or trying to anticipate how a
 receiver of an API call might do so, they just kept it simple.


 Rick

 -Original Message-
 From:         Lyle Taylor tayl...@ldschurch.org
 Date:         Mon, 2 Nov 2009 12:29:40
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

From what I've been able to tell, there is no such thing as operator
 precedence in AR System aside from parentheses.  It all seems to be
 dictated on the parentheses which seems to correspond to the tree that
 their parser build internally.  There's a lot of room for improvement in
 the area of 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-11-19 Thread Grooms, Frederick W
I mentioned flat files for the following reason...  

I believe all flavors of a version of Remedy share a common code base. This is 
developed to use the common functions across the supported databases.
That's why in older versions of Remedy when you deleted a field on a form it 
would have to rename the table, create a new table, copy all the data from the 
old table to the new one, and then drop the renamed table (One of the databases 
supported at the time did not support the drop column).  

Some of the core routines probably have been reused from version to version.  
The routines to add parenthesis are old enough that they could go back to the 
time when the Remedy system supported using flat files as a database.

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
Sent: Thursday, November 19, 2009 1:18 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Hi Fred,

Why would this have anything to do with flat files???

The only reason for this that I can think of, is that the developers did
not get enough time to do it right.

I can not imagine a programmer that would not LOVE the challenge of
optimizing a thing like this, and get payed to do it ;-)

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free tools and utilities, at http://rrr.se.

 According to the Workflow Objects docs there is a operator precedence.

 Operator precedence

 When you use multiple operators to construct qualification criteria, they
 are evaluated in the following order:
   1 ( )
   2 NOT (!) - (unary minus)
   3 * / %
   4 + -
   5  =  = = != LIKE
   6 AND ()
   7 OR (||)
 Operators of the same precedence are performed left to right.
 You can use parentheses in an expression to override operator precedence.
 AR System evaluates expressions inside parentheses first before evaluating
 those outside.

 Part of the design of adding parenthesis probably goes back to when Remedy
 supported using flat files as a database.

 Fred

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Lyle Taylor
 Sent: Monday, November 02, 2009 2:12 PM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 It's possible that that's the motivation behind how it's currently
 architected, but it's not a very good excuse.  The SQL will all get
 dynamically generated based on the qualification tree generated by parsing
 the qualification string, not on the qualification string itself.  It's
 very doable to define qualification strings so that operator precedence,
 etc., is in line with common practice, and that wouldn't affect Remedy's
 ability to be DB agnostic in the slightest.  The only difference that it
 makes is that parsing the qualification strings becomes slightly more
 complicated (but still very doable - there are tools that will write much
 of this code for you - e.g., lex/yacc, etc.).  Once you've parsed the
 qualification string according to whatever rules you've put in place, you
 end up with the same data structure that they currently have which will
 then be used to generate the SQL just like they do now.  The current
 scheme is unnecessarily simplistic and actually makes the system more
 difficult to use because of the excessive number of parentheses in
 qualification schemese.

 Lyle

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Rick Cook
 Sent: Monday, November 02, 2009 12:46 PM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 Lyle, my take on that is that Remedy is trying to be DB agnostic.  Rather
 than compete with how each DB processes SQL, or trying to anticipate how a
 receiver of an API call might do so, they just kept it simple.


 Rick

 -Original Message-
 From: Lyle Taylor tayl...@ldschurch.org
 Date: Mon, 2 Nov 2009 12:29:40
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

From what I've been able to tell, there is no such thing as operator
 precedence in AR System aside from parentheses.  It all seems to be
 dictated on the parentheses which seems to correspond to the tree that
 their parser build internally.  There's a lot of room for improvement in
 the area of qualifications in Remedy, in my opinion.

 Lyle


 -Original Message-
 From: Action Request System discussion list(ARSList)
 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-11-18 Thread Misi Mladoniczky
Hi Fred,

Why would this have anything to do with flat files???

The only reason for this that I can think of, is that the developers did
not get enough time to do it right.

I can not imagine a programmer that would not LOVE the challenge of
optimizing a thing like this, and get payed to do it ;-)

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free tools and utilities, at http://rrr.se.

 According to the Workflow Objects docs there is a operator precedence.

 Operator precedence

 When you use multiple operators to construct qualification criteria, they
 are evaluated in the following order:
   1 ( )
   2 NOT (!) - (unary minus)
   3 * / %
   4 + -
   5  =  = = != LIKE
   6 AND ()
   7 OR (||)
 Operators of the same precedence are performed left to right.
 You can use parentheses in an expression to override operator precedence.
 AR System evaluates expressions inside parentheses first before evaluating
 those outside.

 Part of the design of adding parenthesis probably goes back to when Remedy
 supported using flat files as a database.

 Fred

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Lyle Taylor
 Sent: Monday, November 02, 2009 2:12 PM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 It's possible that that's the motivation behind how it's currently
 architected, but it's not a very good excuse.  The SQL will all get
 dynamically generated based on the qualification tree generated by parsing
 the qualification string, not on the qualification string itself.  It's
 very doable to define qualification strings so that operator precedence,
 etc., is in line with common practice, and that wouldn't affect Remedy's
 ability to be DB agnostic in the slightest.  The only difference that it
 makes is that parsing the qualification strings becomes slightly more
 complicated (but still very doable - there are tools that will write much
 of this code for you - e.g., lex/yacc, etc.).  Once you've parsed the
 qualification string according to whatever rules you've put in place, you
 end up with the same data structure that they currently have which will
 then be used to generate the SQL just like they do now.  The current
 scheme is unnecessarily simplistic and actually makes the system more
 difficult to use because of the excessive number of parentheses in
 qualification schemese.

 Lyle

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Rick Cook
 Sent: Monday, November 02, 2009 12:46 PM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 Lyle, my take on that is that Remedy is trying to be DB agnostic.  Rather
 than compete with how each DB processes SQL, or trying to anticipate how a
 receiver of an API call might do so, they just kept it simple.


 Rick

 -Original Message-
 From: Lyle Taylor tayl...@ldschurch.org
 Date: Mon, 2 Nov 2009 12:29:40
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

From what I've been able to tell, there is no such thing as operator
 precedence in AR System aside from parentheses.  It all seems to be
 dictated on the parentheses which seems to correspond to the tree that
 their parser build internally.  There's a lot of room for improvement in
 the area of qualifications in Remedy, in my opinion.

 Lyle


 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
 Sent: Thursday, October 29, 2009 2:13 AM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 Hi,

 Just tested some things.

 I am working on ARServer/Developer 7.5.0 patch 3.

 In the Run-If and Set/Push-Fields-If-Qualification, it still puts in extra
 brackets:

 What I entered:
 'CU:ID' = $CU:ID$ AND 'CO:ID' = $CO:ID$ AND 'Status' = Active
 After reopen:
 (('CU:ID' = $CU:ID$) AND ('CO:ID' = $CO:ID$)) AND ('Status' = Active)

 It seems like they did some efforts on the the VALUE in the
 Set/Push-Fields Action.

 The problem is that i does not work, the new BMC parenthesis optimizer is
 faulty!!!

 I entered:
 (1.0 + 2.0) * 3.0
 This is shown after reopening the filter:
 1.0 + 2.0 * 3.0

 They must take into account that the * has a higher priority than the +,
 and put in parenthesis accordingly, if needed.

 Best Regards - Misi, RRR AB, http://www.rrr.se

 Products from RRR Scandinavia:
 * 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-11-02 Thread Lyle Taylor
From what I've been able to tell, there is no such thing as operator 
precedence in AR System aside from parentheses.  It all seems to be dictated 
on the parentheses which seems to correspond to the tree that their parser 
build internally.  There's a lot of room for improvement in the area of 
qualifications in Remedy, in my opinion.

Lyle


-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
Sent: Thursday, October 29, 2009 2:13 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Hi,

Just tested some things.

I am working on ARServer/Developer 7.5.0 patch 3.

In the Run-If and Set/Push-Fields-If-Qualification, it still puts in extra
brackets:

What I entered:
'CU:ID' = $CU:ID$ AND 'CO:ID' = $CO:ID$ AND 'Status' = Active
After reopen:
(('CU:ID' = $CU:ID$) AND ('CO:ID' = $CO:ID$)) AND ('Status' = Active)

It seems like they did some efforts on the the VALUE in the
Set/Push-Fields Action.

The problem is that i does not work, the new BMC parenthesis optimizer is
faulty!!!

I entered:
(1.0 + 2.0) * 3.0
This is shown after reopening the filter:
1.0 + 2.0 * 3.0

They must take into account that the * has a higher priority than the +,
and put in parenthesis accordingly, if needed.

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free tools and utilities, at http://rrr.se.

 Misi,
 There was a fix put in toI think it was set/push action qualifications
 to fix their excess parenthesis, but I wasn't aware of any more still
 being
 in existence.  Can you give me an example of where you are seeing it?

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
 Sent: Wednesday, October 28, 2009 4:31 AM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 Hi,

 It would be very nice if someone could take the time to create an
 algorithm
 that removed the unnecessary grouping parentheses...

 Best Regards - Misi, RRR AB, http://www.rrr.se

 Products from RRR Scandinavia:
 * RRR|License - Not enough Remedy licenses? Save money by optimizing.
 * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
 * RRR|Translator - Manage and automate your language translations.
 Find these products, and many free tools and utilities, at http://rrr.se.

 Wow...ask a tough oneoktook me FOREVER to figure out
 Qualifiersbut 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 anyit's still a bit fuzzy in my
 head, but I understand it well enough as it is to do what I need to do.

   _

 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of David Morgan
 Sent: Tuesday, October 27, 2009 8:33 AM
 To: arslist@ARSLIST.ORG
 Subject: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)


 **

 Hi ARSListers,



 I have been looking at the Java API but am stumped by Qualifiers.



 String name1 = Demo;

 String swd = etno;

 String sname = dclha002;

 Integer tcpport = 8001;

 Integer rpcnum = 0;





 ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

 // Check and verify user login:

  try {

// If User Pass/Acct name is wrong, this gens an error.

context.login();



  } catch( ARException e ) {

System.out.println( Login Error :  +  Possible Bad password
 or acct name.  );

//This return ends all further processing and exits...

 return;

  }

 ListActiveLink
 aLinkObjs=context.getListActiveLinkObjects(AST:WorkLog);

 int x = 0;

 for (int i = 0; i  aLinkObjs.size(); i++) {

 System.out.format(\n%20s%60s\n\n, i,
 aLinkObjs.get(i).getName());

 //ActiveLink alink = aLinkObjs.get(x);



 try{

 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-11-02 Thread Rick Cook
Lyle, my take on that is that Remedy is trying to be DB agnostic.  Rather than 
compete with how each DB processes SQL, or trying to anticipate how a receiver 
of an API call might do so, they just kept it simple. 


Rick

-Original Message-
From: Lyle Taylor tayl...@ldschurch.org
Date: Mon, 2 Nov 2009 12:29:40 
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

From what I've been able to tell, there is no such thing as operator precedence 
in AR System aside from parentheses.  It all seems to be dictated on the 
parentheses which seems to correspond to the tree that their parser build 
internally.  There's a lot of room for improvement in the area of 
qualifications in Remedy, in my opinion.

Lyle


-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
Sent: Thursday, October 29, 2009 2:13 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Hi,

Just tested some things.

I am working on ARServer/Developer 7.5.0 patch 3.

In the Run-If and Set/Push-Fields-If-Qualification, it still puts in extra
brackets:

What I entered:
'CU:ID' = $CU:ID$ AND 'CO:ID' = $CO:ID$ AND 'Status' = Active
After reopen:
(('CU:ID' = $CU:ID$) AND ('CO:ID' = $CO:ID$)) AND ('Status' = Active)

It seems like they did some efforts on the the VALUE in the
Set/Push-Fields Action.

The problem is that i does not work, the new BMC parenthesis optimizer is
faulty!!!

I entered:
(1.0 + 2.0) * 3.0
This is shown after reopening the filter:
1.0 + 2.0 * 3.0

They must take into account that the * has a higher priority than the +,
and put in parenthesis accordingly, if needed.

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free tools and utilities, at http://rrr.se.

 Misi,
 There was a fix put in toI think it was set/push action qualifications
 to fix their excess parenthesis, but I wasn't aware of any more still
 being
 in existence.  Can you give me an example of where you are seeing it?

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
 Sent: Wednesday, October 28, 2009 4:31 AM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 Hi,

 It would be very nice if someone could take the time to create an
 algorithm
 that removed the unnecessary grouping parentheses...

 Best Regards - Misi, RRR AB, http://www.rrr.se

 Products from RRR Scandinavia:
 * RRR|License - Not enough Remedy licenses? Save money by optimizing.
 * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
 * RRR|Translator - Manage and automate your language translations.
 Find these products, and many free tools and utilities, at http://rrr.se.

 Wow...ask a tough oneoktook me FOREVER to figure out
 Qualifiersbut 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 anyit's still a bit fuzzy in my
 head, but I understand it well enough as it is to do what I need to do.

_

 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of David Morgan
 Sent: Tuesday, October 27, 2009 8:33 AM
 To: arslist@ARSLIST.ORG
 Subject: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)


 **

 Hi ARSListers,



 I have been looking at the Java API but am stumped by Qualifiers.



 String name1 = Demo;

 String swd = etno;

 String sname = dclha002;

 Integer tcpport = 8001;

 Integer rpcnum = 0;





 ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

 // Check and verify user login:

  try {

// If User Pass/Acct name is wrong, this gens an error.

context.login();



  } catch( ARException e ) {


Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-11-02 Thread Lyle Taylor
It's possible that that's the motivation behind how it's currently architected, 
but it's not a very good excuse.  The SQL will all get dynamically generated 
based on the qualification tree generated by parsing the qualification string, 
not on the qualification string itself.  It's very doable to define 
qualification strings so that operator precedence, etc., is in line with common 
practice, and that wouldn't affect Remedy's ability to be DB agnostic in the 
slightest.  The only difference that it makes is that parsing the qualification 
strings becomes slightly more complicated (but still very doable - there are 
tools that will write much of this code for you - e.g., lex/yacc, etc.).  Once 
you've parsed the qualification string according to whatever rules you've put 
in place, you end up with the same data structure that they currently have 
which will then be used to generate the SQL just like they do now.  The current 
scheme is unnecessarily simplistic and actually makes the system more difficult 
to use because of the excessive number of parentheses in qualification schemese.

Lyle

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Rick Cook
Sent: Monday, November 02, 2009 12:46 PM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Lyle, my take on that is that Remedy is trying to be DB agnostic.  Rather than 
compete with how each DB processes SQL, or trying to anticipate how a receiver 
of an API call might do so, they just kept it simple. 


Rick

-Original Message-
From: Lyle Taylor tayl...@ldschurch.org
Date: Mon, 2 Nov 2009 12:29:40 
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

From what I've been able to tell, there is no such thing as operator 
precedence in AR System aside from parentheses.  It all seems to be dictated 
on the parentheses which seems to correspond to the tree that their parser 
build internally.  There's a lot of room for improvement in the area of 
qualifications in Remedy, in my opinion.

Lyle


-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
Sent: Thursday, October 29, 2009 2:13 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Hi,

Just tested some things.

I am working on ARServer/Developer 7.5.0 patch 3.

In the Run-If and Set/Push-Fields-If-Qualification, it still puts in extra
brackets:

What I entered:
'CU:ID' = $CU:ID$ AND 'CO:ID' = $CO:ID$ AND 'Status' = Active
After reopen:
(('CU:ID' = $CU:ID$) AND ('CO:ID' = $CO:ID$)) AND ('Status' = Active)

It seems like they did some efforts on the the VALUE in the
Set/Push-Fields Action.

The problem is that i does not work, the new BMC parenthesis optimizer is
faulty!!!

I entered:
(1.0 + 2.0) * 3.0
This is shown after reopening the filter:
1.0 + 2.0 * 3.0

They must take into account that the * has a higher priority than the +,
and put in parenthesis accordingly, if needed.

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free tools and utilities, at http://rrr.se.

 Misi,
 There was a fix put in toI think it was set/push action qualifications
 to fix their excess parenthesis, but I wasn't aware of any more still
 being
 in existence.  Can you give me an example of where you are seeing it?

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
 Sent: Wednesday, October 28, 2009 4:31 AM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 Hi,

 It would be very nice if someone could take the time to create an
 algorithm
 that removed the unnecessary grouping parentheses...

 Best Regards - Misi, RRR AB, http://www.rrr.se

 Products from RRR Scandinavia:
 * RRR|License - Not enough Remedy licenses? Save money by optimizing.
 * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
 * RRR|Translator - Manage and automate your language translations.
 Find these products, and many free tools and utilities, at http://rrr.se.

 Wow...ask a tough oneoktook me FOREVER to figure out
 Qualifiersbut 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 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-11-02 Thread Grooms, Frederick W
According to the Workflow Objects docs there is a operator precedence.

Operator precedence

When you use multiple operators to construct qualification criteria, they are 
evaluated in the following order:   
  1 ( )   
  2 NOT (!) - (unary minus)   
  3 * / %   
  4 + -   
  5  =  = = != LIKE   
  6 AND ()   
  7 OR (||)   
Operators of the same precedence are performed left to right.   
You can use parentheses in an expression to override operator precedence.   
AR System evaluates expressions inside parentheses first before evaluating 
those outside.   

Part of the design of adding parenthesis probably goes back to when Remedy 
supported using flat files as a database.  

Fred

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Lyle Taylor
Sent: Monday, November 02, 2009 2:12 PM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

It's possible that that's the motivation behind how it's currently architected, 
but it's not a very good excuse.  The SQL will all get dynamically generated 
based on the qualification tree generated by parsing the qualification string, 
not on the qualification string itself.  It's very doable to define 
qualification strings so that operator precedence, etc., is in line with common 
practice, and that wouldn't affect Remedy's ability to be DB agnostic in the 
slightest.  The only difference that it makes is that parsing the qualification 
strings becomes slightly more complicated (but still very doable - there are 
tools that will write much of this code for you - e.g., lex/yacc, etc.).  Once 
you've parsed the qualification string according to whatever rules you've put 
in place, you end up with the same data structure that they currently have 
which will then be used to generate the SQL just like they do now.  The current 
scheme is unnecessarily simplistic and actually makes the system more difficult 
to use because of the excessive number of parentheses in qualification schemese.

Lyle

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Rick Cook
Sent: Monday, November 02, 2009 12:46 PM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Lyle, my take on that is that Remedy is trying to be DB agnostic.  Rather than 
compete with how each DB processes SQL, or trying to anticipate how a receiver 
of an API call might do so, they just kept it simple. 


Rick

-Original Message-
From: Lyle Taylor tayl...@ldschurch.org
Date: Mon, 2 Nov 2009 12:29:40 
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

From what I've been able to tell, there is no such thing as operator 
precedence in AR System aside from parentheses.  It all seems to be dictated 
on the parentheses which seems to correspond to the tree that their parser 
build internally.  There's a lot of room for improvement in the area of 
qualifications in Remedy, in my opinion.

Lyle


-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
Sent: Thursday, October 29, 2009 2:13 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Hi,

Just tested some things.

I am working on ARServer/Developer 7.5.0 patch 3.

In the Run-If and Set/Push-Fields-If-Qualification, it still puts in extra
brackets:

What I entered:
'CU:ID' = $CU:ID$ AND 'CO:ID' = $CO:ID$ AND 'Status' = Active
After reopen:
(('CU:ID' = $CU:ID$) AND ('CO:ID' = $CO:ID$)) AND ('Status' = Active)

It seems like they did some efforts on the the VALUE in the
Set/Push-Fields Action.

The problem is that i does not work, the new BMC parenthesis optimizer is
faulty!!!

I entered:
(1.0 + 2.0) * 3.0
This is shown after reopening the filter:
1.0 + 2.0 * 3.0

They must take into account that the * has a higher priority than the +,
and put in parenthesis accordingly, if needed.

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free tools and utilities, at http://rrr.se.

 Misi,
 There was a fix put in toI think it was set/push action qualifications
 to fix their excess parenthesis, but I wasn't aware of any more still
 being
 in existence.  Can you give me an example of where you are seeing it?

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
 Sent: Wednesday, October 28, 2009 4:31 AM
 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-11-02 Thread Lyle Taylor
Hmm.  OK.  My bad.  I tried to find that once and couldn't find anything.  I 
guess I didn't look hard enough.  Thanks for pointing that out, Fred.

Lyle

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Grooms, Frederick W
Sent: Monday, November 02, 2009 1:37 PM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

According to the Workflow Objects docs there is a operator precedence.

Operator precedence

When you use multiple operators to construct qualification criteria, they are 
evaluated in the following order:   
  1 ( )   
  2 NOT (!) - (unary minus)   
  3 * / %   
  4 + -   
  5  =  = = != LIKE   
  6 AND ()   
  7 OR (||)   
Operators of the same precedence are performed left to right.   
You can use parentheses in an expression to override operator precedence.   
AR System evaluates expressions inside parentheses first before evaluating 
those outside.   

Part of the design of adding parenthesis probably goes back to when Remedy 
supported using flat files as a database.  

Fred

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Lyle Taylor
Sent: Monday, November 02, 2009 2:12 PM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

It's possible that that's the motivation behind how it's currently architected, 
but it's not a very good excuse.  The SQL will all get dynamically generated 
based on the qualification tree generated by parsing the qualification string, 
not on the qualification string itself.  It's very doable to define 
qualification strings so that operator precedence, etc., is in line with common 
practice, and that wouldn't affect Remedy's ability to be DB agnostic in the 
slightest.  The only difference that it makes is that parsing the qualification 
strings becomes slightly more complicated (but still very doable - there are 
tools that will write much of this code for you - e.g., lex/yacc, etc.).  Once 
you've parsed the qualification string according to whatever rules you've put 
in place, you end up with the same data structure that they currently have 
which will then be used to generate the SQL just like they do now.  The current 
scheme is unnecessarily simplistic and actually makes the system more difficult 
to use because of the excessive number of parentheses in qualification schemese.

Lyle

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Rick Cook
Sent: Monday, November 02, 2009 12:46 PM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Lyle, my take on that is that Remedy is trying to be DB agnostic.  Rather than 
compete with how each DB processes SQL, or trying to anticipate how a receiver 
of an API call might do so, they just kept it simple. 


Rick

-Original Message-
From: Lyle Taylor tayl...@ldschurch.org
Date: Mon, 2 Nov 2009 12:29:40 
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

From what I've been able to tell, there is no such thing as operator 
precedence in AR System aside from parentheses.  It all seems to be dictated 
on the parentheses which seems to correspond to the tree that their parser 
build internally.  There's a lot of room for improvement in the area of 
qualifications in Remedy, in my opinion.

Lyle


-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
Sent: Thursday, October 29, 2009 2:13 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Hi,

Just tested some things.

I am working on ARServer/Developer 7.5.0 patch 3.

In the Run-If and Set/Push-Fields-If-Qualification, it still puts in extra
brackets:

What I entered:
'CU:ID' = $CU:ID$ AND 'CO:ID' = $CO:ID$ AND 'Status' = Active
After reopen:
(('CU:ID' = $CU:ID$) AND ('CO:ID' = $CO:ID$)) AND ('Status' = Active)

It seems like they did some efforts on the the VALUE in the
Set/Push-Fields Action.

The problem is that i does not work, the new BMC parenthesis optimizer is
faulty!!!

I entered:
(1.0 + 2.0) * 3.0
This is shown after reopening the filter:
1.0 + 2.0 * 3.0

They must take into account that the * has a higher priority than the +,
and put in parenthesis accordingly, if needed.

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-29 Thread Misi Mladoniczky
Hi,

Just tested some things.

I am working on ARServer/Developer 7.5.0 patch 3.

In the Run-If and Set/Push-Fields-If-Qualification, it still puts in extra
brackets:

What I entered:
'CU:ID' = $CU:ID$ AND 'CO:ID' = $CO:ID$ AND 'Status' = Active
After reopen:
(('CU:ID' = $CU:ID$) AND ('CO:ID' = $CO:ID$)) AND ('Status' = Active)

It seems like they did some efforts on the the VALUE in the
Set/Push-Fields Action.

The problem is that i does not work, the new BMC parenthesis optimizer is
faulty!!!

I entered:
(1.0 + 2.0) * 3.0
This is shown after reopening the filter:
1.0 + 2.0 * 3.0

They must take into account that the * has a higher priority than the +,
and put in parenthesis accordingly, if needed.

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free tools and utilities, at http://rrr.se.

 Misi,
 There was a fix put in toI think it was set/push action qualifications
 to fix their excess parenthesis, but I wasn't aware of any more still
 being
 in existence.  Can you give me an example of where you are seeing it?

 -Original Message-
 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
 Sent: Wednesday, October 28, 2009 4:31 AM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 Hi,

 It would be very nice if someone could take the time to create an
 algorithm
 that removed the unnecessary grouping parentheses...

 Best Regards - Misi, RRR AB, http://www.rrr.se

 Products from RRR Scandinavia:
 * RRR|License - Not enough Remedy licenses? Save money by optimizing.
 * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
 * RRR|Translator - Manage and automate your language translations.
 Find these products, and many free tools and utilities, at http://rrr.se.

 Wow...ask a tough oneoktook me FOREVER to figure out
 Qualifiersbut 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 anyit's still a bit fuzzy in my
 head, but I understand it well enough as it is to do what I need to do.

   _

 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of David Morgan
 Sent: Tuesday, October 27, 2009 8:33 AM
 To: arslist@ARSLIST.ORG
 Subject: Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)


 **

 Hi ARSListers,



 I have been looking at the Java API but am stumped by Qualifiers.



 String name1 = Demo;

 String swd = etno;

 String sname = dclha002;

 Integer tcpport = 8001;

 Integer rpcnum = 0;





 ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

 // Check and verify user login:

  try {

// If User Pass/Acct name is wrong, this gens an error.

context.login();



  } catch( ARException e ) {

System.out.println( Login Error :  +  Possible Bad password
 or acct name.  );

//This return ends all further processing and exits...

 return;

  }

 ListActiveLink
 aLinkObjs=context.getListActiveLinkObjects(AST:WorkLog);

 int x = 0;

 for (int i = 0; i  aLinkObjs.size(); i++) {

 System.out.format(\n%20s%60s\n\n, i,
 aLinkObjs.get(i).getName());

 //ActiveLink alink = aLinkObjs.get(x);



 try{

 QualifierInfo encryptedQual =
 aLinkObjs.get(i).getQualifier();

 System.out.println(encryptedQual.toString() );

 RelationalOperationInfo qualEnglish =
 encryptedQual.getRelationalOperationInfo();



 System.out.println(Qual : + qualEnglish.toString());

 } catch (Exception e){

 System.out.println(no Qualification\n);

 }





 if (aLinkObjs.get(i).toString().contentEquals(ASI:AWL:Close_100)
 ) {

 x = i ;

// System.out.println(x);

 }

 }

 context.logout();

 }



 I can get the names of the Active links associated with the 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-29 Thread Ben Chernys
Hi Misi,

The structs involved in values are similar in that they are a binary tree.
There are no parentheses.  The function that creates strings from them
(there wasn't one when I wrote my f()) may be faulty.  In particular, I
would consider your example of the missing parenthesis a serious flaw.  You
could look in the native representation of the assignment on the server
(using an sql query) and then interpret it manually to verify that the fault
is only on the new admin tool's representation of the (hopefully) correct
internal representation.

I'll have somewhat of a look when I run my schema dump program on a 7.5 ITSM
as I still use my old f() to transform these structs into human readable
strings.  This won't happen too soon though.

In any event, dropping the parentheses in your expression and then saving
your workflow again will cause a problem and is a serious bug.

Good luck in Vegas

Cheers
Ben

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
Sent: October 29, 2009 9:13 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
Link (for example)

Hi,

Just tested some things.

I am working on ARServer/Developer 7.5.0 patch 3.

In the Run-If and Set/Push-Fields-If-Qualification, it still puts in extra
brackets:

What I entered:
'CU:ID' = $CU:ID$ AND 'CO:ID' = $CO:ID$ AND 'Status' = Active
After reopen:
(('CU:ID' = $CU:ID$) AND ('CO:ID' = $CO:ID$)) AND ('Status' = Active)

It seems like they did some efforts on the the VALUE in the Set/Push-Fields
Action.

The problem is that i does not work, the new BMC parenthesis optimizer is
faulty!!!

I entered:
(1.0 + 2.0) * 3.0
This is shown after reopening the filter:
1.0 + 2.0 * 3.0

They must take into account that the * has a higher priority than the +, and
put in parenthesis accordingly, if needed.

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free tools and utilities, at http://rrr.se.

 Misi,
 There was a fix put in toI think it was set/push action 
 qualifications to fix their excess parenthesis, but I wasn't aware of 
 any more still being in existence.  Can you give me an example of 
 where you are seeing it?

 -Original Message-
 From: Action Request System discussion list(ARSList) 
 [mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
 Sent: Wednesday, October 28, 2009 4:31 AM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an 
 Active Link (for example)

 Hi,

 It would be very nice if someone could take the time to create an 
 algorithm that removed the unnecessary grouping parentheses...

 Best Regards - Misi, RRR AB, http://www.rrr.se

 Products from RRR Scandinavia:
 * RRR|License - Not enough Remedy licenses? Save money by optimizing.
 * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
 * RRR|Translator - Manage and automate your language translations.
 Find these products, and many free tools and utilities, at http://rrr.se.

 Wow...ask a tough oneoktook me FOREVER to figure out 
 Qualifiersbut 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 anyit's still a bit fuzzy in my 
 head, but I understand it well enough as it is to do what I need to do..

   _

 From: Action Request System discussion list(ARSList) 
 [mailto:arsl...@arslist.org] On Behalf Of David Morgan
 Sent: Tuesday, October 27, 2009 8:33 AM
 To: arslist@ARSLIST.ORG
 Subject: Java API for ARS - How to obtain a Run-If line from an 
 Active Link (for example)


 **

 Hi ARSListers,



 I have been looking at the Java API but am stumped by Qualifiers.



 String name1 = Demo;

 String swd = etno;

 String sname = dclha002;

 Integer tcpport = 8001;

 Integer rpcnum = 0;





 ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

 // Check and verify user login:

  try {

// If User 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-29 Thread David Morgan
Many thanks Calman - I think that was the one I was looking for !! :-)

Regards
Dave Morgan


-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of Calman Steynberg
Sent: 27 October 2009 19:27
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an
Active Link (for example)

--0016e646114252fd510476efa83e
Content-Type: text/plain; charset=ISO-8859-1

To get a human readable string for a QualifierInfo object use
ARServerUser.formatQualification();

From the JavaDocs for the method:

Stringeclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.arsys.api%7BARServerU
ser.java%E2%98%83ARServerUser%7EformatQualification%7EQString;%7EQObject
;%E2%98%82Stringcom.bmc.arsys.api.
ARServerUsereclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.arsys.api%7BARS
erverUser.java%E2%98%83ARServerUser
.formatQualification(Stringeclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.
arsys.api%7BARServerUser.java%E2%98%83ARServerUser%7EformatQualification
%7EQString;%7EQObject;%E2%98%82Stringform,
Objecteclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.arsys.api%7BARServerU
ser.java%E2%98%83ARServerUser%7EformatQualification%7EQString;%7EQObject
;%E2%98%82Objectqualification)
throws
ARExceptioneclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.arsys.api%7BARSe
rverUser.java%E2%98%83ARServerUser%7EformatQualification%7EQString;%7EQO
bject;%E2%98%82ARException

Formats an internal representation of a qualifier to a readable String
Parameters: *form* Form against which this qualification is defined *
qualification* given qualification - it can be an encoded qualification
representation (String) or a QualifierInfo object Returns: Readable
qualification string Throws:
ARExceptioneclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.arsys.api%7BARSe
rverUser.java%E2%98%83ARServerUser%7EformatQualification%7EQString;%7EQO
bject;%E2%98%82ARException-
in case of formatting errors

In your code below, you can do it by using the following line:

System.out.println(context.formatQualification(aLinkObjs.get(i).getPrima
ryForm(),
aLinkObjs.get(i).getQualifier()) );


Hope that helps.

Calman


On Tue, Oct 27, 2009 at 8:14 AM, LJ Longwing lj.longw...@gmail.com
wrote:

 **
 Wow...ask a tough oneoktook me FOREVER to figure out
 Qualifiersbut 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 anyit's still a bit fuzzy in my
head,
 but I understand it well enough as it is to do what I need to do.

  --
 *From:* Action Request System discussion list(ARSList) [mailto:
 arsl...@arslist.org] *On Behalf Of *David Morgan
 *Sent:* Tuesday, October 27, 2009 8:33 AM
 *To:* arslist@ARSLIST.ORG
 *Subject:* Java API for ARS - How to obtain a Run-If line from an
Active
 Link (for example)

 **

 Hi ARSListers,



 I have been looking at the Java API but am stumped by Qualifiers.



 String name1 = Demo;

 String swd = etno;

 String sname = dclha002;

 Integer tcpport = 8001;

 Integer rpcnum = 0;





 ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

 // Check and verify user login:

  try {

// If User Pass/Acct name is wrong, this gens an error.

context.login();



  } catch( ARException e ) {

System.out.println( Login Error :  +  Possible Bad password
or
 acct name.  );

//This return ends all further processing and exits...

 return;

  }

 ListActiveLink
aLinkObjs=context.getListActiveLinkObjects(AST:WorkLog);

 int x = 0;

 for (int i = 0; i  aLinkObjs.size(); i++) {

 System.out.format(\n%20s%60s\n\n, i,
aLinkObjs.get(i).getName());

 //ActiveLink alink = aLinkObjs.get(x);



 try{

 QualifierInfo encryptedQual =
 aLinkObjs.get(i).getQualifier();

 System.out.println(encryptedQual.toString() );

 RelationalOperationInfo qualEnglish =
 encryptedQual.getRelationalOperationInfo();



 System.out.println(Qual : + qualEnglish.toString());

 } catch (Exception e){

 System.out.println(no Qualification\n);

 }





 if (aLinkObjs.get(i).toString().contentEquals(ASI:AWL:Close_100)
) {

 x = i ;

// 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-29 Thread LJ Longwing
Okso your complaint is not at all about ARInside, which is what I
thought you were talking about...:)I would say that in your situation
regarding the arithmetic, I would open a defect with BMC...because what you
entered is most definitely not what comes back when you re-open it...9 vs.
7 

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
Sent: Thursday, October 29, 2009 2:13 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
Link (for example)

Hi,

Just tested some things.

I am working on ARServer/Developer 7.5.0 patch 3.

In the Run-If and Set/Push-Fields-If-Qualification, it still puts in extra
brackets:

What I entered:
'CU:ID' = $CU:ID$ AND 'CO:ID' = $CO:ID$ AND 'Status' = Active
After reopen:
(('CU:ID' = $CU:ID$) AND ('CO:ID' = $CO:ID$)) AND ('Status' = Active)

It seems like they did some efforts on the the VALUE in the Set/Push-Fields
Action.

The problem is that i does not work, the new BMC parenthesis optimizer is
faulty!!!

I entered:
(1.0 + 2.0) * 3.0
This is shown after reopening the filter:
1.0 + 2.0 * 3.0

They must take into account that the * has a higher priority than the +, and
put in parenthesis accordingly, if needed.

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free tools and utilities, at http://rrr.se.

 Misi,
 There was a fix put in toI think it was set/push action 
 qualifications to fix their excess parenthesis, but I wasn't aware of 
 any more still being in existence.  Can you give me an example of 
 where you are seeing it?

 -Original Message-
 From: Action Request System discussion list(ARSList) 
 [mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
 Sent: Wednesday, October 28, 2009 4:31 AM
 To: arslist@ARSLIST.ORG
 Subject: Re: Java API for ARS - How to obtain a Run-If line from an 
 Active Link (for example)

 Hi,

 It would be very nice if someone could take the time to create an 
 algorithm that removed the unnecessary grouping parentheses...

 Best Regards - Misi, RRR AB, http://www.rrr.se

 Products from RRR Scandinavia:
 * RRR|License - Not enough Remedy licenses? Save money by optimizing.
 * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
 * RRR|Translator - Manage and automate your language translations.
 Find these products, and many free tools and utilities, at http://rrr.se.

 Wow...ask a tough oneoktook me FOREVER to figure out 
 Qualifiersbut 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 anyit's still a bit fuzzy in my 
 head, but I understand it well enough as it is to do what I need to do.

   _

 From: Action Request System discussion list(ARSList) 
 [mailto:arsl...@arslist.org] On Behalf Of David Morgan
 Sent: Tuesday, October 27, 2009 8:33 AM
 To: arslist@ARSLIST.ORG
 Subject: Java API for ARS - How to obtain a Run-If line from an 
 Active Link (for example)


 **

 Hi ARSListers,



 I have been looking at the Java API but am stumped by Qualifiers.



 String name1 = Demo;

 String swd = etno;

 String sname = dclha002;

 Integer tcpport = 8001;

 Integer rpcnum = 0;





 ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

 // Check and verify user login:

  try {

// If User Pass/Acct name is wrong, this gens an error.

context.login();



  } catch( ARException e ) {

System.out.println( Login Error :  +  Possible Bad password 
 or acct name.  );

//This return ends all further processing and exits...

 return;

  }

 ListActiveLink
 aLinkObjs=context.getListActiveLinkObjects(AST:WorkLog);

 int x = 0;

 for (int i = 0; i  aLinkObjs.size(); i++) {

 System.out.format(\n%20s%60s\n\n, i, 
 aLinkObjs.get(i).getName());

 //ActiveLink alink = aLinkObjs.get(x);



 try{

 QualifierInfo encryptedQual = 
 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-28 Thread Misi Mladoniczky
Hi,

It would be very nice if someone could take the time to create an
algorithm that removed the unnecessary grouping parentheses...

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free tools and utilities, at http://rrr.se.

 Wow...ask a tough oneoktook me FOREVER to figure out
 Qualifiersbut 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 anyit's still a bit fuzzy in my head,
 but I understand it well enough as it is to do what I need to do.

   _

 From: Action Request System discussion list(ARSList)
 [mailto:arsl...@arslist.org] On Behalf Of David Morgan
 Sent: Tuesday, October 27, 2009 8:33 AM
 To: arslist@ARSLIST.ORG
 Subject: Java API for ARS - How to obtain a Run-If line from an Active
 Link
 (for example)


 **

 Hi ARSListers,



 I have been looking at the Java API but am stumped by Qualifiers.



 String name1 = Demo;

 String swd = etno;

 String sname = dclha002;

 Integer tcpport = 8001;

 Integer rpcnum = 0;





 ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

 // Check and verify user login:

  try {

// If User Pass/Acct name is wrong, this gens an error.

context.login();



  } catch( ARException e ) {

System.out.println( Login Error :  +  Possible Bad password or
 acct name.  );

//This return ends all further processing and exits...

 return;

  }

 ListActiveLink
 aLinkObjs=context.getListActiveLinkObjects(AST:WorkLog);

 int x = 0;

 for (int i = 0; i  aLinkObjs.size(); i++) {

 System.out.format(\n%20s%60s\n\n, i, aLinkObjs.get(i).getName());

 //ActiveLink alink = aLinkObjs.get(x);



 try{

 QualifierInfo encryptedQual =
 aLinkObjs.get(i).getQualifier();

 System.out.println(encryptedQual.toString() );

 RelationalOperationInfo qualEnglish =
 encryptedQual.getRelationalOperationInfo();



 System.out.println(Qual : + qualEnglish.toString());

 } catch (Exception e){

 System.out.println(no Qualification\n);

 }





 if (aLinkObjs.get(i).toString().contentEquals(ASI:AWL:Close_100) ) {

 x = i ;

// System.out.println(x);

 }

 }

 context.logout();

 }



 I can get the names of the Active links associated with the named form (in
 this example I used AST:WorkLog)

 But I cannot seem to decode the Qualifier. All I get from the output is :-



1
 SHR:SHR:Help_003_CheckOnlineHelpInstall_E



 [Operation=4,Operand Left=[Operation=2,Operand Left=[Operand
 Type=[type=2],Operand=$LASTCOUNT$],Operand Right=[Operand
 Type=[type=2],Operand=0]],Operand Right=null]

 Qual : [Operation=2,Operand Left=[Operand
 Type=[type=2],Operand=$LASTCOUNT$],Operand Right=[Operand
 Type=[type=2],Operand=0]]

 I just need some help in decoding the Qualifier. Anyone got any ideas?
 Thanks in advance!!



 David Morgan

 Senior Technical Consultant



 Tiberone Technologies Limited

 Golden Cross House

 8 Duncannon Street

 London WC2N 4JF

 Ph: +44 (0) 207 484 5069

 Fax: +44 (0) 870 8310 381

 Mob: +44 (0) 7876 450102

  http://www.tiberone.com/ www.tiberone.com



 _Platinum Sponsor: rmisoluti...@verizon.net ARSlist: Where the Answers
 Are_

 ___
 UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
 Platinum Sponsor:rmisoluti...@verizon.net ARSlist: Where the Answers Are

 --
 This message was scanned by ESVA and is believed to be clean.



___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:rmisoluti...@verizon.net ARSlist: Where the Answers Are


Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-28 Thread Ben Chernys
I presume you mean recursive rather than iterative.  All recursion can be
expressed as iteration but sometimes (and this is an example) it is simpler
to be recursive.
 
I forward an email on the subject originally in reply to LJ Longwing.  Note
that this code is NOT java!
 
From: Action Request System discussion list(ARSList) [mailto:
mailto:arslist@ARSLIST.ORG arsl...@arslist.org] On Behalf Of Ben Chernys
Sent: Friday, January 25, 2008 1:38 PM
To:  mailto:arslist@ARSLIST.ORG arslist@ARSLIST.ORG
Subject: Re: Java 7.1 API Assistance
 
This is non-trivial.  I have described my function on the list in the past
but cannot find that post (perhaps in an archive?).  I use it in a binary
that dumps an ARS server's workflow and table structures into an ASCII
file that I can then search in an editor.
 
From the function pre-amble:
 
// builds a text string from an AR Qualifier Struct
ArdUtErr
ArdQualDecode (   // decodes a qualifier structure
  ArdSch  * pS,   // a loaded schema
  ArdSch  * pSc,  // the current schema
  ARQualifierStruct   * pQ,   // returned string must be freed
  char  * * vTgt  //   by caller and can be used
  )   //   in ARLoadARQualifierStruct()
  // this is pretty recursive.
  // first, the structure of pQ:
  //op
  //  left, right   (two new, same structs)
  //  not   (one more same struct)
  //  relopstruct   (a simpler field / value struct)
  // so how do we do it?
  //   we will always produce a string something like
  // ( ?? AND ?? )  or
  // ( ?? OR ?? )   or
  // ( NOT ?? ) or
  // ( A = B )
  // the ?? is returned by a recursive call to this routine
 
 
The gist of the main switch in the function
...
  switch (pQ-operation) {
case AR_COND_OP_AND:
case AR_COND_OP_OR:
  ArdQualDecode(pS, pSc, pQ-u.andor.operandLeft,   wP1);
  ArdQualDecode(pS, pSc, pQ-u.andor.operandRight,  wP2);
  // combine ( wP1 and/or wP2 )
case AR_COND_OP_NOT:
  ArdQualDecode(pS, pSc, pQ-u.not,  wP1);
  // combine ( not wP1 )
case AR_COND_OP_REL_OP:
  // make ( a relop b )
}
...
 

  _  

From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of LJ Longwing
Sent: October 27, 2009 4:15 PM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
Link (for example)


** 
Wow...ask a tough oneoktook me FOREVER to figure out
Qualifiersbut 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 anyit's still a bit fuzzy in my head,
but I understand it well enough as it is to do what I need to do.

  _  

From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of David Morgan
Sent: Tuesday, October 27, 2009 8:33 AM
To: arslist@ARSLIST.ORG
Subject: Java API for ARS - How to obtain a Run-If line from an Active Link
(for example)


** 

Hi ARSListers, 

 

I have been looking at the Java API but am stumped by Qualifiers. 

 

String name1 = Demo;

String swd = etno;

String sname = dclha002;

Integer tcpport = 8001;

Integer rpcnum = 0;

 

 

ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

// Check and verify user login:

 try {

   // If User Pass/Acct name is wrong, this gens an error.

   context.login();

 

 } catch( ARException e ) {

   System.out.println( Login Error :  +  Possible Bad password or
acct name.  );

   //This return ends all further processing and exits...

return;

 }

ListActiveLink aLinkObjs=context.getListActiveLinkObjects(AST:WorkLog);

int x = 0;

for (int i = 0; i  aLinkObjs.size(); i++) {

System.out.format(\n%20s%60s\n\n, i, aLinkObjs.get(i).getName());

//ActiveLink alink = aLinkObjs.get(x);



try{

QualifierInfo encryptedQual =
aLinkObjs.get(i).getQualifier();

System.out.println(encryptedQual.toString() );

RelationalOperationInfo qualEnglish =
encryptedQual.getRelationalOperationInfo();



System.out.println(Qual : + qualEnglish.toString());

} 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-28 Thread LJ Longwing
Misi,
There was a fix put in toI think it was set/push action qualifications
to fix their excess parenthesis, but I wasn't aware of any more still being
in existence.  Can you give me an example of where you are seeing it?

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of Misi Mladoniczky
Sent: Wednesday, October 28, 2009 4:31 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
Link (for example)

Hi,

It would be very nice if someone could take the time to create an algorithm
that removed the unnecessary grouping parentheses...

Best Regards - Misi, RRR AB, http://www.rrr.se

Products from RRR Scandinavia:
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
* RRR|Translator - Manage and automate your language translations.
Find these products, and many free tools and utilities, at http://rrr.se.

 Wow...ask a tough oneoktook me FOREVER to figure out 
 Qualifiersbut 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 anyit's still a bit fuzzy in my 
 head, but I understand it well enough as it is to do what I need to do.

   _

 From: Action Request System discussion list(ARSList) 
 [mailto:arsl...@arslist.org] On Behalf Of David Morgan
 Sent: Tuesday, October 27, 2009 8:33 AM
 To: arslist@ARSLIST.ORG
 Subject: Java API for ARS - How to obtain a Run-If line from an Active 
 Link (for example)


 **

 Hi ARSListers,



 I have been looking at the Java API but am stumped by Qualifiers.



 String name1 = Demo;

 String swd = etno;

 String sname = dclha002;

 Integer tcpport = 8001;

 Integer rpcnum = 0;





 ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

 // Check and verify user login:

  try {

// If User Pass/Acct name is wrong, this gens an error.

context.login();



  } catch( ARException e ) {

System.out.println( Login Error :  +  Possible Bad password 
 or acct name.  );

//This return ends all further processing and exits...

 return;

  }

 ListActiveLink
 aLinkObjs=context.getListActiveLinkObjects(AST:WorkLog);

 int x = 0;

 for (int i = 0; i  aLinkObjs.size(); i++) {

 System.out.format(\n%20s%60s\n\n, i, 
 aLinkObjs.get(i).getName());

 //ActiveLink alink = aLinkObjs.get(x);



 try{

 QualifierInfo encryptedQual = 
 aLinkObjs.get(i).getQualifier();

 System.out.println(encryptedQual.toString() );

 RelationalOperationInfo qualEnglish = 
 encryptedQual.getRelationalOperationInfo();



 System.out.println(Qual : + qualEnglish.toString());

 } catch (Exception e){

 System.out.println(no Qualification\n);

 }





 if (aLinkObjs.get(i).toString().contentEquals(ASI:AWL:Close_100) 
 ) {

 x = i ;

// System.out.println(x);

 }

 }

 context.logout();

 }



 I can get the names of the Active links associated with the named form 
 (in this example I used AST:WorkLog)

 But I cannot seem to decode the Qualifier. All I get from the output 
 is :-



1
 SHR:SHR:Help_003_CheckOnlineHelpInstall_E



 [Operation=4,Operand Left=[Operation=2,Operand Left=[Operand 
 Type=[type=2],Operand=$LASTCOUNT$],Operand Right=[Operand 
 Type=[type=2],Operand=0]],Operand Right=null]

 Qual : [Operation=2,Operand Left=[Operand 
 Type=[type=2],Operand=$LASTCOUNT$],Operand Right=[Operand 
 Type=[type=2],Operand=0]]

 I just need some help in decoding the Qualifier. Anyone got any ideas?
 Thanks in advance!!



 David Morgan

 Senior Technical Consultant



 Tiberone Technologies Limited

 Golden Cross House

 8 Duncannon Street

 London WC2N 4JF

 Ph: +44 (0) 207 484 5069

 Fax: +44 (0) 870 8310 381

 Mob: +44 (0) 7876 450102

  http://www.tiberone.com/ www.tiberone.com



 _Platinum Sponsor: rmisoluti...@verizon.net ARSlist: Where the 
 Answers Are_

 __
 _ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org 
 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-28 Thread Papolu, Appajee
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:arsl...@arslist.org] On Behalf Of LJ Longwing
Sent: Tuesday, October 27, 2009 8:15 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Wow...ask a tough oneoktook me FOREVER to figure out Qualifiersbut 
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 anyit'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: rmisoluti...@verizon.net ARSlist: Where the Answers Are_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:rmisoluti...@verizon.net ARSlist: Where the Answers Are


Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-28 Thread LJ Longwing
The first time I needed to parse a qualifier was when I was writing a
program that would identify all workflow that set a particular selection
field to a particular valuetons of fun

  _  

From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of Papolu, Appajee
Sent: Wednesday, October 28, 2009 4:43 PM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
Link (for example)


** 

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:arsl...@arslist.org] On Behalf Of LJ Longwing
Sent: Tuesday, October 27, 2009 8:15 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active
Link (for example)

 

Wow...ask a tough oneoktook me FOREVER to figure out
Qualifiersbut 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 anyit'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: rmisoluti...@verizon.net ARSlist: Where the Answers
Are__Platinum Sponsor: rmisoluti...@verizon.net ARSlist: Where the Answers
Are_ 

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:rmisoluti...@verizon.net ARSlist: Where the Answers Are


Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-28 Thread Papolu, Appajee
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:arsl...@arslist.org] On Behalf Of LJ Longwing
Sent: Tuesday, October 27, 2009 8:15 AM
To: arslist@ARSLIST.ORG
Subject: Re: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)

Wow...ask a tough oneoktook me FOREVER to figure out Qualifiersbut 
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 anyit's still a bit fuzzy in my head, but 
I understand it well enough as it is to do what I need to do.


From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of David Morgan
Sent: Tuesday, October 27, 2009 8:33 AM
To: arslist@ARSLIST.ORG
Subject: Java API for ARS - How to obtain a Run-If line from an Active Link 
(for example)
**
Hi ARSListers,

I have been looking at the Java API but am stumped by Qualifiers.

String name1 = Demo;
String swd = etno;
String sname = dclha002;
Integer tcpport = 8001;
Integer rpcnum = 0;


ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);
// Check and verify user login:
 try {
   // If User Pass/Acct name is wrong, this gens an error.
   context.login();

 } catch( ARException e ) {
   System.out.println( Login Error :  +  Possible Bad password or acct 
name.  );
   //This return ends all further processing and exits...
return;
 }
ListActiveLink aLinkObjs=context.getListActiveLinkObjects(AST:WorkLog);
int x = 0;
for (int i = 0; i  aLinkObjs.size(); i++) {
System.out.format(\n%20s%60s\n\n, i, aLinkObjs.get(i).getName());
//ActiveLink alink = aLinkObjs.get(x);

try{
QualifierInfo encryptedQual = aLinkObjs.get(i).getQualifier();
System.out.println(encryptedQual.toString() );
RelationalOperationInfo qualEnglish = 
encryptedQual.getRelationalOperationInfo();

System.out.println(Qual : + qualEnglish.toString());
} catch (Exception e){
System.out.println(no Qualification\n);
}


if (aLinkObjs.get(i).toString().contentEquals(ASI:AWL:Close_100) ) {
x = i ;
   // System.out.println(x);
}
}
context.logout();
}

I can get the names of the Active links associated with the named form (in this 
example I used AST:WorkLog)
But I cannot seem to decode the Qualifier. All I get from the output is :-

   1   SHR:SHR:Help_003_CheckOnlineHelpInstall_E

[Operation=4,Operand Left=[Operation=2,Operand Left=[Operand 
Type=[type=2],Operand=$LASTCOUNT$],Operand Right=[Operand 
Type=[type=2],Operand=0]],Operand Right=null]
Qual : [Operation=2,Operand Left=[Operand 
Type=[type=2],Operand=$LASTCOUNT$],Operand Right=[Operand 
Type=[type=2],Operand=0]]

I just need some help in decoding the Qualifier. Anyone got any ideas? Thanks 
in advance!!

David Morgan
Senior Technical Consultant

Tiberone Technologies Limited
Golden Cross House
8 Duncannon Street
London WC2N 4JF
Ph: +44 (0) 207 484 5069
Fax: +44 (0) 870 8310 381
Mob: +44 (0) 7876 450102
www.tiberone.comhttp://www.tiberone.com/

_Platinum 

Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-28 Thread Calman Steynberg
To get a human readable string for a QualifierInfo object use
ARServerUser.formatQualification();

From the JavaDocs for the method:

Stringeclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.arsys.api%7BARServerUser.java%E2%98%83ARServerUser%7EformatQualification%7EQString;%7EQObject;%E2%98%82Stringcom.bmc.arsys.api.
ARServerUsereclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.arsys.api%7BARServerUser.java%E2%98%83ARServerUser
.formatQualification(Stringeclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.arsys.api%7BARServerUser.java%E2%98%83ARServerUser%7EformatQualification%7EQString;%7EQObject;%E2%98%82Stringform,
Objecteclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.arsys.api%7BARServerUser.java%E2%98%83ARServerUser%7EformatQualification%7EQString;%7EQObject;%E2%98%82Objectqualification)
throws
ARExceptioneclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.arsys.api%7BARServerUser.java%E2%98%83ARServerUser%7EformatQualification%7EQString;%7EQObject;%E2%98%82ARException

Formats an internal representation of a qualifier to a readable String
Parameters: *form* Form against which this qualification is defined *
qualification* given qualification - it can be an encoded qualification
representation (String) or a QualifierInfo object Returns: Readable
qualification string Throws:
ARExceptioneclipse-javadoc:%E2%98%82=api/src%3Ccom.bmc.arsys.api%7BARServerUser.java%E2%98%83ARServerUser%7EformatQualification%7EQString;%7EQObject;%E2%98%82ARException-
in case of formatting errors

In your code below, you can do it by using the following line:

System.out.println(context.formatQualification(aLinkObjs.get(i).getPrimaryForm(),
aLinkObjs.get(i).getQualifier()) );


Hope that helps.

Calman


On Tue, Oct 27, 2009 at 8:14 AM, LJ Longwing lj.longw...@gmail.com wrote:

 **
 Wow...ask a tough oneoktook me FOREVER to figure out
 Qualifiersbut 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 anyit's still a bit fuzzy in my head,
 but I understand it well enough as it is to do what I need to do.

  --
 *From:* Action Request System discussion list(ARSList) [mailto:
 arsl...@arslist.org] *On Behalf Of *David Morgan
 *Sent:* Tuesday, October 27, 2009 8:33 AM
 *To:* arslist@ARSLIST.ORG
 *Subject:* Java API for ARS - How to obtain a Run-If line from an Active
 Link (for example)

 **

 Hi ARSListers,



 I have been looking at the Java API but am stumped by Qualifiers.



 String name1 = Demo;

 String swd = etno;

 String sname = dclha002;

 Integer tcpport = 8001;

 Integer rpcnum = 0;





 ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

 // Check and verify user login:

  try {

// If User Pass/Acct name is wrong, this gens an error.

context.login();



  } catch( ARException e ) {

System.out.println( Login Error :  +  Possible Bad password or
 acct name.  );

//This return ends all further processing and exits...

 return;

  }

 ListActiveLink aLinkObjs=context.getListActiveLinkObjects(AST:WorkLog);

 int x = 0;

 for (int i = 0; i  aLinkObjs.size(); i++) {

 System.out.format(\n%20s%60s\n\n, i, aLinkObjs.get(i).getName());

 //ActiveLink alink = aLinkObjs.get(x);



 try{

 QualifierInfo encryptedQual =
 aLinkObjs.get(i).getQualifier();

 System.out.println(encryptedQual.toString() );

 RelationalOperationInfo qualEnglish =
 encryptedQual.getRelationalOperationInfo();



 System.out.println(Qual : + qualEnglish.toString());

 } catch (Exception e){

 System.out.println(no Qualification\n);

 }





 if (aLinkObjs.get(i).toString().contentEquals(ASI:AWL:Close_100) ) {

 x = i ;

// System.out.println(x);

 }

 }

 context.logout();

 }



 I can get the names of the Active links associated with the named form (in
 this example I used AST:WorkLog)

 But I cannot seem to decode the Qualifier. All I get from the output is :-



1
 SHR:SHR:Help_003_CheckOnlineHelpInstall_E



 [Operation=4,Operand Left=[Operation=2,Operand Left=[Operand
 Type=[type=2],Operand=$LASTCOUNT$],Operand Right=[Operand
 Type=[type=2],Operand=0]],Operand 

Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-27 Thread David Morgan
Hi ARSListers, 

 

I have been looking at the Java API but am stumped by Qualifiers. 

 

String name1 = Demo;

String swd = etno;

String sname = dclha002;

Integer tcpport = 8001;

Integer rpcnum = 0;

 

 

ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

// Check and verify user login:

 try {

   // If User Pass/Acct name is wrong, this gens an error.

   context.login();

 

 } catch( ARException e ) {

   System.out.println( Login Error :  +  Possible Bad password or
acct name.  );

   //This return ends all further processing and exits...

return;

 }

ListActiveLink
aLinkObjs=context.getListActiveLinkObjects(AST:WorkLog);

int x = 0;

for (int i = 0; i  aLinkObjs.size(); i++) {

System.out.format(\n%20s%60s\n\n, i, aLinkObjs.get(i).getName());

//ActiveLink alink = aLinkObjs.get(x);



try{

QualifierInfo encryptedQual =
aLinkObjs.get(i).getQualifier();

System.out.println(encryptedQual.toString() );

RelationalOperationInfo qualEnglish =
encryptedQual.getRelationalOperationInfo();



System.out.println(Qual : + qualEnglish.toString());

} catch (Exception e){

System.out.println(no Qualification\n);

}

 



if (aLinkObjs.get(i).toString().contentEquals(ASI:AWL:Close_100) )
{

x = i ;

   // System.out.println(x);

}

}

context.logout();

}

 

I can get the names of the Active links associated with the named form
(in this example I used AST:WorkLog)

But I cannot seem to decode the Qualifier. All I get from the output is
:-

 

   1
SHR:SHR:Help_003_CheckOnlineHelpInstall_E

 

[Operation=4,Operand Left=[Operation=2,Operand Left=[Operand
Type=[type=2],Operand=$LASTCOUNT$],Operand Right=[Operand
Type=[type=2],Operand=0]],Operand Right=null]

Qual : [Operation=2,Operand Left=[Operand
Type=[type=2],Operand=$LASTCOUNT$],Operand Right=[Operand
Type=[type=2],Operand=0]]

I just need some help in decoding the Qualifier. Anyone got any ideas?
Thanks in advance!!

 

David Morgan

Senior Technical Consultant

 

Tiberone Technologies Limited

Golden Cross House

8 Duncannon Street

London WC2N 4JF

Ph: +44 (0) 207 484 5069

Fax: +44 (0) 870 8310 381

Mob: +44 (0) 7876 450102

www.tiberone.com http://www.tiberone.com/ 

 


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:rmisoluti...@verizon.net ARSlist: Where the Answers Are


Re: Java API for ARS - How to obtain a Run-If line from an Active Link (for example)

2009-10-27 Thread LJ Longwing
Wow...ask a tough oneoktook me FOREVER to figure out
Qualifiersbut 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 anyit's still a bit fuzzy in my head,
but I understand it well enough as it is to do what I need to do.

  _  

From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of David Morgan
Sent: Tuesday, October 27, 2009 8:33 AM
To: arslist@ARSLIST.ORG
Subject: Java API for ARS - How to obtain a Run-If line from an Active Link
(for example)


** 

Hi ARSListers, 

 

I have been looking at the Java API but am stumped by Qualifiers. 

 

String name1 = Demo;

String swd = etno;

String sname = dclha002;

Integer tcpport = 8001;

Integer rpcnum = 0;

 

 

ARServerUser context=new ARServerUser(name1,swd,,sname, tcpport);

// Check and verify user login:

 try {

   // If User Pass/Acct name is wrong, this gens an error.

   context.login();

 

 } catch( ARException e ) {

   System.out.println( Login Error :  +  Possible Bad password or
acct name.  );

   //This return ends all further processing and exits...

return;

 }

ListActiveLink aLinkObjs=context.getListActiveLinkObjects(AST:WorkLog);

int x = 0;

for (int i = 0; i  aLinkObjs.size(); i++) {

System.out.format(\n%20s%60s\n\n, i, aLinkObjs.get(i).getName());

//ActiveLink alink = aLinkObjs.get(x);



try{

QualifierInfo encryptedQual =
aLinkObjs.get(i).getQualifier();

System.out.println(encryptedQual.toString() );

RelationalOperationInfo qualEnglish =
encryptedQual.getRelationalOperationInfo();



System.out.println(Qual : + qualEnglish.toString());

} catch (Exception e){

System.out.println(no Qualification\n);

}

 



if (aLinkObjs.get(i).toString().contentEquals(ASI:AWL:Close_100) ) {

x = i ;

   // System.out.println(x);

}

}

context.logout();

}

 

I can get the names of the Active links associated with the named form (in
this example I used AST:WorkLog)

But I cannot seem to decode the Qualifier. All I get from the output is :-

 

   1
SHR:SHR:Help_003_CheckOnlineHelpInstall_E

 

[Operation=4,Operand Left=[Operation=2,Operand Left=[Operand
Type=[type=2],Operand=$LASTCOUNT$],Operand Right=[Operand
Type=[type=2],Operand=0]],Operand Right=null]

Qual : [Operation=2,Operand Left=[Operand
Type=[type=2],Operand=$LASTCOUNT$],Operand Right=[Operand
Type=[type=2],Operand=0]]

I just need some help in decoding the Qualifier. Anyone got any ideas?
Thanks in advance!!

 

David Morgan

Senior Technical Consultant

 

Tiberone Technologies Limited

Golden Cross House

8 Duncannon Street

London WC2N 4JF

Ph: +44 (0) 207 484 5069

Fax: +44 (0) 870 8310 381

Mob: +44 (0) 7876 450102

 http://www.tiberone.com/ www.tiberone.com

 

_Platinum Sponsor: rmisoluti...@verizon.net ARSlist: Where the Answers
Are_ 

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:rmisoluti...@verizon.net ARSlist: Where the Answers Are