Set Up Design-time Restrictions Through Entity Profiles
Use this topic to set up design-time restrictions (supporting run-time capabilities) through entity profiles.
The modeling capabilities of design-time and run-time applications are common regardless of whether you publish to Oracle or non-Oracle run-time applications. However, there could be a gap between what could be modeled at design time as against what the application would actually use at run-time, depending on the service provider's ecosystem. You could then set modeling rules for design-time features available for a service provider, ensuring the design-time application follows the applied restrictions resulting in an error-free publishing to runtime applications. Such restrictions are based on the service provider's ecosystem and not on individual runtime applications. Which means, there could only be one restriction for the ecosystem and not for each runtime application. You can achieve this by setting up an entity profile.
Using the following two examples, you can set up an entity profile and follow some best practices:
- Example 1 - Rule: Restrict only one commitment term for the product offering entity of package type.
- Example 2 - Rule: Restrict one-time price.
Here's how to do it using Example 1.
Step 1: Create an entity profile of type customProfileSpecification
To create an entity profile:
- Define a valid ID and name to create the entity profile.
- Set the version to 1.0.
- Set the LifecycleStatus to In design.
- Set the @type to CustomProfileSpecificationOracle.
- Set the profileType to ENTITY_PROFILE.
Target product schema should be based on the entity restriction, such as, for productOfferingOracle, the @type value should be ProductOfferingOracle and the @schemaLocation value should be ProductOfferingOracle.yml. Similarly, you need to update type and schemaLocation values for other entities as well (ProductSpecificationOracle, PromotionOracle and so on ).
Step 2 : Create a restriction based on a condition
To create a restriction:
- Define a rule with characteristicType as RULE and relationshipType as AGGREGATION.
- Based on the name given in AGGREGATION, create a
FEATURE characteristic (
rule 1_info_productType_bundle
). - If the restriction has a condition, you need to define that condition in the feature characteristic with customProfileSpecCharRel as relationshipType with the value CONDITION.
- Create ATTRIBUTE based on the name given in the CONDITION
type (
condition_productType_bundle_package
). - In ATTRIBUTE, define the attribute name and value to satisfy the condition (attribute name defines the condition expression).
- Once the condition is satisfied, the respective restriction attribute
(
requires_term_type_commitmentTerm
) is executed.
Here's how to do it using Example 2.
Step 1: Create an entity profile of type customProfileSpecification
To create an entity profile:
- Define a valid ID and name to construct the entity profile.
- Set the version to 1.0.
- Set the LifecycleStatus to In design.
- Set the @type to CustomProfileSpecificationOracle.
- Set the profileType to ENTITY_PROFILE.
Step 2 : Create a restriction without conditions
To create a restriction:
- Define a rule with characteristicType as RULE and relationshipType as AGGREGATION.
- Based on the name given in AGGREGATION, create a feature characteristic with relationshipType set as EXCLUDES, REQUIRES or ALLOWED.
- Based on the name given in the feature characteristic, create ATTRIBUTE.
To see sample payloads for creating restrictions, see REST APIs for Launch Experience on My Oracle Support, Doc ID 2725039.1
To view a list of design-time restriction properties and values used to create restrictions, see Design-time Restriction Properties to Create Entity Profiles in the Appendix.