8 About TMF Orders (Cloud Native Only)

This chapter provides conceptual information about TMF ordering support.

Note:

TMF orders are supported for OSM cloud native deployments only.

Introduction

The TM Forum defines and maintains a set of specifications intended to represent key objects and operations in the OSS and BSS space of a communications provider. The traditional order management roles that OSM plays are covered by two of these TMF specifications:
  • TMF622 Product Ordering Management: This specification defines the Product Order entity and describes operations that can be performed on it. It is intended to cover the COM order fulfillment layer. Its input is an order containing ordered products, bundles, discounts, and so on. Fulfillment of the product order involves handling all operations that act on the ordered products, like partner ordering and shipping. Fulfillment includes transforming the product order into one or more service orders (operations on Customer Facing Services) directed towards a downstream fulfillment system.
  • TMF641 Service Ordering Management: This specification defines the Service Order entity and describes operations that can be performed on it. It is intended to cover the SOM order fulfillment layer. Its input is an order containing service entities with associated actions. Fulfillment typically involves interacting with service inventory and network activation, and may also include workforce management and shipping.
OSM cloud native includes a framework that can transparently provide the capabilities defined in either TMF specification. At a high level, this includes exposing operational endpoints, automated TMF state calculation and reporting, along with new design time tooling that automatically translates the TMF specification schema components into Complex Data Type (CDT) structures in an OSM cartridge. This new TMF framework helps solution designers create and maintain a cartridge that provides COM or SOM order fulfillment while letting OSM transparently provide compliance with the TMF specification.

About Standards

TMForum

  • TMForum created the TMF 630 REST API Design Guidelines to help applications extend the APIs defined by TMF. The OSM extensions align with the documented guidance.
  • TMForum provides a means for vendors to "verify the successful implementation of Open APIs in commercial products and real-world deployments" by way of a TMF compliance toolkit. Oracle achieved a successful status on the OSM implementation of both the TMF 622 (v4.0.0) and TMF 641 (v4.1.0) specifications.

For more information, go to: http://www.tmforum.org.

OpenAPI Initiative

The OpenAPI Initiative documents patterns that should be used when extending the schema object. OSM 622 and 641 extensions in this area align with the documented guidance. Parsing technology is used to validate that the structure and syntax of imported TMF specifications at design time aligns with OpenAPI Initiative v3.0.1.

For more information, go to: https://www.openapis.org/.

Terminology

The following types of terms are introduced and contextualized:
  • Object: This is an object that lives in OSM and is managed by OSM.
  • API: This is the interface OSM presents in support of the Object.
  • Specification: This is the description of the Object, the API, and its semantics; OSM uses this to model, operate, and present the Object.

The following table describes the terminology.

Name Type Description
Hosted Order Object This is the main resource of OSM - each instance represents an order and OSM executes order fulfillment for it, and presents it to the outside world.
Hosted Order API API This is how the hosted order is presented to the outside world. TMForum examples for this are TMF622 and TMF641. In UML, this is termed as "Provided Interface" and in TMFC (TMForum Component), as "Exposed API".
Hosted Order Specification Specification The Hosted Order expressed as an OpenAPI, its API and its semantics.
TMF cartridge set of OSM cartridges A TMF Cartridge is built around exactly one Hosted Order Specification, and provides the fulfillment logic for that order type.
Freeform cartridge set of OSM cartridges Freeform cartridges include all cartridges prior to 7.5.0 as well as non-TMF cartridges in 7.5.0.
Hosted Order Specification Specification The Hosted Order expressed as an OpenAPI, its API and its semantics. Used in a TMF cartridge.
System Interaction Specification Specification The REST API of an external system, expressed as an OpenAPI. Used in any type of cartridge - TMF or freeform.

Overview of TMF in OSM

When one of the two supported TMF ordering specifications is incorporated into the OSM TMF support framework, it is referred to as a Hosted Order Specification. The hosted order specification is carried in one or more TMF cartridges.

