Configuring External Policy Sets with XML

You can configure policy sets by editing a policy set resource file. Samples are available in the TIBCO_HOME directory.

Procedure

  1. In the composite editor, click a service, a reference, a composite, or a component.
  2. In the Properties view, select the Policies tab.
  3. In the tree view, click an intent.
    The right pane displays details of the intent. If the intent is not yet satisfied, TIBCO Business Studio reports this situation as a problem.
  4. Click the fix... link, and select the fix Attach Policy Set.
  5. Click the Create Policy Set button.
    A dialog opens to create a new policy set resource.
  6. Determine the resource location, filename, target namespace and policy set name and click Finish. Store policy sets in a separate folder under the top level of project directory.
    TIBCO Business Studio adds an empty policy set to the tree, and marks the intent as Satisfied by the new policy set.
  7. Click the Satisfied by link in the intent.
    TIBCO Business Studio opens a skeleton policy set resource file for editing. The filename extension is .policysets
  8. Copy a policy sample, and paste it within the <sca:policyset> tag. For samples, see Policy Templates Reference.
  9. Modify the parameters of the sample, as needed.
    • Each .policysets file contains one sca:PolicySet, which contains one top-level .
    • The wsp:Policy may contain nested wsp:Policy elements.
    • The top-level wsp:Policy element must specify the template attribute, and the namespace of the template.
  10. Modify the skeleton, if needed.
    • The skeleton begins with a list of namespaces. When you add policies that require namespaces that are not included in the skeleton, specify those namespace declarations in the top-level wsp:Policy element.
    • The skeleton also includes an sca:policySet element, which is empty except for its three attributes (name, provides and appliesTo).
    • To expand a policy set to provide several intents, add intents, separated by space characters, to the provides attribute.
    • To restrict a policy set to apply to a narrower set of components, you may remove components from the appliesTo attribute (separating components with vertical bar characters).
  11. Save the policy set file.