Great!

RSS feed by tag works in Thunderbird. Main RSS feed still shows as invalid.

Some thoughts about email integration:

  1. Replace the icon with a simple envelope icon - which  is more recognizable. I can easily recognize the first three icons, but the last one I incorrectly accociate with msn logo
  2. After clicking on a "share via email bullton" I'm being redirected to a new page where I can send a message from communityportal@intersystems.com. I think you  can raise convertion by using a simple mailto link (so default mail client pops up with a predefined topic and message instead of the new page) - so the person sharing the post can share from his own email account.

1. They must be granted to either application or user

2. Only resources of Service, Application and User type could be used there. %DB are database resources

3. SMP -> Menu -> View Roles -> Choose the role "webapp-admin" -> General Tab -> Priveleges -> Add -> choose the resoure -> OK -> Save

Repeat for webapp-user

4. Like this:

Parameter RESOURCE = "ResourceName1:Permission,ResourceName2,ResourceName3:Permission";

Where Permission is one of: READ, WRITE, USE

If Permission is skipped (see ResourceName2) then USE permission is checked.

If you paste table from somewhere else, when creating a post, sometimes borders may be undisplayed. To fix that switch into HTML view (via "Disable rich-text" button) and find the beginning of your table definition. It would look somewhat like that:

<table class="confluenceTable">

And replace it with:

<table border="1" cellpadding="1" cellspacing="1">

I had a similar problem. The task was to write custom logging system, which would automatically store current method argument values. Here's how I done it.

First the the persistent log class (relevant parts):

Class App.Log Extends %Persistent
{

/// Replacement for missing values
Parameter Null = &quot;Null&quot;;

/// Type of event
Property EventType As %String(MAXLEN = 10, VALUELIST = &quot;,NONE,FATAL,ERROR,WARN,INFO,STAT,DEBUG,RAW&quot;) [ InitialExpression = &quot;INFO&quot; ];

/// Name of class, where event happened
Property ClassName As %String(MAXLEN = 256);

/// Name of method, where event happened
Property MethodName As %String(MAXLEN = 128);

/// Line of int code
Property Source As %String(MAXLEN = 2000);

/// Cache user
Property UserName As %String(MAXLEN = 128) [ InitialExpression = {$Username} ];

/// Arguments&#39; values passed to method
Property Arguments As %String(MAXLEN = 32000, TRUNCATE = 1);

/// Date and time
Property TimeStamp As %TimeStamp [ InitialExpression = {$zdt($h, 3, 1)} ];

/// User message
Property Message As %String(MAXLEN = 32000, TRUNCATE = 1);

/// User IP address
Property ClientIPAddress As %String(MAXLEN = 32) [ InitialExpression = {..GetClientAddress()} ];

/// Add new log event
/// Use via $$$LogEventTYPE().
ClassMethod AddRecord(ClassName As %String = &quot;&quot;, MethodName As %String = &quot;&quot;, Source As %String = &quot;&quot;, EventType As %String = &quot;&quot;, Arguments As %String = &quot;&quot;, Message As %String = &quot;&quot;)
{
    Set record = ..%New()
    Set record.Arguments = Arguments
    Set record.ClassName = ClassName
    Set record.EventType = EventType
    Set record.Message = Message
    Set record.MethodName = MethodName
    Set record.Source = Source
    Do record.%Save()
}
}

And here's macros for client code:

#define StackPlace         $st($st(-1),&quot;PLACE&quot;)
#define CurrentClass     ##Expression($$$quote(%classname))
#define CurrentMethod     ##Expression($$$quote(%methodname))

#define MethodArguments ##Expression(##class(App.Log).GetMethodArguments(%classname,%methodname))

