Look at the DecodeQualifier and FormatQualification methods in BMC.ARSystem.Server class of the AR .NET API. Similar facility is available within Java API too -- ARServerUser class has the methods such as decodeQualification, formatQualification are of interest to you. As the names indicate, first function allows you to decode an internal representation (string) into an appropriate qualification object; second function then allows you to produce a formatted representation (string) using this object.
If you are looking for workflow based solution, please look at the AR System Special Run Process Application Commands -- specifically
Application-Format-Qual "<form>" <internal_qualifier>
Finally if you're looking for this functionality in a C API client, unfortunately you're out of luck at least AFAIAK. You can decode the qualification (ARDecodeQualification), you can parse a readable/formatted qualification string into object (ARLoadARQualifierStruct); but you cannot produce a formatted string representation usign the API. You have to walk the qualification object and produce the string yourself recursively.
when I have created such a conversion class in java where is the location for this class on the ARServer?
Thanks for advice
Have a look at the special Run Processes in the help/documentation there is some stuff there
I have attached a def file for a simple conversion tool I built. It will convert from String to Internal Rep and vice versa.
Basically, it is a Active Link that executes a Service Filter and maps the output using Application-Parse-Qual and Application-Format-Qual based on form selection. Very straight forward.
(I realize this question is almost 4 years old, but it might be helpful for future queries on the topic)
QualParseFormatTool.def 15.7 K
I just checked the Parse qualifications using this tool.
But the clarification i need is, in workflow in one of our scenario for change calendar,the converstion is missing the brackets. The requirement is to retain the brackets after parsing. Could you please clarify?
/* Wed Jul 11 2018 10:03:19.2580 */ Application-Parse-Qual-L "CHG:Infrastructure Change" "" (('Status*' > "Scheduled For Review" AND 'Status*' < "Cancelled") OR ('Coordinator Group' = "Service Tools" AND ('Status*' >= "Draft" AND 'Status*' < "Cancelled")))
/* Wed Jul 11 2018 10:03:19.5620 */ Exit code: 0 Value: 2\1\4\2\1\7\2\6\4\4\4\1\7\2\6\12\1\4\1\1\1000003229\2\4\13\Service Tools\1\4\3\1\7\2\6\0\4\4\1\7\2\6\12\
Qualification (500182000) = 2\1\4\2\1\7\2\6\4\4\4\1\7\2\6\12\1\4\1\1\1000003229\2\4\13\Service Tools\1\4\3\1\7\2\6\0\4\4\1\7\2\6\12\
1 : Set Fields
/* Wed Jul 11 2018 10:03:19.5630 */ Application-Format-Qual "CHG:Infrastructure Change" 2\1\4\2\1\7\2\6\4\4\4\1\7\2\6\12\1\4\1\1\1000003229\2\4\13\Service Tools\1\4\3\1\7\2\6\0\4\4\1\7\2\6\12\
/* Wed Jul 11 2018 10:03:19.5740 */ Exit code: 0 Value: 'Change Request Status' > "Scheduled For Review" AND 'Change Request Status' < "Cancelled" OR 'ASGRP' = "Service Tools" AND 'Change Request Status' >= "Draft" AND 'Change Request Status' < "Cancelled"
Qualification (500182000) = 'Change Request Status' > "Scheduled For Review" AND 'Change Request Status' < "Cancelled" OR 'ASGRP' = "Service Tools" AND 'Change Request Status' >= "Draft" AND 'Change Request Status' < "Cancelled"
I agree, if you are passing one in you should get the same boolean statement back out the other end, but aren't....so I would recommend you open a ticket with BMC to have it fixed because you definitely aren't getting out what you put in