Replies:

Hi Michael,

This isn't a straight answer to the problem of extracting business logic from CSP pages - but if you haven't already, check out the isc.rest project. Its an open source release of the framework we've been using to migrate our CSP and Zen apps to REST (Angular front end). 

If nothing else, it provides a uniform, safe and easy to maintain way of creating a REST API from an existing application. 

My process has generally been to copy CSP business logic to a class method in the relevant persistent class and expose it as a REST Action there (see Defining Actions in isc-rest user guide).  Its possible to expose any method in this way, so depending on your situation, it could make sense to point an action endpoint to the class methods in CSP directly, or use a wrapper method.

This recent presentation is a great place to start: https://learning.intersystems.com/course/view.php?id=2102

git hub: https://github.com/intersystems/isc-rest

Thank you, @Robert Cemper and @Eduard Lebedyuk!

I did not know about MANAGEDEXTENT, assuming there was no way to use the same storage in another class.  Ed's warning is relevant though, I can't ensure that there wouldn't be other concurrent writes.

Here is my working solution.... Subclassing of the record class with Setters for the 2 properties seems to work.  Simply overriding the 2 properties without [ SqlComputed ] did not change the computed behavior.

Class Audit.HistoricalRecord Extends Audit.Record {

Method LastModifiedTimeSet(value As %String) As %Status
 {
    Set i%LastModifiedTime = value
    quit $$$OK
 }

Method LastModifiedUserSet(value As %String) As %Status
{
    Set i%LastModifiedUser = value
    quit $$$OK
}

}

My migration routine can now create and save objects of the HistoricalRecord class

Followers:
Matthew has no followers yet.
Following:
Global Masters badges: