Clean up the development environment
- Last UpdatedSep 04, 2025
- 2 minute read
The third and final phase in the development of OMF applications is to clean up the development environment.
In OMF applications, the shape of data types are immutable. You cannot use OMF to change the shape of data after it has been defined. That means you cannot change the properties of a type message after it has been sent. However, while developing your application, you will often be experimenting with the shape of your assets and your PI points in PI Asset Framework and PI Data Archives, and want to make such changes in your test environment. To do this, you must understand how to properly clean up your development environment, and when cleanup is required.
As a rule of thumb, you should perform a cleanup:
-
When changes were made to a type:
-
You modified a name or description of the type or one of its properties.
-
You added, removed, or renamed a property.
-
You changed the type of a property (such as from number to string).
-
-
When changes were made to a container:
-
You redefined container typeid to another dynamic type definition.
-
-
When changes were made to static data:
-
You redefined asset typeid to another static type definition.
-
You modified an asset that you previously connected with a __link message.
-
To clean up resources created by OMF:
-
Re-send your original static data messages, but modified to use the delete action.
-
Re-send your original container messages, but modified to use the delete action.
-
Re-send your original type messages, but modified to use the delete action.
Re-sending your messages with the delete action is generally enough to ensure OMF resources have been cleaned up. However, during development you may find that you no longer have access to the original message that created a resource. In this case, the easiest way to guarantee OMF resources are cleaned up is to:
-
Delete the AF Database used by the OMF endpoint, and re-create it.
-
Manually delete any OMF-related PI points from the Data Archive. The easiest way to check whether a PI point belongs to OMF is to check the Point Source. If the Point Source is PIWebAPI_OMF, or matches the datasource keyword used by your client application, it should be deleted.