Please find the replies below

From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Anandsagar Sah
Sent: Thursday, June 27, 2013 1:02 PM
To: arslist@ARSLIST.ORG
Subject: Issues/Questions on ARS Java API

**
Hello All,

I have 3 questions around ARS Java API.

1.       I have a Active Link Object, how do I get the human readable Run If 
Qualification ?
i.e.
ActiveLink arObject = server.getActiveLink(arObjectName);
System.out.println("Run If: " + arObject.getQualifier());

This prints  Run If: [Operation=1,Operand Left=[Operation=1,Operand 
Left=[Operation=1,Operand Left=[Operation=4,Operand Left=[Operation=2,Operand 
Left=[Operand Type=[type=99],Operand=655630000],Operand Right=[Operand 
Type=[type=2],Operand=0]],Operand Right=<null>],Operand 
Right=[Operation=4,Operand Left=[Operation=1,Operand Left=[Operand 
Type=[type=50],Operand=700000010],,....

I want it to print like Run If: '655630000' > 24.... i.e. in a string format 
that Developer Studio shows on screen. So is there any API method for this one ?
<<Tanuj>> You can directly use formatQualification method of ARServerUser.java 
or you can directly use ARQualifierFormatter.java

2.       Set/Push Qualification returns null, even if there's a qualification 
given. Always return null for all Filters/Active link.
ActiveLinkAction action = any Push Action of Active link.
com.bmc.arsys.api.PushFieldsAction s = (com.bmc.arsys.api.PushFieldsAction) 
action

System.out.println("\t\t Push Qualification: " + 
s.getPushIfQualificationAsString());


This prints  Push Qualification: null
<<Tanuj>> Rename the file arsys_sample.xml to arsys_api.xml and put the file in 
a directory which is in the class path. Override the setting 
stringizeSetIfQualification to true. And then try it again


3.       Set Field Action field mapping returns null, for e.g. below code is 
reading assigned values to field. However this works fine for 
com.bmc.arsys.api.PushFieldsAction.
com.bmc.arsys.api.SetFieldsFromForm s = (com.bmc.arsys.api.SetFieldsFromForm) 
action;
List<FieldAssignInfo> setFieldsList = s.getSetFieldsList();
for (FieldAssignInfo sfi : setFieldsList) {
                AssignInfo assignment = sfi.getAssignment();
                System.out.println("\t\t\t" + sfi.getFieldId() + " = " + 
sfi.getAssignmentAsString());
}
This prints  605121212 = null
Whereas I am expecting it to print : 605121212 = $assignment$
<<Tanuj>> Looks like this is not supported for Set Field. It's only implemented 
for PushField.


Does anyone has solution to above issues ?

I have tried with 701 and 7604 version of Java API on 701 server environment.


Thanks & Regards,
Anandsagar
_ARSlist: "Where the Answers Are" and have been for 20 years_

<<This is my personal opinion>>

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to