...
Policy creation in PolicyDevelopment follows the general sequence shown in the sequence diagram below. An API_USER is any component that wants to create a policy from a policy templatetype. PolicyDevelopment supplies a REST interface that exposes the API and also provides a command line tool and general purpose client that wraps the API.
A PolicyDevAPIUser first gets a reference to and the metadata for the Policy Template type for the policy they want to work on from PolicyDevelopment. PolicyDevelopment reads the metadata and artifact for the template policy type from the database and reads the policy template artifact from Nexus. The API_User then asks for a reference and the metadata for the policy. PolicyDevelopment looks up the policy in the database. If the policy already exists, PolicyDevelopment reads the artifact from Nexus and returns the reference of the existing policy to the PolicyDevAPIUser with the metadata for the existing policy. If the policy does not exist, PolicyDevelopment creates and new reference and metadata and returns that to the API_User.
The PolicyDevAPIUser may now proceed with a policy specification session, where the models, rules, tasks, and flow parameters are set for the policy are specified on the policy template. Many actual API calls may occur during the session to specify information on the policy.using the policy type specification. Once the PolicyDevAPIUser is happy that the policy is completely and correctly specified, it requests PolicyDevelopment to create the policy. PolicyDevelopment creates the policy, stores the created policy artifact in Nexus and stores its metadata of the policy in the database.
2.2.2.2 Model Driven VF (Virtual Function) Policy Design via VNF SDK Packaging
...