Fabio Goncalves · Dec 18, 2015 go to post

I managed to make it work. The problem was related to the generated javascript file during compile time that has been saved as ANSI. I just changed the encoding to UTF-8 through Notepad->Save As and it worked fine.

Fabio Goncalves · Jan 14, 2016 go to post

Hi Simon,

I don´t know wich version of Caché or Ensemble you are running but it is available with DeepSee´s feature for predictive analyses that works with a decision tree PMML file created from a external tool. Let me know if you want additional details.

Regards.

Fabio Goncalves · Jan 21, 2016 go to post

Hi Daniel!

Thank you for you help. I got your explanation but my question may be very poor about what I was expecting. 

Considering the same classes that you mentioned above, from SAMPLES (Sample.Company and Sample. Employee) I ran the following code:

USER>zn "samples"
 
SAMPLES>set c = ##class(Sample.Company).%OpenId(1)
 
SAMPLES>w c
1@Sample.Company
SAMPLES>w c.Name
PicoPlex Gmbh.
SAMPLES>w c.Employees
2@%Library.RelationshipObject
SAMPLES>w c.Employees.Count()
5
SAMPLES>w c.Employees.GetAt(1)
3@Sample.Employee
SAMPLES>w c.Employees.GetAt(1).Name
Thompson,Vincent L.
SAMPLES>w c.Employees.GetAt(2).Name
Garcia,Amanda C.
SAMPLES>w c.Employees.GetAt(3).Name
Noodleman,Barbara T.
SAMPLES>w c.Employees.GetAt(4).Name
Smith,Dick A.
SAMPLES>

From the result above you can notice that the employee names, for instance, is not ordered. My question was about choose the order by name, salary or any other property value from the "child class". Is it possible? What would be an alternative for that?

PS: I also have tried to use SetObjectAt method and pass a key parameter value with the value that I want to be ordered. However when I try to retrieve data by using thoses key values, it does not work according to the key order that I tried to use on SetObjectAt key parameter value.

Thanks.

Fabio Goncalves · Mar 18, 2016 go to post

I have downloaded and installed Cache version is Cache for Windows (x86-64) 2016.2 (Build 613U) Wed Mar 9 2016 19:14:35 EST and Atelier 1.0.116 and it still not working for me. 

I also have tried with the cloud caché Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2016.2 (Build 605U) Thu Feb 25 2016 19:24:57 EST and is not working as well.

Fabio Goncalves · Apr 15, 2016 go to post

I thought about stash the header and footer and inject this code on the layouts when needed . Also they would likje to control the active option, for instance, or have a history bar right bellow the menu. 

I am really interested in advice to them the best approach and I am worried about do not make simple things became a monster in order to get difficult for maintanance, etc.

Fabio Goncalves · Apr 15, 2016 go to post

Hi Steffan,

I though about have those header and footer layouts stashed and or loaded dinamically so that it can be  injected the other pages/layouts when needed. 

Could you please provide me more details about how to have this menu logic in a central method, as you mentioned? I have adviced them to use Multiple Templates (Dynamic Dispatch) in order to have the code more organized and easy to maintain. 

Thanks.

Fabio Goncalves · Apr 19, 2016 go to post

Hi Jue,

I am trying to install AngularJS from http://oss.opensagres.fr/angularjs-eclipse/1.1.0/. I don´t really know if this is the right one if it suits on our Atleier version. However I have searched for some Angular JS pluging on Google and followed the instructions. I am trying to install from Atelier->Help->Install New

This is the error that I am facing out:

