Solved.

Streams are not passed only for overloaded methods.

This does not work:


public class API {
    public void sendMessage(byte[] msg) throws Exception {}
    public void sendMessage(byte[] msg, String Id) throws Exception {}
}

However this does:

public class API {
    public void sendMessage(byte[] msg) throws Exception {}
    public void sendMessageId(byte[] msg, String Id) throws Exception {}
}

Try it like this:

/// d ##class(isc.test.Utils).Test2()
ClassMethod Test2()
{
    set from = "^A"
    set to = "^B"
    kill @from, @to
    set @from@(1) = "A"
    set @from@(2) = "B"
    set @from@(3) = "C"
    
    do ..InvertList(from, to)
    
    zwrite @from,@to
}

ClassMethod InvertList(from, to) As %Status
{
    #define ForAll(%in,%gn) s gn%in=$na(%gn) s %in="" f { s %in=$o(@gn%in@(%in)) q:%in=""
    #define EndFor }

    $$$ForAll(key, @from)
        set @to@(@from@(key))=key
    $$$EndFor
}

For me it returns

^A(1)="A"
^A(2)="B"
^A(3)="C"
^B("A")=1
^B("B")=2
^B("C")=3

Two ways I know how to add your page:

1. To DeepSee User Portal (from Analyze This):

Set tItem=##class(%DeepSee.UserLibrary.Link).%New()
Set tItem.fullName="Analyze This"
Set tPage="AnalyzeThis.UI.CSVImport.zen"
Set tItem.href=$system.CSP.GetPortalApp($namespace,tPage) _ tPage
Set tItem.title="Analyze This"
Set tSC=tItem.%Save()

2. To Favorites:

set sc = ##class(%SYS.Portal.Users).%AddFavorite("Name", "URL")