Eduard Lebedyuk · May 9, 2018 go to post

#2 limit yourself to 2048 char.

Nowadays it's fine. Most browsers work with long URLs.

So is your redirect just URL or  URL?urplarams=...... 

It's  URL?urplarams=...... 

One parameter is 5000+ symbols long.

Eduard Lebedyuk · May 9, 2018 go to post

I think that using ExportTasks and ImportTasks methods of %SYS.TaskSuper class as proposed by @Sean Connelly and @John Murray would be a better solution as:

  • It would not override system tasks
  • It would produce readable XML
Eduard Lebedyuk · May 9, 2018 go to post

MONEXT is an include file, you can see it in %SYS namespace.

You can map it to your namespace (in SMP - Namespaces - Routine mappings).

Eduard Lebedyuk · May 9, 2018 go to post

ServerSideRedirect  doesn't work in that context (OAuth authentication) unfortunately.

I also tried setting LOCATION header directly (via SetHeader method) - in that case I get the same truncated output.

Eduard Lebedyuk · May 9, 2018 go to post

You can export/import  ^SYS("Task","TaskD") global directly, which contains task definitions data.

Some properties are computed (i.e. LastFinished), and could probably cause this error.

Try to export/import minimal set of columns.

Alternative approach would be writing code to generate tasks.

Eduard Lebedyuk · Apr 26, 2018 go to post

Should they have access?

The best solution here is restricting access.

InterSystems security model allows for a customizable access management.

Application building/testing/deployment tasks could be fully automated and so not require human intervention at all.

Eduard Lebedyuk · Apr 22, 2018 go to post

Classes only.

Each method, that could be called from a terminal is documented with a sample call.

Eduard Lebedyuk · Apr 22, 2018 go to post

Try

chrome --headless --disable-gpu --print-to-pdf https://www.google.com/

Referenced article also shows several examples.

Chrome could be called with $zf(-1) function.

Eduard Lebedyuk · Apr 20, 2018 go to post

That looks like GZIP. Can you save response stream as a file and reopen it as a %Stream.FileCharacterGzip?

Eduard Lebedyuk · Apr 20, 2018 go to post

All properties names are written in:

 Write $$$ZENJSONPROP(tPropName,pFormat)_": {"

Write $$$ZENJSONPROP(tPropName,pFormat)_":["

To get current property XMLNAME parameter call this:

  Write $$$comMemberArrayGet(tClass,$$$cCLASSproperty,tPropName,$$$cPROPparameter,"XMLNAME")
Eduard Lebedyuk · Apr 15, 2018 go to post

You can create computed property and index it.

Class A {

Property P1 As B;

Property P1P1 As %String [ SqlComputeCode = {set {*} = ##class(B).P1GetStored({P1})}, SqlComputed, SqlComputeOnChange = (%%INSERT, %%UPDATE) ];

Index I1 On P1P1;

}
Eduard Lebedyuk · Apr 14, 2018 go to post

Other locales could have TimeFormat property not equal to 1, there are also custom locales.

I completely agree that in a wide range of scenarios defaults work fine, or rather defaults are what we expect them to be. However, that is not always the case, so I prefer (and advice) to use macros for $zd* functions with all relevant parameters specified.

Eduard Lebedyuk · Apr 14, 2018 go to post

$zdt($H,3)

When working with $zd* functions It's better to specify what you need explicitly, because otherwise locale change can be an unwelcome surprise:

$zdt($H,3,1,0)
Eduard Lebedyuk · Apr 14, 2018 go to post

There are two operations:

  • comparing repository/instance
  • bringing one on compliance with other

The first part (comparison) could be easily generalized, as the underlying Git repository allows us to do it  regardless.

The second part, however is very specific and should be implemented as a part of the source control hooks. I don't see how it could be generalized.

In my GitLab code I specify an interface which end user should implement - it's a method that accepts a list of deleted items (filepaths). Implementations of this interface should first translate file paths into internal names (i.e. /src/Utils/Math.cls -> Utils.Math)  and then delete them.

That said, full build from scratch can solve the issue completely. That's a decent approach to take towards more "lively" environments.

Finally, as we're talking about deleting classes, at least for me it's an extremely rare case. Do you encounter it often? How & Why?

Eduard Lebedyuk · Apr 13, 2018 go to post

The only "automatic" solution I see here is to check out and import classes into clear or new Namespace.

  1. Build git diff.
  2. Import new/modified classes.
  3. Delete deleted classes.

Cache Tortoise Git automatically deletes classes deleted from repository.

Or never delete classes, only "deprecate" it

Depends on how much dead code you have. If say a few classes then it's fine. But large amounts of dead code just make codebase even harder to read.