Eduard Lebedyuk · Mar 13, 2018 go to post

Studio is less important here.

What does this return:

write ##class(%Dictionary.CompiledClass).%ExistsId("jitPod.Api.toServer.logon"),!
write ##class(%Dictionary.CompiledClass).%ExistsId("jitPod.api.toServer.logon"),!
zwrite ^oddPKG($zcvt("itPod.api", "U"))
Eduard Lebedyuk · Mar 13, 2018 go to post

1. Export Api package.

2. Uncompile and Delete all classes from Api package regardless of the case.

3. Delete package with

write $System.OBJ.DeletePackage("package name") 

4. Check if there's anything related to jitPod.Api package left in:

zw ^oddPKG

Delete ONLY entries related to your package.

5. In exported code replace Api with api for all classes. 

6. Restart Cache.

7. Import classes.

Eduard Lebedyuk · Mar 13, 2018 go to post

That would work, but I'm looking for a solution without user code.

Some system OutputToDevice method.

Eduard Lebedyuk · Mar 13, 2018 go to post

Pattern can be used:

Property GUID As %String(PATTERN = "8AN1""-""4AN1""-""4AN1""-""4AN1""-""12AN") [ InitialExpression = {$SYSTEM.Util.CreateGUID()} ];

And A can be replaced with L or U to store GUIDs in one case.

Eduard Lebedyuk · Mar 13, 2018 go to post

I'm calling load code like this:

csession ensemble "##class(isc.git.GitLab).load()"

ObjectScript:

/// Do a full load
/// do ##class(isc.git.GitLab).load()
ClassMethod load()
{
    try {
        set dir = "/src"
        do ..log("Importing dir " _ dir)
        do $system.OBJ.ImportDir(dir, "*.xml", "c", .errors, 1)
        throw:$get(errors,0)'=0 ##class(%Exception.General).%New("Load & compile error")
        halt
    } catch ex {
        write !,$System.Status.GetErrorText(ex.AsStatus()),!
        do $system.Process.Terminate(, 1)
    }
}

This way process terminates abnormally on error:

do $system.Process.Terminate(, 1)

And it's usually reported as error in CI/CD systems.

Additionally you can grep for "Load & compile error".

I'm currently writing a series of articles on continuous delivery, check it out (latest part).

Eduard Lebedyuk · Mar 12, 2018 go to post

I can't see the image. But it should be the last Item in a first part of the View menu. It's also the only item of a first part of the View menu with a dropdown.

Eduard Lebedyuk · Mar 12, 2018 go to post

What version of Cache does it require to work?

If think it requires 2016.1 but 2016.2+ would be preferable.

I notice in the readme that it says to create a / web application. Did you literally mean "/"?

You can create non-root (/something) web application, that should not be an issue on windows clients iirc.

Read-only office documents

Are OPTIONS requests processed correctly? Check OnHandleOptionsRequest method - you'll need to write a method that processes all OPTION requests and returns relevant headers.

If the problem with read-only Word files persists, it can be fixed by one of the above:

Additionally I recommend:

  • Installing 2017.2 (anything 2016.2+) separately and checking that it does work
  • Installing Wireshark and capturing a sample exchange on 2014.1 and 2017.2
  • Compare these two sessions to understand what fails on 2014.1
Eduard Lebedyuk · Mar 12, 2018 go to post

Are you sure the problem is with the BS? Does visual trace stops there?

Is your target BP compiled?

Eduard Lebedyuk · Mar 12, 2018 go to post

Good article.

If you have BO with one message route in message map you can remove the message map altogether and name your method OnMessage - it would be called automatically.

Eduard Lebedyuk · Mar 9, 2018 go to post

Can I still add code in Business Studio and it maintain integrity to be able to still open in the BPL editor?

It's easier to use one tool to modify BPL.  <assign> is available in UI so you can add it without writing XML at all.

  then the BPL hung.

I tested that behavior in BS only and it works there fine there.  Maybe it causes BP to break. You can try to set SessionId just before sending request to other BP or BO and then reinstating old SesionId  value back. That way persistent  session value on disc would stay the same and BP can maybe survive unload from memory.

