David Reche · Dec 3, 2015 go to post

Stefan, the link gives me "Sorry, the page you were looking for in this blog does not exist"

David Reche · Jan 24, 2016 go to post

Thanks Timur, I want to use Atelier, but in that case the source classes are not XML projected. There is any "indication" about the Repository format.

In other hand, yes, I know how to create and publish the Repository, but my doubt is about how to fork it on https://github.com/intersystems, I guess you re-create the repository there, true?

Thanks for the clarification

David Reche · Feb 17, 2016 go to post

Stefan. I used a registered class with typed properties and doesn't works frown

I made this test class:

Class test.DummyClass Extends %RegisteredObject
{

Property notanumber As %String;

Property aboolean As %Boolean;

Method outout2JSON()
{
    set tProxyRequest = ##class(%ZEN.proxyObject).%New()
    set tProxyRequest.notanumber = ..notanumber
    set tProxyRequest.aboolean = ..aboolean
    
    set tBody = ##class(%GlobalCharacterStream).%New()
    do ##class(Ens.Util.JSON).ObjectToJSONStream(tProxyRequest,.tBody,"aelotwu")
    w tBody.Read()
}

ClassMethod Test()
{
    set dummy = ##class(test.DummyClass).%New()
    set dummy.notanumber = "28001"
    set dummy.aboolean = 1
    do dummy.outout2JSON()
}

}

And this is the result sad:

USER>do ##class(test.DummyClass).Test()
{
        "aboolean":1,
        "notanumber":28001
}
USER>w $zv
Cache for Windows (x86-64) 2015.2.1 (Build 705U) Mon Aug 31 2015 16:45:59 EDT

 

What's wrong?

Thanks

David Reche · Feb 17, 2016 go to post

PERFECT !!

I see now my mistake smiley

I fixed the code like this:

Class test.DummyClass Extends %RegisteredObject
{
Property notanumber As %String;
Property aboolean As %Boolean;
Method outout2JSON()
{
    set tBody = ##class(%GlobalCharacterStream).%New()
    do ##class(Ens.Util.JSON).ObjectToJSONStream(##this,.tBody,"aelotw")
    w tBody.Read()
}
ClassMethod Test()
{
    set dummy = ##class(test.DummyClass).%New()
    set dummy.notanumber = "28001"
    set dummy.aboolean = 1
    do dummy.outout2JSON()
}
}
 

And now:

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

David Reche · Feb 17, 2016 go to post

But ... another problem...

What if a need to send a JSON object with properties with underscore characters like "not_a_number"?

Is because that I used %ZEN.proxyObject...

David Reche · May 4, 2016 go to post

ERROR <Ens>ErrParsingExpression: Error al analizar la expresión 'Document.myList.GetAt(1)="AA"': ERROR <Ens>ErrInvalidToken: Token no válido en el desplazamiento 22
  > ERROR #5490: Error $ZE='HCIS.Rules.Test:evaluateRuleDefinition' al ejecutar el generador del método '%2'.
    > ERROR #5030: Se produjo un error mientras se compilaba la clase HCIS.Rules.Test

David Reche · May 4, 2016 go to post

Yes.. sad sorry was a typing error... I used GetAt:

<when condition="Document.myList.GetAt(1)=&quot;AA&quot;">

Moreover assume here that we use %ListOfDataTypes... the problem is the same using any type of List

Class Test.TestMessage Extends Ens.Request
{
Property myList As list Of %String;
}

Thanks !!

David Reche · May 4, 2016 go to post

Thanks Dimitry!! 

That was my alternative but I think the parsing error should not happen. 

David Reche · Jan 16, 2017 go to post

I understand and am clear about the so "wide" of my question :-)

I wonder if there is something not so complex or something "done" to send directly to a web page the results of a WRITE command. This is something common in Ensemble when creating a namespace  or DeepSee Portal when compile or Build a Cube.

Maybe there is a Zen component or sample CSP/Javascript that do that, etc.

Regards

David Reche · Mar 17, 2017 go to post

... Also, with the second approach to use SearchTables at BS is not going to be possible...

David Reche · Jun 25, 2017 go to post

As Atelier 1.0 is based on Eclipse Neon (4.6) and Atelier 1.1 is based on Oxygen (4.7), can we upgrade from Atelier 1.0 to Atelier 1.1? 

I'm a Mac user. Can we get at the same time the released Atelier 1.0 and Atelier Beta? 

Is it a good approach to install Oxygen and the Atelier plugin or  there is a standalone installation for Atelier 1.1?

David Reche · Jul 24, 2017 go to post

Did you install as root user or sudoing?

Also I prefer to create a specific user/group to own the instance not use root/Admin. This sound as a privileges problem for me.

Can you force the stop, remove the instance an install again?

David Reche · Jul 24, 2017 go to post

The installation should be done using root or sudoing. Moreover in order to use a specific user/group to owner the instance, I normally create first the user and add it to Wheel, Admin and any group you want, and after:

[root@xxx]# ./cinstall


Your system type is 'Red Hat Enterprise Linux 6 (x64)'.


Enter instance name <ENSEMBLE>: 

Enter a destination directory for the new instance.

Directory: /engine/ensemble

Directory '/engine/ensemble' does not exist.

Do you want to create it <Yes>? 


Select installation type.

    1) Development - Install Ensemble server and all language bindings

    2) Server only - Install Ensemble server

    3) Custom

Setup type <1>? 3


Disk blocks required  = 2792344

Disk blocks available = 15482688


How restrictive do you want the initial Security settings to be?

"Minimal" is the least restrictive, "Locked Down" is the most secure.

    1) Minimal

    2) Normal

    3) Locked Down

Initial Security settings <1>? 2


What user should be the owner of this instance? ensemble

A Cache account will also be created for user ensemble.


Install will create the following Ensemble accounts for you: 

_SYSTEM, Admin, SuperUser, CSPSystem and ensemble. 

Please enter the common password for these accounts: ensemble

Re-enter the password to confirm it: ensemble


What group should be allowed to start and stop

  this instance? ensemble


Do you want to configure additional security options <No>? y


What is the effective group for Ensemble processes <cacheusr>? ensemble


What is the effective user for the Cache SuperServer

  and its jobs <cacheusr>? ensemble

Hope helps

David Reche · Jan 17, 2018 go to post

It can be change from preferences >> atelier >> colors but there are too much colors  to customize

David Reche · Apr 25, 2018 go to post

Thank you Pili !!

Yes, we only use DNI (our national identifier) in Spain but your method still being useful for a lot of DC users... I hope more and more :-D

David Reche · May 16, 2018 go to post

Laura Blázquez you can do that with JSON because JSON is schema less but XML objects need a schema in a explicit or implicit way you need to define how the object is represented by the XML notation and viceversa.

David Reche · Jul 17, 2018 go to post

Yeah... that is not funny but is true. You have to add the "files" and not the "packages" in order to get the files inside the XML project file