For the case where only a new OnResponse method is added the workaround is executing these update queries:

UPDATE process.Context__ResponseHandlers
SET  "_ResponseHandlers" = 'OnResponseXYZ'
WHERE "_ResponseHandlers" = 'OnResponseABC'

Where ABC is an old method name, XYZ is a new method name.

In a case of several new methods they should be executed from the largest number first.

Datatype classes are used to define object properties, they allow to:

  • Validate values both generic (for example any defined %Integer property by default checks that it's value is an integer) and based on datatype parameters (for example you can have an %Integer(MINVAL=0, MAXVAL=9) property which in addition to checking that it's value is an integer would check that integer value is between 0 and 9)
  • Provide different representations based on context, specifically:
    • Logical (what's stored in globals)
    • Display (what's shown in object)
    • XSD (for XML export/import)
    • ODBC (returned in SQL)
  • Provide generators for utility methods. Article on some examples.

Docs.

Here's an example:

Class User.Assert Extends Ens.BusinessProcess [ ClassType = persistent, Language = objectscript ]
{

Method OnRequest(pRequest As Ens.Request, Output pResponse As Ens.Response) As %Status
{
    Set pResponse = ##class(Ens.Response).%New()
    
    $$$LOGINFO("$$$ASSERT(1)")
    $$$ASSERT(1) // skipped
    
    $$$LOGINFO("$$$LOGASSERT(1)")
    $$$LOGASSERT(1)
    
    $$$LOGINFO("$$$ASSERT(0)")
    $$$ASSERT(0)
    
    $$$LOGINFO("$$$LOGASSERT(0)")
    $$$LOGASSERT(0)

    Quit $$$OK
}
}

There are two ways to do that:

1. Mappings. Map classes and globals into the namespace you're querying from. This would work if there's no global/class collisions of course.

2. Custom queries. Here's an article on the topic. And here's an example.

3. Just set $namespace before running your query. Works only if you need to query one other namespace at a time. Example.