go to post Eduard Lebedyuk · Mar 1, 2018 Hello, everyone!It's my first big webinar in English so I'm starting with the topic I'm familiar with - REST APIs.The main goal of this webinar is to discuss REST APIs and how can we design them so they can evolve and grow without causing too much problems for everyone involved. Versioning, software layers separation, Broker separation - that kind of thing,I would also like discuss some common challenges and how can we bypass them.Then the tooling for the whole development life-cycle (dev-debug-test-document) would be presented.And finally I'll show some REST API examples. Well, mainly UI clients for these APIs.If you have a question about REST that sounds more or less relevant to the topics above - please post it here (or mail directly to me), I'll try to cover it too if possible.
go to post Eduard Lebedyuk · Feb 27, 2018 Modify second query to return 1 row: SELECT TOP 1 .... Check if inserting 1 row works.
go to post Eduard Lebedyuk · Feb 27, 2018 First of all, you're calling class methods, so you don't need a file object. Instead of: s file=##class(%File).%New() d file.CopyFile(File,ArchivePath) d file.Delete(File) It's enough to write: do ##class(%File).CopyFile(File,ArchivePath) do ##class(%File).Delete(File) Other things to consider: You have file and File variables. That makes understanding what's going on more difficult than it should be.Using full command names (set instead of s, do instead of d, etc.) But, %File class has a method specifically for moving, so it's better to call it: set Success = ##class(%File).Rename(File, ArchivePath, .RetCode) write:(Success=$$$NO) "Rename failed with code: " _ RetCode
go to post Eduard Lebedyuk · Feb 26, 2018 AWS has free tier.Also check lowendstock.com there are many deals below $10/year.
go to post Eduard Lebedyuk · Feb 23, 2018 That's not a system macro.Try searching (Edit -> Search in Files) for: '#define Fza' in'*.inc'That should find you a macro definition.Or you can check int code (Ctrl + Shift + V) to see what it compiled into.
go to post Eduard Lebedyuk · Feb 22, 2018 That's probably unrelated problem?Check application error log (SMP > System Operation > System Logs> Application Error Log)?
go to post Eduard Lebedyuk · Feb 22, 2018 See upgrade checklist, action 9. ZN "namespace" DO $system.OBJ.CompileAll("u") Should fix your problem.
go to post Eduard Lebedyuk · Feb 21, 2018 Also can be used in class queries: /// do ##class(class).subclassQueryFunc(baseclass).%Display() Query subclassQuery(base) As %SQLQuery { SELECT c.Name FROM %Dictionary.ClassDefinitionQuery_SubclassOf(:base) }
go to post Eduard Lebedyuk · Feb 21, 2018 What do you want to do? Complete tasks externally and pass them into Ensemble?Check out Ensemble Workflow - REST API for Ensemble workflow and Ensemble Workflow UI - client web application consuming that REST interface. Community article.SOAP interface would be about the same.
go to post Eduard Lebedyuk · Feb 21, 2018 Here's a sample task.tl;dr:Should extend %SYS.Task.DefinitionParameter TaskName = "TASK NAME";OnTask method is called once every time the task is runClass properties become task parameters
go to post Eduard Lebedyuk · Feb 21, 2018 I have encountered the exact same problem but was unable to reproduce it. In my case recompilation helped. Try to recompile SALUTIC.MyUsers.BO.UsersREST. Please contact the WRC if you can reproduce this behavior.
go to post Eduard Lebedyuk · Feb 21, 2018 If you're trying to access data across several namespaces of the same instance you don't need xDBC. Use either mappings or queries with local cache to move data.
go to post Eduard Lebedyuk · Feb 20, 2018 It was an error in the example - Data does not exist.I now fixed my example.
go to post Eduard Lebedyuk · Feb 20, 2018 Well, in this case you definitely don't need to read from stream at all. You can save the stream in the database (or file using %Stream.FileCharacter)) and send it to the client later: set stream = ##class(%Stream.GlobalCharacter).%New() set sc = stream.CopyFromAndSave(%request.Content) set oid = stream.%Oid() kill (oid) set stream = ##class(%Stream.GlobalCharacter).%Open(oid) do stream.OutputToDevice() Streams can be class properties too.
go to post Eduard Lebedyuk · Feb 20, 2018 What do you need to do? Many actions can be either performed with streams or there's a workaround.But ultimately yes, if the stream is beyond max string length (3641144 symbols) you'll need to process it chunk by chunk.
go to post Eduard Lebedyuk · Feb 20, 2018 Can you write Sourcedata.Date into a global? What's its value?