Create studio project file

Primary tabs

Hello guys,

I have been playing around with the deployment tools from Ensemble (mostly based on this article https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...) , but so far the one thing I still couldn't figure out is how to group files into a single "Studio project file".

By using the deployment tool UI, supposing that I want to add a bunch of custom files to my deployment file (XML), it's practically impossible because I need to add one by one.

So the only way around it is using this idea of grouping files into a "Studio project file" and thereafter adding the "Studio project file" into my final deployment file.

Any clues?

Thanks

  • 0
  • 0
  • 175
  • 10
  • 4

Answers

You can create a Studio project interactively from within Studio. There are a few hints in the Studio doc here.

Or if you want to create/amend Studio projects programmatically, use the %Studio.Project class.

Thanks John but I have come across this documentation previously and still couldn't find exactly what I should use in order to achieve my need.

Would you mind pointing me something more specific? (the documentation is very extensive and I guess my need is very straightforward, doesn't seem a complex task).

Cheers

  1. Connect Studio to your namespace.
  2. File\New Project. Your Studio titlebar will refer to Project1.prj.
  3. Project\Add Item...
  4. File\Save Project As... and give your project a meaningful name.

OK I found it, but now I can't understand why my final XML doesn't include the definition from all files I have included into the project file.

Any ideas?

Yeah... that is not funny but is true. You have to add the "files" and not the "packages" in order to get the files inside the XML project file

I guess you are using Studio (Not Atelier) in order to create the Studio Project. Right?

Then the idea is simple. You have to create a new Studio Project, add any class to the project, save the project from "File/Save Project As..." and after use the Project from the Deployment Page at Management Portal.

What's the thing not working?

That's correct. I have added a new comment above with my last attempt

Hi, Murillo! You also can export all the classes, DFIs, globals or whatever of your project in one file with D $System.OBJ.Export(). E.g.: s

list="RMH*.CLS"

  D $System.OBJ.Export(list,"release16072018.xml")

Then just import it on a target system.

You could also check this small library isc-dev which could automate you on working with git on:

import/export code in UDL, exporting releases and patches upon commits.

Hi Murillo,

I have repeated the steps that you have described. The export of the components of the production is of just the items that you specify - so the project file, which is a list of pointers, and not the things pointed to by the project file. If you want to create an XML file that contains all of the items pointed to within the project you should export it from Studio. You can do that from the Tools >> Export... menu item, or by right clicking on the Project file in the Workspace and selecting Export.

Hi Jan,

Thanks but I want to follow what the deployment tool is advising me to, include everything I need through the management portal export tool. What is the solution in this case then?

Because we know that the export tool has a very poor interface that doesn't allow me to select more than 1 file, hence I need to to stick to creating a "project file" if I want to include a group of custom files for example, but it doesn't seem possible.

I don't really see a way out.

It appears that there was a bug in the export method which meant that the deployment export file included just the contents of the project file and not the items referenced in the project file. This has now been fixed but it affects the HealthShare version that Murillo is using and which I had also tested with.

What version(s) of Ensemble / HealthShare suffer from this bug? In what version did it get fixed?

The original report suggests it was a problem in Ensemble 2016.1 but I tested with Ensemble 2016.3 and it appeared to be OK. I found the problem with HealthShare 2017.1 and it is documented as fixed in Ensemble 2017.2. I tested in HealthShare 2017.2.1 and it works correctly.