Cannot complete the install because of a conflicting dependency.
  Software being installed: AngularJS Eclipse 1.1.0.201511091212 (angularjs-eclipse-feature.feature.group 1.1.0.201511091212)
  Software currently installed: Eclipse Platform 4.5.2.v20160212-1500 (org.eclipse.platform.feature.group 4.5.2.v20160212-1500)
  Only one of the following can be installed at once: 
    International Components for Unicode for Java (ICU4J) 54.1.1.v201501272100 (com.ibm.icu 54.1.1.v201501272100)
    International Components for Unicode for Java (ICU4J) 4.0.1.v20090415 (com.ibm.icu 4.0.1.v20090415)
    International Components for Unicode for Java (ICU4J) 4.0.1.v20090822 (com.ibm.icu 4.0.1.v20090822)
  Cannot satisfy dependency:
    From: AngularJS Eclipse 1.1.0.201511091212 (angularjs-eclipse-feature.feature.group 1.1.0.201511091212)
    To: org.eclipse.angularjs.core [1.1.0.201511091212]
  Cannot satisfy dependency:
    From: Eclipse AngularJS Core 1.1.0.201511091212 (org.eclipse.angularjs.core 1.1.0.201511091212)
    To: bundle org.eclipse.wst.validation 0.0.0
  Cannot satisfy dependency:
    From: Eclipse e4 Rich Client Platform 1.4.1.v20160212-1350 (org.eclipse.e4.rcp.feature.group 1.4.1.v20160212-1350)
    To: com.ibm.icu [54.1.1.v201501272100]
  Cannot satisfy dependency:
    From: Java EMF Model Utilities 2.0.200.v200905140200 (org.eclipse.jem.util 2.0.200.v200905140200)
    To: bundle com.ibm.icu [3.8.1.1,4.1.0)
  Cannot satisfy dependency:
    From: Java EMF Model Utilities 2.0.201.v201001252130 (org.eclipse.jem.util 2.0.201.v201001252130)
    To: bundle com.ibm.icu [3.8.1.1,4.1.0)
  Cannot satisfy dependency:
    From: Eclipse Platform 4.5.2.v20160212-1500 (org.eclipse.platform.feature.group 4.5.2.v20160212-1500)
    To: org.eclipse.rcp.feature.group [4.5.2.v20160212-1500]
  Cannot satisfy dependency:
    From: Eclipse RCP 4.5.2.v20160212-1500 (org.eclipse.rcp.feature.group 4.5.2.v20160212-1500)
    To: org.eclipse.e4.rcp.feature.group [1.4.1.v20160212-1350]
  Cannot satisfy dependency:
    From: Common Frameworks 1.1.300.v200904160730 (org.eclipse.wst.common.frameworks 1.1.300.v200904160730)
    To: bundle org.eclipse.jem.util [2.0.100,3.0.0)
  Cannot satisfy dependency:
    From: Validation Framework 1.2.102.v200905201610 (org.eclipse.wst.validation 1.2.102.v200905201610)
    To: bundle org.eclipse.wst.common.frameworks [1.1.200,2.0.0)
  Cannot satisfy dependency:
    From: Validation Framework 1.2.104.v200911120201 (org.eclipse.wst.validation 1.2.104.v200911120201)
    To: bundle org.eclipse.wst.common.frameworks [1.1.200,2.0.0)

It takes a while longer trying to compute 15 alternative solutions by itself and then pops up the error message above.

 Thanks.

Fabio Goncalves · Apr 19, 2016 go to post

Not necessary. It was just a copy and paste. You can use a registered for this and just expose your classmethod as sqlproc.

Fabio Goncalves · Apr 19, 2016 go to post

Sharing with all another example.

Credits to Amir Samary.