When the cartridges are deployed, the hosted specification is persisted to the OSM DB schema. From here, the Hosted Order Specification is accessed by the OSM Managed Server containers and the OSM Gateway microservice containers. The Managed Servers use this information to enable TMF-related capabilities when an incoming order is processed by this cartridge. These capabilities include the automatic generation of TMF notifications (events) and the ongoing calculation of TMF state.

The TMF microservice containers also use the Hosted Order Specification information to expose the correct REST API to the outside world, and to translate between that API and OSM's internal components and models.

The following diagram illustrates the deployment of a Hosted Specification.

Figure 8-1 Deployment of Hosted Specification



About TMF Specifications

Configuring an OSM instance with TMF ordering support begins with the TMF specification. TMF specifications are based on the OpenAPI Specification which "defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic." Given the critical role of the specification itself, it is important to look inside and understand how different aspects are realized in OSM's TMF framework.

Paths Object

The paths object holds a path to individual endpoints as well as the operations permitted on an endpoint. When OSM cloud native hosts one of the TMF ordering specifications, the endpoints you see defined inside the TMF OpenAPI would be exposed by the OSM Gateway component. The delete and patch operations are unsupported by OSM as there are alternative mechanisms to achieve the same. See the Order Action Comparison table in "About the OSM Endpoints".

The following image shows the paths object in the specification file for TMF622 Product Order.

Figure 8-2 Paths in the specification file



The following diagram shows how the paths object is reflected in OSM.

Events Notifications

TMF specifications define not only the endpoints of an application but the event notifications that would travel northbound as well. These are identified in the OpenAPI document as endpoints with the keyword "listener" in the path. Publishing an event is done by posting the event to the listener address.

Event notifications are the vehicle for vital information about the resource, getting communicated to the external world. Lifecycle events such as creation, state change events and certain types of data updates are examples of notifications that OSM Gateway would emit.

The following image shows the listener (Event Notifications) objects in the specification file for TMF622 Product Order.

Figure 8-4 Listeners in the specification file



The following diagram shows how the Event Notifications are reflected in OSM.

Figure 8-5 Event Notifications in OSM



Schema

Each of the relevant TMF specifications includes a data model that defines the entities involved in support of the domain - product or service. With the TMF framework in OSM, the importing of a TMF specification results in the automatic creation of CDTs for all of the schemas defined in the OpenAPI.

The following image shows the schema objects in the specification file for TMF622 Product Order.

Figure 8-6 Schema objects in TMF 622 Product Order



The following diagram shows how the schema is reflected in OSM.

About OSM Extensions

While the TMF 622 and 641 specifications provide endpoints for basic interactions with an order management system (post and get), they lack a comprehensive set of endpoints that align with OSM's advanced capabilities. In response, OSM has followed the guidelines from TMF 630 and made extensions to TMF's canonical 622 specification.

With the addition of OSM endpoints, upstream components have access to a full range of capabilities that includes creating new orders, submitting revisions, cancel orders, abort orders, suspend and resume orders, and fetch and search for orders using the full set of REST API endpoints described in the OSM extended specification. It is strongly recommended to use the specifications with OSM extensions for both Product Order and Service Order.

In the TMFSchemas sub-folder in the toolkit, OSM extensions have the suffix -OSM in the filename.

About the Specification Version

OSM's TMF framework relies on a 5-digit version scheme for hosted specifications.
  • The first three digits are reserved for TMForum as TMF specifications are versioned with a three-number scheme.
  • The fourth number is reserved for Oracle OSM to version extensions supported by the application itself.
  • The fifth number is available for solution developers to version their additional extensions.
The OSM extended specification reflects this numbering scheme and has set the version number to 4.0.0.1.0. in the case of the 622 specification and to 4.1.0.1.0 in the case of the 641 specification.

About the OSM Endpoints

