You set tSC variable equal to a string:

"/ensemble/data/transfer/AncillaryPDF/TMSAUDIO/Apr-11-1/980512729TMSAUDIO1046784936436537800.pdf"

However, this variable was (probably) intended to be used as a %Status. Somewhere there is probably a check:

$$$ISERR(tSC)
$$$ISOK(tSC)

Or status variable is set from tSC.

1. Export cube registry class from source server

2. Import cube registry class into target server

3. Execute in a terminal on a target server:

set ^DeepSee.CubeManager("activeRegistry") = "Cube.Registry.Class"

Execute this SQL in every namespace you need to get a list of production classes and their descriptions:

SELECT
ID, Description
FROM Ens_Config.Production

Here's a sample project with query that executes in every Ensemble namespace. Also article about writing custom queries.

In your BO try:

Set result = ..Adapter.FTP.MakeDirectory(.path)

Adapter is EnsLib.FTP.OutboundAdapter and FTP is %Net.FtpSession.

I would subclass the adapter and add MakeDirectory method there, with code pointing to the FTP method and status conversion.

You can search for the references in studio:

  1. Open Studio
  2. Menu -> Edit -> Search in files
    • Find: Dimension/Measure (for example [DateOfSale].[Actual].[DaySold])
    • File type: *.dfi

It should find relevant entities.

Hello.

I have provided more comprehensive documentation for Ensemble Workflow REST API project.

Do you think there's something else I need to add to it?

Here are some thoughts:

  • Write Source Control Hook that implemets OnAfterSave method and checks there (or maybe some other entry point). There are several sample source control hook classes, check them out.
  • Use ^rINDEXCLASS global (key - class name in uppercase) - it contains some basic information such as modification time (1st position) and hash (13th position). You can monitor it and if time or hash changes then record the new class version.
  • Use lock table to see what classes are currently being edited
  • Use $$$defClassKeyGet macros (see %Dictionary.ClassDefinition/%Dictionary.CompiledClass definitions, they use these macros a lot) to get info about modification time/hash and the changes themselves
  • %Compiler.UDL.TextServices to get the class text

I would have done it like this:

  • Background process monitors ^rINDEXCLASS global
  • Upon finding changes get the current class code via %Compiler.UDL.TextServices class,  GetTextAsStream method
  • Write this information into your own class (classname, timestamp, user, classtext, diff, previousversion)

Modification of system classes is not a very good idea:

  • They are lost on update
  • User may not have access required to install these changes

That being said, the best solution in my opinion is to setup your critical/production systems in such a way, that developers do not have direct write access to them. Each of the developers have their own environment where they can do whatever and then commit it to source control system. Continuous integration solution (or one developer or a script) then uploads the code (after it passes the tests) to the production server. There are several source control/continuous integration systems available for Caché.

It is a good idea that a change can only be done via source control commit. All other changes simply should not exist.