I don't see this. If I save it (ctrl-S) it just saves and compiles it. It does not reformat it.

If I ask it to format it (shift-alt-f) it does a simple formatting (basically seems to 'Sentence case' each keyword) but leaves the format unchanged.

Have you got a formatter installed for objectscript classes on top of the InterSystems one?

As intimated you can map the lookup tables at the base global.

We do this because we have many productions all requiring the same set of lookup tables. We also have common credentials across all our namespaces as shown in the above above global mappings

We also use a common database to store all of our code to enhance code reuse and reduce copying of classes across namespaces.

Its a very common coding issue. I achieve what you are trying to do by this construct

Method DoStuff() As %Status
{
  set tSC = $$$OK

  do {

    set tSC = method_invocation1()
    quit:$$$ISERR(tSC) 

    set tSC = method_invocation2()
    quit:$$$ISERR(tSC)

  } while 0
  quit tSC
}
 

This enables you to exit at the first issue with the relevant status.
The do while loop is just there to act as a 'container' for the code so you can jump out of it with a quit with no arguments, it can be replaced with a try catch block.

One way of doing it.. In my opinion its ugly to read but it accomplishes what you require..

set ioOutStream = ##class(%IO.StringStream).%New()

do ##class(EnsLib.HL7.Util.FormatSimpleXMLv2).OutputDocument(sourceHL7Message, .st, ioOutStream, sourceHL7Message.Separators)
for segCount=1:1:sourceHL7Message.SegCountGet()
{
    set segment = sourceHL7Message.GetSegmentAt(segCount, .st)
    quit:$$$ISERR(st)
    do ##class(EnsLib.HL7.Util.FormatSimpleXMLv2).OutputSegment(segment, .st, ioOutStream, sourceHL7Message.Separators, segCount, segment.Name, sourceHL7Message)
}

do ##class(EnsLib.HL7.Util.FormatSimpleXMLv2).OutputDocumentEnd(sourceHL7Message, .st, ioOutStream, sourceHL7Message.Separators)

set sourceXMLStream = ##class(%Stream.GlobalCharacter).%New()
do sourceXMLStream.CopyFrom(ioOutStream)

The sourceXMLStream contains XML like...

<SimpleHL7v2 TypeName="MDM_T02" Identifier="GUID-MESSAGE-ID" SegCount="8" Description="Medical document management - Original document notification and content">
<Segment Index="1" Name="MSH" FieldCount="19" SegPath="MSH">
        <Field Index="1">|</Field>
        <Field Index="2">^~\&amp;</Field>
        <Field Index="3">MEDISOFT</Field>
        <Field Index="4">OPTH</Field>
        <Field Index="7">20151106103857</Field>
        <Field Index="9">
                <Component Index="1">MDM</Component>
                <Component Index="2">T02</Component>
        </Field>
        <Field Index="10">GUID-MESSAGE-ID</Field>
        <Field Index="11">P</Field>
        <Field Index="12">2.4</Field>
</Segment>

<Segment Index="2" Name="EVN" FieldCount="5" SegPath="EVN">

        <Field Index="2">20151106103855</Field>

</Segment>...

Hi John

We havent spoke for a long time.

I assume Deltanji works in a similar manner as VCm, if so, I am aware of the advantages of that approach. We are at this moment still looking into Atelier as to whether we embrace it completely.

Code migration is something we are still thinking about. As you know we don't do full code migration between our environments we use small feature packages the approach of CR's in VCm is a very useful way of managing the release.

Hi Ben

Base lining the code as you suggest, is pretty much as we will end up doing. Its what we have done previously.

The  'server DEV' v 'private DEV' instances. Unfortunately we cannot have working DEV instances privately. We work on a very large integration implementation that has many external servers/services 'plugged in' to provide messaging etc, which unfortunately cannot be replicated. One approach we will try is using private DEV instances for small feature updates and using hand coded messaging for prototyping, but then integrating into the main DEV codebase for further testing.

One reason for my question is that we have a team of developers working on various parts of a namespace at any one time which obviously causes issues if we are working on the same piece of code (its rare but happens). I was wondering how people got around the paradigm of Atelier working against a single namespace and trying to reconcile that against Git with multiple developers working on the same piece of code. Without file locking I can see it creating more merge issues than the traditional 'private instance' of development.

We are at the start of looking into using Atelier.

Our intention is to use BitBucket as source control so we will use the eGit plugin. The problems we have are we already have 3 environments (DEV, TEST and PROD) which contain code which will need uploading into three repositories or branches (not decided yet). But then we need the ability to move code between these locations which is what prompted my question. Since then I think I have found a different way of managing the conflicts.

Assume you have a business service called 'ServiceOne' in your production which is adapterless

You then just need the following code to call it..

set st = ##class(Ens.Director).CreateBusinessService("ServiceOne", .theService)
quit:$$$ISERR(st) // or whatever you want on an error
set st = theService.ProcessInput(request, .response)
​quit:$$$ISERR(st) // or whatever you want on an error