go to post Kurro Lopez · Jan 11, 2018 Hi Eduard,I tried to do that before, but all CSP pages was displayed, but WebApi didn't work. The problem has been resolved. Please check the other answer.Thanks for your comment
go to post Kurro Lopez · Jan 11, 2018 Thanks Kyle,You are right, Apache send all request to CSP Gateway, but IIS needs to know who to response the request. The answer is "*"
go to post Kurro Lopez · Jan 11, 2018 I've just done a "rubber duck" with myself... when I've wrote the comment, I've realised that the extensión that I have is "*.*", instead of "*", that is the difference.A WebApi hasn't an extensión, therefore it is handler by the CSPms library.I've just changed it and it worksThanks for all
go to post Kurro Lopez · Jan 11, 2018 Hi Alexander,I have the extension *.* to CSPms, instead of each extension (CSP, ZEN, CLS....) and the "Invoke handler only if request is mapped" is unchecked, but still doesn't work
go to post Kurro Lopez · Jan 10, 2018 If you really need a double key, use a persistence class instead.You can define your fields and the key you want. You only need one instance of the object and find using the index.The Looup table was designed to be used as a dictionary, do not try to use an object for another purpose.Best regards
go to post Kurro Lopez · Sep 29, 2017 Thanks John.I've checked your answer as correct because this is the best approach to do it.In Studio we can add everything and I don't forget any file.Best regards,Francisco López
go to post Kurro Lopez · Sep 29, 2017 Hi again.... I've found a solution for this issue and it works. Create the deploy file from "Export from production". In this example, the file name is "Export-Common_Production.xml"Export the INC file from Systems - Routines. In this example, the file name is Export.xmlOpen the deploy file (Export-Common_Production.xml) . Look at the begin of the code <?xml version="1.0" encoding="UTF-8"?> <Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2016.2.1 (Build 803U)" ts="2017-09-29 08:24:26"> <Class name="Common.Produccion"> <Super>Ens.Production</Super> <TimeChanged>64397,40010.817022</TimeChanged> <TimeCreated>64329,41160.632132</TimeCreated> <XData name="ProductionDefinition"> <Data><![CDATA[ <Production Name="Common.Produccion" TestingEnabled="true" LogGeneralTraceEvents="false"> <Description></Description> <ActorPoolSize>2</ActorPoolSize> </Production> ]]></Data> </XData> </Class> Copy the content of Export.xml, only the <Routine> node <?xml version="1.0" encoding="UTF-8"?> <Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2016.2.1 (Build 803U)" ts="2017-09-29 12:11:54"> <Routine name="Common.Common" type="INC" timestamp="64548,48449.743452"><![CDATA[ #include %occErrors #include %ZEN.Utils #define GetData(%x) $get(%request.Data(%x,1)) #define Header(%x) %request.GetCgiEnv("HTTP_"_%x) #define Lower(%text) $ZCONVERT(%text,"l") ]]></Routine> </Export> Paste it at the begin of Deploy file <?xml version="1.0" encoding="UTF-8"?> <Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2016.2.1 (Build 803U)" ts="2017-09-29 08:24:26"> <Routine name="Common.Common" type="INC" timestamp="64548,48449.743452"><![CDATA[ #include %occErrors #include %ZEN.Utils /// GetData: Recoge el valor de un parámetro de una petición Request #define GetData(%x) $get(%request.Data(%x,1)) /// Header: REcupera el contenido de la cabecera #define Header(%x) %request.GetCgiEnv("HTTP_"_%x) /// Lower: Convierte en minúscula el texto indicado #define Lower(%text) $ZCONVERT(%text,"l") ]]></Routine> <Class name="Common.Produccion"> <Super>Ens.Production</Super> <TimeChanged>64397,40010.817022</TimeChanged> <TimeCreated>64329,41160.632132</TimeCreated> <XData name="ProductionDefinition"> <Data><![CDATA[ <Production Name="Common.Produccion" TestingEnabled="true" LogGeneralTraceEvents="false"> <Description></Description> <ActorPoolSize>2</ActorPoolSize> </Production> ]]></Data> </XData> </Class> Search down the node <Project> and include the INC file <Project name="EnsExportProduction_2017-09-04 08-20-12_724+2" LastModified="2017-09-29 08:24:26.599088"> <ProjectDescription><![CDATA[Studio Project generated from Ensemble Production 'Common.Produccion' at 2017-09-04 06:20:12.724 UTC]]></ProjectDescription> <Items> <ProjectItem name="Common.Common" type="INC"></ProjectItem> <ProjectItem name="Common.Utils.Encriptar" type="CLS"></ProjectItem> <ProjectItem name="Common.Utils.JSON" type="CLS"></ProjectItem> <ProjectItem name="Common.Utils.Utilidades" type="CLS"></ProjectItem> <ProjectItem name="EnsExportNotes.EnsExportProduction_2017-09-04 08-20-12_724+2.PTD" type="PTD"></ProjectItem> </Items> </Project> Search down the node <Document> and add the first file the INC and reorder the numbers of item <Document name="EnsExportNotes.EnsExportProduction_2017-09-04 08-20-12_724+2.PTD"><ProjectTextDocument name="EnsExportNotes.EnsExportProduction_2017-09-04 08-20-12_724+2" description="Export Notes for export EnsExportProduction_2017-09-04 08-20-12_724+2"> <![CDATA[<Deployment> <Creation> <Machine>MYSERVER</Machine> <Instance>HEALTHSHARE</Instance> <Namespace>COMMON</Namespace> <SourceProduction>Common.Produccion</SourceProduction> <Username>_SYSTEM</Username> <UTC>2017-09-29 06:24:26.597</UTC> </Creation> <Notes> </Notes> <Contents> <ExportProject>EnsExportProduction_2017-09-04 08-20-12_724+2</ExportProject> <Item num="1">Common.Common.INC</Item> <Item num="2">Common.Produccion.CLS</Item> <Item num="3">Common.Utils.Encriptar.CLS</Item> <Item num="4">Common.Utils.JSON.CLS</Item> <Item num="5">Common.Utils.Utilidades.CLS</Item> </Contents> <ProductionClassInExport>Common.Produccion</ProductionClassInExport> </Deployment> ]]></ProjectTextDocument> </Document> Now you can deploy the production with the INC file without problem There is a problem with this process, if you need to re-export the production, you'll lose the INC file and you need to paste it again I hope this solution will work for someone else. Best regards, Francisco Lopez
go to post Kurro Lopez · Sep 20, 2017 Hi Conor. If you try to convert directly this datetime to a $HOROLOG format, you'll have problems :) Date is a valid format, however the time needs to convert a valid format, so modify the variable to convert a valid datetime format. set myTimeStamp="20160105125915" set myTimeStampValid=$EXTRACT(fecha,1,4)_"-"_$EXTRACT(fecha,5,6)_"-"_$EXTRACT(fecha,7,8)_" "_$EXTRACT(fecha,9,10)_":"_$EXTRACT(fecha,11,12)_":"_$EXTRACT(fecha,13,14) Then you have a datetime in format YYY-mm-dd HH:MM:ss Now, you need to convert this variable to $HOROLOG format set myTimeStampHorolog=$ZDATETIMEH(myTimeStampValid,3,1) now, convert to UTC using your local time, if you know what is the UTC difference, apply directly. Example: I'm in Spain, so is CET (UTC+1), however in summer (CEST) is UTC+2 If you use the method ##class(%SYSTEM.Util).LocalWithZTIMEZONEtoUTC you'll have the UTC as zone time, but your Ensemble doesn't know if it's Summer o Winter time. if is Summer time, you need to reduce an hour your local time set myTimeStampUTC=##class(%SYSTEM.Util).LocalWithZTIMEZONEtoUTC(myTimeStampHorolog) ;; IF SUMMER TIME, REDUCE ONE HOUR set myTimeStampUTC=$ZDATETIMEH($SYSTEM.SQL.DATEADD("hour",-1,myTimeStampUTC),3,1) if you want to compare both datetimes (now, I'm in CEST, so I'm in UTC+2) write "My local time:"_$ZDATETIME(myTimeStampHorolog,3,1) write "UTC time:"_$ZDATETIME(myTimeStampUTC,3,1) The result is: My local timestamp:2016-01-05 12:59:15 UTC timestamp:2016-01-05 10:59:15 Now, you have the same problem, you have a time separated by ":", so only need to revert the conversion set myUTC=$ZDATE(myTimeStampUTC,8)_$REPLACE($ZTIME($PIECE(myTimeStampUTC,",",*),1),":","") and compare: write myTimeStamp write myUTC Check the info about theses methods: $ZDATETIMEH $ZDATETIME $EXTRACT ##class(%SYSTEM.Util).LocalWithZTIMEZONEtoUTC I hope I have solved your problem Best regards, Francisco Lopez P.S. Don't forget check the answer if it's the correct answer. P.P.S. [EDITED] According to Eduard Lebedyuk (see below), you can replace set myTimeStampValid=$EXTRACT(fecha,1,4)_"-"_$EXTRACT(fecha,5,6)_"-"_$EXTRACT(fecha,7,8)_" "_$EXTRACT(fecha,9,10)_":"_$EXTRACT(fecha,11,12)_":"_$EXTRACT(fecha,13,14) to set myTimeStampValid=$SYSTEM.SQL.TOTIMESTAMP(myTimeStamp,"YYYYMMDDHHMISS") Thanks Mr. Lebedyuk
go to post Kurro Lopez · Sep 20, 2017 Thanks for the solution.The problem was that I should to call to a BS, not a BP instead. So I've created a dummy BS to call the BP to do the process. Thanks again for the key
go to post Kurro Lopez · Jun 16, 2017 Hi, Currently, I created an acount using my working email (flopez@salutic.es), then all information, alerts, and everything has been sent using this email.Then I was invited to participate in Global Master, and all my contributions in Developer Community are counted in GM.Now, I want to unlink this email and use my personal one. I've modified the GM and DC email, but the login still as it is, all alerts from GM are sent to the new email.I think that, as I have modified my GM email, my new contributions will not be considered as points in GM, due it is waiting for the email flopez@salutic.es, I am right?That is the aim of my question, is it possible to change the email login to link this one to my current GM account.Best regards and thanks for your attention
go to post Kurro Lopez · Jun 14, 2017 Thanks to both,I don't want to create a new account, cuz I can lose all my entries, and I couldn't link my account to Global Master one.The account to WRC is other one, and I want to save it as it is.Other option?
go to post Kurro Lopez · Apr 26, 2017 Hi,We are using Atelier with TFS and we haven't problems with it.Sometimes, I have to check out the file manually because the synchronize process doesn't check out automatically. Some members of my team do it automatically but I don't. Don't know.If you want to install TFS plugin, I've published a quick tutorial How to install and use TFS in Atelier. Please, have a look Best regards.
go to post Kurro Lopez · Mar 6, 2017 It's easy,As Eduard has exposed, you can pass a JSon as content of your Apicheck that application/json is included into headers collection
go to post Kurro Lopez · Mar 3, 2017 Solved...I'm very sorry for this question, the answer was in my face and I didn't see it.The plus sign is a special character in URL, so it should be replaced with "%2b" to escape the character.I'm ashamed to think that this problem was too simpleI should callhttp://localhost:57772/MyApp/login?login=flopez@salutic.es&password=7d%2brcUBPWF0wtMs4PHiluA==&app=MYAPPBest regards,Francisco
go to post Kurro Lopez · Mar 3, 2017 In addiction to that answer, don't forget to set the Application Role to %All (or other role that you need), or it always returns a "Forbidden" error.Best regards,Francisco
go to post Kurro Lopez · Jan 30, 2017 mmm... I see The name of the variable is under double quote, and I'm calling the variable directly. Let me check in my solution. USER>set obj = ##class(%DynamicObject).%FromJSON("{""A_B"":""HELLO WORLD""}") USER>w obj.A_B W obj.A_B ^ <UNDEFINED> *B USER>w obj."A_B" HELLO WORLD
go to post Kurro Lopez · Jan 30, 2017 Thanks Eduard, my JSon has this underscore as part of the name of variable but is not supported (or it seems). With my workaround it works
go to post Kurro Lopez · Jan 27, 2017 Hi all, I've found the "ghost in the code". The problem was the JSon structure has some fields with "_" as part of the name of the property. When it tries to convert JSon to a class, this kind of name is not good for ensemble. How have I solved? easy... replacing the content and remove all "_" (I'm sure that there is not values with "_") set content = tHttpResponse.Data.Read() $$$TRACE(content) $$$TRACE($LENGTH(content)) set content = $REPLACE(content,"_","") // Remove all _ as part of the field name set objJson = ##class(%DynamicObject).%FromJSON(content) set b64 = objJson.Result.RES.DATA.DATAB64 // Instead of DATA_B64 Take care with this problem if you are developing Api and Cache Best regards