#define LogEvent(%type, %message) Do ##class(App.Log).AddRecord($$$CurrentClass,$$$CurrentMethod,$$$StackPlace,%type,$$$MethodArguments,%message)
#define LogNone(%message)         $$$LogEvent(&quot;NONE&quot;, %message)
#define LogError(%message)         $$$LogEvent(&quot;ERROR&quot;, %message)
#define LogFatal(%message)         $$$LogEvent(&quot;FATAL&quot;, %message)
#define LogWarn(%message)         $$$LogEvent(&quot;WARN&quot;, %message)
#define LogInfo(%message)         $$$LogEvent(&quot;INFO&quot;, %message)
#define LogStat(%message)         $$$LogEvent(&quot;STAT&quot;, %message)
#define LogDebug(%message)         $$$LogEvent(&quot;DEBUG&quot;, %message)
#define LogRaw(%message)         $$$LogEvent(&quot;RAW&quot;, %message)

Now, how that works in client code?  Let's say there is a class:

Include App.LogMacro
Class App.Use [ CompileAfter = App.Log ]
{

/// Do ##class(App.Use).Test()
ClassMethod Test(a As %Integer = 1, ByRef b = 2)
{
    $$$LogWarn("Message")
}
}

In the int code, the $$$LogWarn macro would be transformed into:

Do ##class(App.Log).AddRecord(&quot;App.Use&quot;,&quot;Test&quot;,$st($st(-1),&quot;PLACE&quot;),&quot;WARN&quot;,&quot;a=&quot;_$g(a,&quot;Null&quot;)_&quot;; b=&quot;_$g(b,&quot;Null&quot;)_&quot;;&quot;, &quot;Message&quot;)

And after execution a new record would be added to App.Log table (note, that the method was called with default params - if it was called with other values they would be saved, as this logging system gets arguments values at runtime):

There is also some additional functionality, such as objects serializationinto json and context restoration at a later date, but that does not pertrain to the current discussion.

Anyway, the main idea is that at compile time we have a macro that:

  • Gets method arguments list from %Dictionary.CompiledMethod

  • For each argument decides on a strategy on how to get it's value at runtime

  • Writes source code that would implement value get at runtime

  • Builds code to get all method arguments values

  • Inserts this  code into method

Relevant methods (in App.Log):

/// Entry point to get method arguments string
ClassMethod GetMethodArguments(ClassName As %String, MethodName As %String) As %String
{
    Set list = ..GetMethodArgumentsList(ClassName,MethodName)
    Set string = ..ArgumentsListToString(list)
    Return string
}

/// Get a list of method arguments
ClassMethod GetMethodArgumentsList(ClassName As %String, MethodName As %String) As %List
{
    Set result = &quot;&quot;
    Set def = ##class(%Dictionary.CompiledMethod).%OpenId(ClassName _ &quot;||&quot; _ MethodName)
    If ($IsObject(def)) {
        Set result = def.FormalSpecParsed
    }
    Return result
}

/// Convert list of method arguments to string
ClassMethod ArgumentsListToString(List As %List) As %String
{
    Set result = &quot;&quot;
    For i=1:1:$ll(List) {
        Set result = result _ $$$quote($s(i&gt;1=0:&quot;&quot;,1:&quot;; &quot;) _ $lg($lg(List,i))_&quot;=&quot;)
        _ ..GetArgumentValue($lg($lg(List,i)),$lg($lg(List,i),2))
        _$S(i=$ll(List)=0:&quot;&quot;,1:$$$quote(&quot;;&quot;))
    }
    Return result
}