The PATCH and DELETE order level actions are not supported and removed from the OSM Extended specification:
  • The ReviseProductOrder or ReviseServiceOrder task resource must be used instead of PATCH to leverage OSM's comprehensive amendment capabilities.
  • OSM's powerful purge capabilities must be used instead of DELETE in order to provide uniform lifecycle management across orders at scale.
In addition to the CancelProductOrder and CancelServiceOrder task resource, OSM makes available additional task resources for complex requests that have a non-trivial lifecycle:
  • SuspendProductOrder or SuspendServiceOrder: To request the suspension of an order; this is subject to the logic in the Order Lifecycle Policy as well as the configured grace period for in-progress tasks.
  • ReviseProductOrder or ReviseServiceOrder: To request a revision to a running order; this is subject to TMF state validation, additional logic in the Order Lifecycle Policy (for solution-specific PONR) as well as the configured grace period for in-progress tasks.
OSM makes available additional operations on the order resource that are synchronous requests:
  • ResumeProductOrder and ResumeServiceOrder: To resume a previously suspended order.
  • AbortProductOrder and AbortServiceOrder: To halt an in-progress order immediately regardless of its current position in the fulfillment.
Order Action Comparison

The range of order actions in OSM prior to TMF support, map onto the range of actions implemented by OSM's new TMF framework.

The following table provides the mapping for TMF622 ProductOrder. The mapping for TMF641 ServiceOrder follows the same pattern.

Order Action Canonical TMF Specification OSM Extended Specification
Create POST /productOrder Same as canonical
Update PATCH /productOrder/<id> Not supported, use "Revise"
Delete DELETE /productOrder/<id> Not supported, use OSM purging mechanisms
Suspend via PATCH POST /suspendProductOrder
Resume via PATCH POST /resumeProductOrder/<id>
Cancel POST /cancelProductOrder Same as canonical
Abort Not supported POST /abortProductOrder/<id>
Revise via PATCH POST /reviseProductOrder
List GET /productOrder Same as canonical
Find GET /productOrder/{id} Same as canonical

Task Resources

A task resource is used to expose operations that are not easily represented as CRUD operations. TMF uses this pattern for CancelProductOrder and CancelServiceOrder. OSM has continued to use this pattern to model other operations such as revise, suspend, resume and abort.

Some task resources are persisted, resulting in an id which is separate and distinct from the main productOrder id (or serviceOrder id). Clients can use this id to discover the status of the task resource. (GET /reviseProductOrder/{id})

Abort and resume are simple task resources, not requiring persistence of the request. See the Order Processing Sequence Diagrams in this chapter to understand the interaction between the main resource and the task resource.

About OSM Event Notifications

The OSM event notifications work as follows:
  • OSM emits additional creation and state-change events for the suspend and revise task resources. These notifications communicate the state of the task resource and NOT the main order resource.
  • Event subscription mechanisms are not used (POST and DELETE on hub). Instead, an Event Target System configuration is used to define a single listener for each Hosted Order Specification. It is expected that this single listener will either consume the events itself, or serve it to a message broker (for example, Kafka).
  • Where an operation is not supported (for example, DELETE), then any corresponding event notification is also unsupported (for example, ProductOrderDeleteEvent).
  • OSM has scoped the AttributeValueChange events to only trigger on changes to order item state or order item characteristic changes.
Attribute Value Event Payload
The canonical TMF payload for attribute value change events includes a "fieldPath" element, intended to hold identifying information about the field on an order item that contains the change. There are two potential problems with this approach.
  • This is a single field. If there are multiple changes to be communicated, then a convention would need to be introduced and communicated to the upstream system so it could effectively parse the data.
  • Alternatively, if each event is restricted to a single change, then there is a risk of flooding the system with more events than are needed.

OSM has attempted to resolve these shortcomings in a robust, schema driven way. The fieldPath has been extended to be an array of compound structures that identifies the specific change including action (add, remove), JSON path to the change and the old value.

