Not directly. You receive the whole response and can process it line by line, terminating wherever you wish.
I'd recommend using WebSockets if possible.
- Log in to post comments
Not directly. You receive the whole response and can process it line by line, terminating wherever you wish.
I'd recommend using WebSockets if possible.
Default namespace has a priority over script namespace. Remove user's default namespace.
Added as an answer.
Default namespace has a priority over script namespace. Remove user's default namespace.
It shouldn't compile at all.
OP please post
w $zv
You need to press "View other code" button (or Ctrl+Shift+V) and post zMypropertyGetSwizzled routine.
Please post this line of code (Open myClass -> See other code -> zMypropertyGetSwizzled routine, third line) :
zMypropertyGetSwizzled+3^myClass.2
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.
Kill stream
Modify second query to return 1 row:
SELECT TOP 1 ....
Check if inserting 1 row works.
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:
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
For a virtual private server.
AWS has free tier.
Also check lowendstock.com there are many deals below $10/year.
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.
That's probably unrelated problem?
Check application error log (SMP > System Operation > System Logs> Application Error Log)?
See upgrade checklist, action 9.
ZN "namespace"
DO $system.OBJ.CompileAll("u")Should fix your problem.
Here's an explanation of TZ = TimeZone.
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) }
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.
Here's a sample task.
tl;dr:
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.
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.
It was an error in the example - Data does not exist.
I now fixed my example.
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.
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.
Can you write
Sourcedata.Date
into a global? What's its value?
How did you determine that problem happens directly at allocation (setting the property)?
Try:
%request.Content.Data.Read($$$MaxStringLength)
If you have json you can cast it into object without reading the stream in user code:
Set obj = {}.%FromJSON(%request.Content.Data)Same for XML (you can get it from Stream or even from url).
catch-scope is not seems to be reached
Have you enabled logging?
Error occurs on saving incorrect data and not on setting the data. Saving also does not throw an exception, only returns an error status.
Also you need to quit something:
#dim sc As %Status = $$$OK
try
{
set myClass= ##class(SomeClass).%New()
myClass.Date = Sourcedata.Date //Sourcedata send us wrong format to that datefield.
set sc = myClass.%Save() // Error occurs on save.
} catch ex {
set sc = ex.AsStatus()
set errMsg = "Error in this method " _ $System.Status.GetOneStatusText(sc)
$$$LOGERROR(errMsg)
}
quit scOn a side note, you're using 3 different naming conventions for variables in your snippet:
It would probably be better to decide on one notation.