ClassMethod GetArgumentValue(Name As %String, ClassName As %Dictionary.CacheClassname) As %String
{
    If $ClassMethod(ClassName, &quot;%Extends&quot;, &quot;%RegisteredObject&quot;) {
        // it&#39;s an object
        Return &quot;_##class(App.Log).SerializeObject(&quot;_Name _ &quot;)_&quot;
    } Else {
        // it&#39;s a datatype
        Return &quot;_$g(&quot; _ Name _ &quot;,&quot;_$$$quote(..#Null)_&quot;)_&quot;
    }
}

The project is open-sourced and availible on GitHub (to use import all classes from App package into any namespace).

I modified your code like this:

Class test.DummyClass Extends %RegisteredObject
{

Property notanumber As %String;

Property aboolean As %Boolean;

/// do ##class(test.DummyClass).Test()
ClassMethod Test()
{
    
    set dummy = ..%New()
    set dummy.notanumber = &quot;28001&quot;
    set dummy.aboolean = 1
    do ##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON(dummy,,,&quot;aelotw&quot;)
}
}

Terminal output:

>do ##class(test.DummyClass).Test()
{
        "notanumber":"28001",
        "aboolean":true
}

It can be done in 2016.1 FT, see this post. To do it in older versions, inherit from system classes.

 

Alternatively you can define a persistent class with properties of required types and transform it into json.

 

P.S. As a hack: JSON consumer can sometimes accept 1/0 in place of true/false, so you can try to use this values.

Good way to calculate such property. One question I have is why you use indirection and $name function in the generated method?  It can be safely removed, for example like this:

ClassMethod IsLastKnownRecordCheck(CitizenRef As %Integer, RelocationDate As %Date) As %Boolean [ CodeMode = objectgenerator ]
{
    set storagename=&quot;Default&quot;
    set storageInd=%class.Storages.FindObjectId(%classname_&quot;||&quot;_storagename)
    set storage=%class.Storages.GetAt(storageInd)
    set indexLocation=storage.IndexLocation
    do %code.WriteLine($c(9)_&quot;quit $order(&quot;_indexLocation_&quot;(&quot;&quot;CitizenRelocation&quot;&quot;, CitizenRef, RelocationDate))=&quot;&quot;&quot;&quot;&quot;)
    quit $$$OK
}

Hello.  You can do it like this:

  1.  In your source fact class define a new property - IsLastKnownRecord As %Boolean
  2. Fill this property with correct values during batch imort, or fill it with a task or a trigger or a callback (many ways to calculate it, choose any approach you want)
  3. In your cube delete IsLastKnownRecord dimension
  4. In studio open your cube class and add buildRestriction to the cube definition:  <cube buildRestriction="IsLastKnownRecord=1"
  5. Save and compile your cube
  6. During cube build only facts with IsLastKnownRecord value equal to true would be used to build a cube

What is the Criteria datatype?

Can you show the property definition?

If for example you have Criteria defined like this:

Property Criteria As %String(MAXLEN = 2000); // MAXLEN>512

Try to define the property like this:

Property Criteria As %String(COLLATION = "TRUNCATE(490)", MAXLEN = 2000);

 

How to debug SQL queries:

1. In SMP > System > Configuration > General SQL Settings  enable the following flags (don't forget to press Save):

  • Retains SQL Statement as Comments in .INT Code
  • Cached Query - Save Source  

2. Purge all Cached Queries - execute in terminal (namespace with query):

  • Do $SYSTEM.SQL.Purge()

3. Execute the query again to get an error

4. Open in studio %sqlcq.HSREGISTRY.cls966.1.int routine (it would be %sqlcq.HSREGISTRY.cls1.1.int after purge)

5. Go to %0AmEdun+4 in this routine and see what this is about. Set try/catch, and debug.

 

In this case the most likely scenario is that the code tries to set global subscript longer than the maximum of 511 characters. Since the only change between queries is the column (there is also "as Relevance" part in your error query, but I think it's irrelevant) then it's probably something with that.

Yes, DigitalOcean is quite good. I manage around 50 servers there and they don't disappoint. One issue I have is that  they don't offer backup/snapshot management. All you can do with a backup is restore it to current or a new server.  I'm used to features offered by other cloud providers, such as:

  • Browse backup disk image
  • Download disk image

But to do it in DigitalOcean I need to create a new droplet from a backup (takes time and costs  money) and browse it.

Also their in-browser-web-access is quite lacking -  they offer only VNC access, but not:

  • SSH console access
  • File explorer access
  • File explorer access for a powered off server