Additionally, OSM's framework does the following:
  • OSM has restricted the changes that would trigger the AV event. Changes are limited to the order item state or the order item characteristic fields.
  • OSM would include multiple updates in a single event. All updates, whether within a single line item or across multiple line items, would be included in an event, so long as they are all made within the same orderUpdate call to OSM core.
An example of FieldPath extension is as follows:
ProductOrderAttributeValueChangeEventOSM payload : {
"eventId":"c6fd423a-777b-4a7e-ae89-d4e12060461a",
"eventTime":"2023-10-19T13:26:25.587Z",
"eventType":"ProductOrderAttributeValueChangeEventOSM",
 
"fieldPath":[{"change":"add","path":"$..productOrderItem[?(@.id=='0CX-1Z8QSX')].state","oldValue":""}],
"event":{"productOrder":{
"@type":"ProductOrderOSM",
"category":"salesOrder",
"description":"TMF622 OSM Product Order",
"externalId":"456850-osm",
.......
 
"productOrderItem":[{
"@type":"ProductOrderItem",
"id":"0CX-1Z8QSX",
"action":"add",
"state":"inProgress",
................

About the OSM Schema

This section describes the OSM schema extensions.

Order State Extensions

TMF specifications define a set of order states that have been enhanced in the OSM extended specification. These states are final and cannot be altered. TMF state changes would be communicated upstream in the <resource>StateChangeEvent.

The TMF state is reflected inside the TMF object data served through the REST API (GET /productOrder or GET /serviceOrder). When using any of the OSM UIs (Web Services API, XML API, Task Web UI, Order Management Web client UI), the order state field shown reflects the OSM order state, and not the TMF state.

The following table lists the mappings and usage of the TMF order states:

Table 8-1 Mappings and Usage of the TMF Order States

TMF State Usage OSM Order State
acknowledged Not used Not applicable
rejected Not used Rejected requests are handled through a synchronous HTTP response with appropriate HTTP response code Not applicable
pending Initial State. After order is created, but before any task has started. Initial State for future dated orders Created
held Not used Not applicable
inProgress Order is running InProgress
cancelled Order has finished being cancelled Cancelled
completed Order has finished execution with no failures Completed
failed Order has finished execution and all order lines have failed Completed
partial Order has finished execution with order lines having a mix of success and failure Completed
assessingCancellation Not used InProgress
pendingCancellation Order is running a cancellation request Amending

The following table lists the mappings and usage of the state extensions by OSM:

Table 8-2 Mappings and Usage of the State Extensions by OSM

TMF State Usage OSM Order State
amending Order is processing a revision request Amending
amending.suspended Order was processing a revision request but is currently suspended Amending
amending.fallout Order was processing a revision request but is now waiting on fallout exception resolution Amending
amending.fallout.suspended A revision request was waiting on fallout exception resolution but is now suspended Amending
pendingCancellation.suspended Order was running a cancellation request but is now suspended Amending
pendingCancellation.fallout Order was running a cancellation request but is now waiting on fallout exception resolution Amending
pendingCancellation.fallout.suspended A cancellation request was waiting on fallout exception resolution but is now suspended Amending
inProgress.fallout Order is running but is waiting on fallout exception resolution InProgress
inProgress.suspended Order was running but is currently suspended InProgress
inProgress.fallout.suspended An order waiting on fallout exception resolution but is now suspended InProgress
Order Item State Extensions

TMF specifications define a set of order item states that have been enhanced in the OSM extended specification. These states are final and cannot be altered. Changes to order item state would be reflected in the <resource>AttributeValueChangeEvent.

The valid order item states include the list above except the following states involving suspension:
  • inProgress.suspended
  • inProgress.fallout.suspended
  • amending.suspended
  • amending.fallout.suspended
  • pendingCancellation.suspended
  • pendingCancellation.fallout.suspended
About Customer Name

When viewing fallout orders in the Order Operations and Fallout Management user interface, there is a column heading for Customer Name. This name would be populated from order data that you control at design-time. The hosted specification entity in Design Studio has a text field where a JSON path can be provided that points to a specific data field under the productOrder or serviceOrder.

  • The import of a 622 specification defaults the value to $.billingAccount.name, but can be modified by the cartridge developer.

  • The import of a canonical 641defaults the value to $.externalReference.name but can be modified by the cartridge developer.

  • The 641 specification has no "natural" location in the schema where a customer name might be found. OSM has therefore extended the 641 schema to introduce a customer name field directly under the serviceOrder.

  • If an OSM extended 641 specification is imported, then the default value will be $.customerName.

About Customer Extensions to TMF Specifications

The OSM specifications can be further extended to suit your specific implementation by:
  • Adhering to OpenAPI guidelines when making schema extensions
  • Adding to the schema of the primary object (ProductOrder or ServiceOrder) in terms of order data
  • Keeping the set of Endpoints (paths) and operations and their contents unchanged
  • Keeping the set of Event Notifications (listeners) and their contents unchanged
  • Keeping the set of Task Resources and their contents unchanged
  • Keeping the set of order state and order item state definitions unchanged (that is, preserve the set of states as-is)
If the OSM extended specification satisfies your requirements in terms of schema objects, then it can be used as-is. If however, schema additions need to be made, then you should make your additions on top of the OSM extensions. See the OSM Modeling Guide for some considerations when making schema updates.

About the Hosted Order Specification

Once the required schema extensions have been made to the specification (optional), the specification needs to be imported into Design Studio. Design Studio analyzes this document and creates multiple cartridge entities automatically. The most visible auto-created cartridge content is a Complex Data Type conforming to the schema in the Hosted Order Specification. A TMF order type can be created by the cartridge developer, using a CDT, as the model of the Product Order or Service Order. Other auto-created cartridge content includes the delivery fulfillment mode, internal roles for TMF support, and Order Lifecycle Policy.

The cartridge developer can then proceed with the standard cartridge development process, creating orchestration entities, processes, tasks, automation plugins, and so on. Building the cartridge results in Design Studio embedding the Hosted Order Specification into the par file along with all the other cartridge content.

About Hosting Expectations

When OSM cloud native receives an order request (create, get, cancel, suspend, resume, abort, revise) that gets handled by a TMF cartridge, the following expectations and services are in place with respect to its internal behaviour:
  • A Complex Data Type (CDT) is created to match the structure and typing as per the schema for the Product Order or Service Order in the Hosted Order Specification. The cartridge developer must add this exactly once to the order template for a TMF order as a root level element with the name ProductOrder or ServiceOrder, as applicable. This is the primary resource of the Hosted Order Specification.
  • A cartridge developer can add more entries to the order template in order to facilitate the actual fulfillment of the order, outside of the primary resource. The primary resource and its underlying CDT can only be modified by using a modified Hosted Order Specification.
  • While Order Recognition Rule and Order Lifecycle Policy continue to be managed by the cartridge developer, OSM samples are provided with the data transformation from incoming order request to the order template and will check cancellation and revision automatically against orders and order items in a final TMF state (completed, partial, or failed). These behaviours must be preserved in order to satisfy TMF compliance requirements.
  • OSM manages the TMF state field, both at order level and at order item level. The times when cartridge developer needs to signal a state, they must use only an automation framework API to do so (for example, to signal TMF "failed" state for an order item).
  • OSM automatically emits order state change events (ProductOrderStateChangeEvent, ServiceOrderStateChangeEvent) whenever there is a change to the order's TMF state.
  • OSM automatically emits attribute value change events (ProductOrderAttributeValueChangeEvent, ServiceOrderAttributeValueChangeEvent) whenever specific data (order item state and anything in the order item characteristics) in the auto-generated order template changes. The most common of these would be to signal changes to the state of an order item.
  • A cartridge developer can update the business content (primarily, order item characteristics) of the primary resource as part of the order fulfillment. Such updates allow new data from fulfillment to be reflected via GET calls on the primary resource, and where applicable, for events to be generated. For more details about updating TMF data, see OSM Modeling Guide.

About TMF Cartridges

The TMF Cartridge type provides the most support to cartridge developers and system administrators when OSM operates on TMF orders. A TMF Cartridge is built around exactly one Hosted Order Specification, and provides the fulfillment logic for that order type (Product Order or Service Order). The TMF Cartridge is a solution cartridge, and consists of one or more component cartridges - all deployed as one unit.

The term Freeform Cartridge refers to the non-TMF cartridges. Freeform cartridges include all cartridges prior to 7.5.0 as well as non-TMF cartridges in 7.5.0. These cartridges are characterized by a fully open design-time experience, allowing complete flexibility in all of OSM's capabilities - order structure, order state behaviour, eventing and notifications, orchestration, automation, and so on.

Note:

It is important to note that these two cartridge types cannot be combined. If you have a Freeform cartridge, you cannot simply change the order type to TMF. You must start from scratch.

The following diagram illustrates the TMF support framework and the Freeform cartridge framework.

Figure 8-8 TMF Cartridge Framework



The Freeform Cartridge framework encompasses all of OSM's capabilities as exposed to the cartridge. However, when a TMF Cartridge is created from a Hosted Order Specification, some OSM capabilities are taken over by the TMF Support Framework.

This framework becomes responsible for:
  • Generating the CDT to represent the primary object (order) in the Hosted Order Specification's schema
  • Calculating TMF state and generating state change events
  • Monitoring changes to the primary object and generating attribute-value change events
  • Propagating data changes from orchestration components back into the primary object
In addition, the framework provides inputs into the Order Lifecycle Policy, as well as order lifecycle management mechanisms like fulfillment functions and required internal user roles. The cartridge developer has full access to the remaining portions of the Freeform Cartridge framework, like defining the order object, the various orchestration objects as well as the processes the tasks (manual and automated) require for fulfillment.

Both the Freeform Cartridge as well as the TMF Cartridge have access to the functionality to support REST interactions. Design Studio provides developers with the capability to send and receive REST requests, responses, and events with external systems (Target Systems) using a System Interaction Specification. See OSM Concepts for details. Also, refer to the OSM Modeling Guide for more information on working with TMF cartridges.

About Event Target System

While the Hosted Specification lists a set of notifications, there must also be configuration to define a listener address for the recipient of the events. This is done via a two-part configuration.

Design Configuration

The Hosted Specification entity in Design Studio includes an "Event Target System" name which reflects a logical system name. All events coming from orders linked to a given Hosted Order Specification (including specification version) are sent to this consumer. Because OSM Gateway emits notifications to a single system only, if the solution design requires events to be sent to multiple consumers or to be filtered in user-defined ways, this is the responsibility of the single consumer defined in the Event Target System.

Deployment Configuration

The cloud native toolkit looks in the specification files for a mapping between the logical target system name (project specification) as well as the URL to the consumer and any authentication configuration (instance specification). At runtime, OSM Gateway resolves the logical target system name for a given Hosted Order Specification by reading deployment artifacts created by the toolkit during instance creation.

The following diagram illustrates the configuration of event target system.

Order Processing Sequence Diagrams

This section provides order processing sequence diagrams for the following flows of a TMF order:

  • Basic order flow
  • Suspend and Resume
  • Cancel order
  • Revise order

The following diagram illustrates the Basic Order flow of a TMF order.

The following diagram illustrates the Suspend and Resume Order flow of a TMF order.

Figure 8-11 Suspend and Resume Order Flow



The following diagram illustrates the Cancel Order flow of a TMF order.

The following diagram illustrates the Revise Order flow of a TMF order.

TMF Product Order State Diagram

This section provides an illustration of the TMF Product Order State.

Figure 8-14 TMF Product Order State Diagram