My recommendation is to iterate over result set in BS rather than BP, then send each new snapshot (preferably preprocessed  in BS) to BP with new session for each object.

Eduard Lebedyuk · Mar 9, 2018 go to post

You can use assign action:

<assign property='..%Process.%SessionId' value='""'/>

Still, I'd recommend the same trick but in BS not BP:

set ..%SessionId = ""
Eduard Lebedyuk · Mar 9, 2018 go to post

Set SessionId property to empty string and Ensemble would automatically start a new session.

Also why are you iterating over a result set in a BP and not in BS? It would probably be better.

Eduard Lebedyuk · Mar 9, 2018 go to post

I want to know if it's possible that when I selected a date in one widjet affected also the other widjet with the same date. '

Yes. When you specifying the target for the widget control you can specify:

  • Empty string for current widget
  • * for all widgets
  • Widget name for some specific widget
  • Comma-separated string of widget names - to specify arbitrary number of widgets

Fourth case sounds like what you need.

If exists the possibility to create a generic date and when the user choose the range of date, will affect all of the widjets, independent that are different dates.

Can you elaborate on that? Do you mean filtering by week/month/season/year/etc.? That's possible.  There are a lot of ranges available, but you can add your own by extending %DeepSee.Time.AbstractLevel.

Eduard Lebedyuk · Mar 9, 2018 go to post

Also, if I happen to close Studio while the menu bar is "loose", the menu bar remains missing when I open a new Studio Session.
Is there a way to get the menu bar back in such a situation?

Vew -> Panels -> Uncheck missing panel

Vew -> Panels -> Check missing panel

Eduard Lebedyuk · Mar 8, 2018 go to post

Cache runs under different user. Check that this user (default: System) has access to \\backupsrv

If you're in a terminal, it would run under your OS user, have you tried writing the file from a terminal?

Eduard Lebedyuk · Mar 5, 2018 go to post

For password authenticated web applications it is possible by following these steps:

  1. All brokers effectively have Parameter UseSession = 1;
  2. REST web application and client web application allow only authenticated (i.e. password) access.
  3. REST web application and client web application have reasonable Session timeout (i.e. 900, 3600).
  4. REST web application and client web application have the same GroupById value.
  5. REST web application and client web application have the same cookie path.

If all these conditions are met, user would only consume one license slot per session and perform only one login.

Check out my upcoming webinar, we definitely would be discussing authentication.

Eduard Lebedyuk · Mar 2, 2018 go to post

Not directly. You receive the whole response and can process it line by line, terminating wherever you wish.

I'd recommend using WebSockets if possible.

Eduard Lebedyuk · Mar 2, 2018 go to post

Default namespace has a priority over script namespace. Remove user's default namespace.

Added as an answer.

Eduard Lebedyuk · Mar 2, 2018 go to post

Default namespace has a priority over script namespace. Remove user's default namespace.

Eduard Lebedyuk · Mar 1, 2018 go to post

You need to press "View other code" button (or Ctrl+Shift+V) and post zMypropertyGetSwizzled routine.

Eduard Lebedyuk · Mar 1, 2018 go to post

Please post this line of code (Open myClass -> See other code -> zMypropertyGetSwizzled routine, third line) :

zMypropertyGetSwizzled+3^myClass.2

Eduard Lebedyuk · Mar 1, 2018 go to post

Hello, everyone!

It's my first big webinar in English so I'm starting with the topic I'm familiar with  - REST APIs.

The main goal of this webinar is to  discuss REST APIs and how can we design them so they can evolve and grow without causing too much problems for everyone involved. Versioning, software layers separation, Broker separation - that kind of thing,

I would also like discuss some common challenges and how can we bypass them.

Then the tooling for the whole development life-cycle (dev-debug-test-document) would be presented.

And finally I'll show some REST API examples. Well, mainly UI clients for these APIs.

If you have a question about REST that sounds more or less relevant to the topics above - please post it here (or mail directly to me), I'll try to cover it too if possible.