Class Sequence.Implementation Extends %RegisteredObject
{
/// SQL Example:
/// select Sequence.NextVal('TEST')
ClassMethod NextVal(pSeqName As %String, pContext As %String = "*") As %Integer [ SqlName = NextVal, SqlProc ]
{
set tSeqName = $ZConvert(pSeqName,"U")
Set tContext = $ZConvert($Select(pContext'="":pContext,1:"*"),"U")
Set seq = ""
    if $Data(^Sequence(tSeqName))
    {
     set seq = $Increment(^Sequence(tSeqName,tContext))
     Set %Sequence(tSeqName,tContext)=seq //For use by CurrVal()
    }
    else 
    {
     throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","Sequence does not exist")
    }
    
Quit seq
}
/// SQL Example:
/// select Sequence.CurrVal('TEST')
/// WARNING: This will not work when called on the Management Portal since different processes
/// on the CSP Gateway pool may be answering to the HTTP request to execute the query.
/// This should work properly vía ODBC/JDBC since a single process is kept open for us and should
/// also work on $System.SQL.Shell().
ClassMethod CurrVal(pSeqName As %String, pContext As %String = "*") As %Integer [ SqlName = CurrVal, SqlProc ]
{
set tSeqName = $ZConvert(pSeqName,"U")
Set tContext = $ZConvert($Select(pContext'="":pContext,1:"*"),"U")
Set seq = ""
    if $Data(%Sequence(tSeqName,tContext))
    {
     set seq = %Sequence(tSeqName,tContext)
    }
    else 
    {
     throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","There is no current value for this sequence. Call NextVal() first.")
    }
    
Quit seq
}
/// Create a new Sequence if it not exist. If the sequence exist, then return an error message
/// Ejemplo de SQL:
/// select Sequence.CreateSequence('TEST')
ClassMethod CreateSequence(pSeqName As %String, pContext As %String = "*") As %String [ SqlName = CreateSequence, SqlProc ]
{
set tSeqName = $ZConvert(pSeqName,"U")
Set tContext = $ZConvert($Select(pContext'="":pContext,1:"*"),"U")
    if $Data(^Sequence(tSeqName))
    {
        throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","Sequence already exists")
    }
    else
    {
        set ^Sequence(tSeqName) = ""
        set ^Sequence(tSeqName,tContext) = 0
    }
    
    Quit 1
}
/// Drop a sequence if this exist, if it not exist, then return an error message
/// Ejemplo de SQL:
/// select Sequence.DropSequence('TEST')
ClassMethod DropSequence(pSeqName As %String) As %String [ SqlName = DropSequence, SqlProc ]
{
set tSeqName = $ZConvert(pSeqName,"U")
    if $Data(^Sequence(tSeqName))
    {
        Kill ^Sequence(tSeqName)
        Kill %Sequence(tSeqName)
    }
    else
    {
        throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","Sequence does not exist")
    }
    
    Quit 1
}
}
 

Fabio Goncalves · May 2, 2016 go to post

I am really interested in to know if just change my class definition from %Library.GlobalCharacterStream to %Stream.GlobalCharacter is needed considering that it has the same storage mechanism or there is some diferences where is needed to migrate data from %Library.GlobalCharacterStream to %Stream.GlobalCharacter by writing on the new %Stream.GlobalCharacter stream?

Also when using SQL to insert,  update and select %Stream.GlobalCharacter has the same behavior as the %Library.GlobalCharacterStream ? 

Fabio Goncalves · Jun 13, 2016 go to post

I usually add a HANG command when I want to start debugging

Hang 15

And call the system or app which runs the specific class method, routine, csp, etc.

This hang gives me some time to go to studio and attach my studio debug to that process according to the name.

Fabio Goncalves · Jul 19, 2016 go to post

I agree with  Eduard Lebedyuk answer bellow that, SPA don´t work with browser back/forward buttons and consequently with the browser history. 

However, I noticed that the pushDocument has a parameter 'nohistory' that uses the mechanism  history.pushState when set as 'true'. It is available on  %ZEN.Mojo.basePage. I did some test in order to try to help Alexandre and i have noticed that after you pushDocument, popDocument, than click on back or forward browser buttons and than try to pushDocument once again, it does not work correctly as it was. 

Does anybory has any thoughts about that?

Fabio Goncalves · Jul 19, 2016 go to post

Yeap! I was trying to use getTemplateForArea(area) and zenPage.loadTemplateNS(), but I couldn´t make it work as I expected.

Good. Thank you very much!

Fabio Goncalves · Feb 8, 2018 go to post

Pageviews is related to the UI side. Some UI can have acces to multiple API endpoints and it would not be a good approach. We have tried that already. Also they would not like to use Google Analytics.

Fabio Goncalves · Feb 8, 2018 go to post

Great! I am going to try that and call a rest api async in order to record that. We are concerned about a high volume of user access and have peformance issues.

Fabio Goncalves · Feb 8, 2018 go to post

Hi Cris, 

Thanks! I am going contact you as suggested by Ben Spead. 

Later on I can post the solution over here.