Question
· Sep 20, 2022

How to change the class reference of Business components if already created?

Hi Friends,

In my production already we have business components (business service , process, operations) and all are working fine.

Now I have change the package structure of few classes and want to update the references in settings for Business components in Management portal.

As this class field is read only , Any other way to update the class reference, instead of creating new business component?

Thanks,

Prashanth

Product version: IRIS 2021.1
Discussion (3)1
Log in or sign up to continue

You will wanna follow this steps for what i think it's the easiest and securest way for that:

  • Export everything in a project to an XML
  • Open the file in a notepad or anything similar
  • Open the "Find and Replace" menu - on Windows you use Ctrl+H for that
  • On "Find" you type the current name and on "Replace" the new one, for each class
  • Import again this new document and delete the remaining classes with the old names

Hi, I just did the same thing.
I am using Visual Studio Code with InterSystems plugins.
Using the plugin, connect to your server in the appropriate namespace.

Once done, locate your Production.cls in VSCode explorer, right click and select Export, this will export from IRIS to your local filesystem.


You should be able to find the location of the exported class in your filesystem in the output panel:

export "Namespace.Production.cls" as "/Users/yourself/Developer/Project/Namespace/Production.cls" - SuccessExported items: 1

Do the search and replace that you in the local Production.cls. When saving your modifications, the class is automatically compiled in the server:

The output also shows:

Compilation started on 09/20/2022 13:33:15 with qualifiers 'cuk'
Compiling class EAI.Production
Compiling routine EAI.Production.1
Compilation finished successfully in 0.113s.

While working on your changes, pay attention to the notification that can occur