Patent ID: 7885943

Claim:
A method for processing compliance rules in an application for checking compliance of an IT infrastructure, the method comprising: receiving input defining a compliance rule, the input including: i) input identifying a configuration-item type, the identified configuration-item type determining a type of configuration item in the IT infrastructure of different types of configuration items; ii) input defining a scope of the compliance rule, the scope determining which configuration items of the identified type are to be checked by the rule for compliance; and iii) input defining a desired state for each of the configuration items to be checked by the compliance rule, the desired state including at least one compliance condition that must be satisfied for a checked configuration item to be in compliance; accumulating query fragments associated with the scope of the compliance rule; accumulating query fragments associated with the desired state; and merging the accumulated query fragments into a query for applying the compliance rule to data corresponding to the IT infrastructure; initiating display of a graphical user interface; based on first input to the graphical user interface, receiving a first query fragment indicating a first selected type of resource in the IT infrastructure; based on second input to the graphical user interface, receiving a second query fragment indicating a second selected type of resource in the IT infrastructure; wherein merging the accumulated query fragments comprises combining the first query fragment and the second query fragment into an expression to specify which resources of the first selected type in the IT infrastructure is to be checked for compliance using the compliance rule; initiating display of first preview scope information in the graphical user interface, the first preview scope information indicating a number of how many resources are of the first selected type; initiating display of second preview scope information in the graphical user interface, the second preview scope information indicating a number of how many resources of the first selected type include a resource of a type as specified by the second selected type; based on third input to the graphical user interface, receiving state information specifying a required attribute that is to be associated with the second selected type of resource in the IT infrastructure; and creating a rule query to include a scope constraint expression and an attribute expression, the scope constraint expression specified by a combination of the first fragment and the second fragment, the attribute expression being based on the state information.