Oracle API Gateway(OAG) Policy Center
A policy is a network of message filters in which each filter is a modular unit that processes a message.
In the Policy Studio, the policy is displayed as a path through a set of filters. Each filter can have only one success path and one failure path. You can use these success and failure paths to create sophisticated rules.
The following example screen shot shows an example policy with success paths and a single failure path:
![](http://images0.cnblogs.com/blog/565330/201402/251822431433168.jpg)
1.Starting the Policy Studio
If you did not select to launch the Policy Studio automatically after installation,You can open a command prompt in the following directory:
-------------------------------------------
Windows INSTALL_DIR\oagpolicystudio
Linux/UNIX INSTALL_DIR/oagpolicystudio
-------------------------------------------
Start policystudio.
2.Start Policy Studio and connect to Policy Center.
![](http://images0.cnblogs.com/blog/565330/201402/251824045822186.jpg)
3. You can deploy OAG sample policy. xml file like following:
---------------------------------------------------
<entityStoreData xmlns="http://www.vordel.com/2005/06/24/entityStore">
<metaInfo flags="138">
<exportRoots>
<key type='FilterCircuit'>
<id field='name' value='oauth_accesstoken_validation'/>
</key>
<key type='ESConfiguration'>
<id field='name' value='Entity Store Configuration'/>
</key>
</exportRoots>
<typeVersions>
<type name="AddHTTPHeaderFilter" version="5"/>
<type name="AttributeExtractHTTPHeaderFilter" version="0"/>
<type name="ChangeMessageFilter" version="0"/>
<type name="ConnectToURLFilter" version="2"/>
<type name="ConnectionFilter" version="13"/>
<type name="ConversionFilter" version="0"/>
<type name="ESConfiguration" version="13"/>
..........
<type name="Reflector" version="0"/>
<type name="RootChild" version="0"/>
<type name="SaveToFileFilter" version="2"/>
<type name="SetHTTPStatusCode" version="0"/>
<type name="SetHTTPVerbFilter" version="0"/>
<type name="StringReplaceFilter" version="2"/>
</typeVersions>
<realizedTypes><![CDATA[
<entityStoreData>
<entityType xmlns="http://www.vordel.com/2005/06/24/entityStore" abstract="true" extends="Entity" name="Filter">
<constant name="_version" type="integer" value="5"/>
<field cardinality="?" name="successNode" type="@Filter"/>
<field cardinality="?" name="failureNode" type="@Filter"/>
<field isKey="true" name="name" type="string"/>
.........
<field cardinality="1" name="category" type="@Category">
<defaultRef>
<key type="CategoryGroup">
<id field="name" value="Filter Categories"/>
<key type="Category">
<id field="name" value="miscellaneous"/>
</key>
</key>
</defaultRef>
</field>
<field cardinality="1" default="0" name="abortProcessingOnLogError" type="boolean"/>
<field cardinality="1" default="SERVICE" name="logMaskType" type="string"/>
<field cardinality="*" name="classloader" type="^ClassLoader"/>
</entityType>
............
</entityStoreData>
------------------------------------------------------------
4. import......, Policy studio shows as like this:
![](http://images0.cnblogs.com/blog/565330/201402/251824577183582.jpg)
Doc: