Second option would be faster.
- Log in to post comments
Second option would be faster.
1. Get list of all items in production (via Ens.Director:getProductionItems)
2. Iterate over items local array and for each item:
Structure can be anything you want:
That mainly depends on what do you want to do with this information later.
You can't just concatenate to a %Status:
set ^sghp1($i(ind))=st_"**"_Hospital_"**"_OrganizationInitials_"**"_Organization_"**"_obj.SourceConfigName_"!!!"_obj.AlertText_"!!!"_obj.AlertDestination_"!!!"_obj.AlertTime_"!!!"_obj.SessionId
You need to append a %Status to another %Status:
if $$$ISERR(st) {
set msg = "**"_Hospital_"**"_OrganizationInitials_"**"_Organization_"**"_obj.SourceConfigName_"!!!"_obj.AlertText_"!!!"_obj.AlertDestination_"!!!"_obj.AlertTime_"!!!"_obj.SessionId
set infost = $$$ERROR($$$GeneralError, msg)
set st = $$$ADDSC(st, infost)
}
set ^sghp1($i(ind)) = st
In this snippet first I check if the save was successful, if it was not I build additional error message, then convert it from %String to %Status and concatenate old and new statuses into one.
Via SQL:
SELECT Settings FROM Ens_Config.Item WHERE Settings [ 'ReplyCodeActions'
You can also get it without SQL:
To get production setting use one of:
Set Value = ##class(Ens.Director).GetCurrProductionSettingValue("SettingName", .sc)
Set Value = ##class(Ens.Director).GetProductionSettingValue("Production", "SettingName", .sc)To get setting of production item use:
Set Value = ##class(Ens.Director).GetItemSettingValue("ItemName", Type, "SettingName", sc)Where Type can be Host or Adaptor.
The ItemName argument may contain the following elements:
ProductionName||ConfigName|CommentOrClassname
Notes on ItemName:
Do you want to load data from Caché into Oracle, or from Oracle into Caché?
Go to web applications and set identical "Group By ID" identifiers for web applications that serve file1.CSP and file2.CSP.
Thank you, that works!
Are there any callbacks on save methods defined?
Can you post class, instance of which you are saving?
Ceiling, floor, $NORMALIZE. Examples:
>Write $SYSTEM.SQL.CEILING(.1)
1
>Write $SYSTEM.SQL.CEILING(1.2)
2
>Write $SYSTEM.SQL.CEILING(1.7)
2
>Write $SYSTEM.SQL.FLOOR(.1)
0
>Write $SYSTEM.SQL.FLOOR(1.2)
1
>Write $SYSTEM.SQL.FLOOR(1.7)
1
>Write $NORMALIZE(.1, 0)
0
>Write $NORMALIZE(1.2, 0)
1
>Write $NORMALIZE(1.7, 0)
2Docs on Ens.BusinessOperation class, QueueCountAlert property state:
Number of messages on this item's queue needed to trigger an Alert message to be sent. Note that no further alerts will be sent unless the number of messages on the queue drops below 80% of this number and then rises again to this number. Note that this alert will be sent even if AlertOnError is False. Zero means no alerts of this type will be sent.
Try to call it like this:
do ..ReportHttpStatusCode(..#HTTP400BADREQUEST, sc)
Where sc is an optional %Status. Parameters are defined in %CSP.REST class.
Can you post code sample?
Going by the error message, have you tried providing googleapis.com certificate?
There is Cache web terminal project. It emalates terminal connection to Caché from a web page.
Call:
Write ##class(%EnsembleMgr).EnableNamespace(Namespace, 1)
Do you mean your own users or Caché users?
This line causes an error:
Write tMessage.Name,!
Your class does not have Name property, so it causes an error.
The following method works :
/// Do ##class(Testing.Messages.Session).test()
ClassMethod test()
{
Set messagedata = "<?xml version=""1.0"" encoding=""UTF-8""?><session><sessionId>124364</sessionId><cabinet>demo</cabinet><eventType>IN</eventType><eventTime>20161006160154</eventTime><login>test</login><loginFirstName>test</loginFirstName><loginLastName>test</loginLastName></session>"
Set reader = ##class(%XML.Reader).%New()
Set status = reader.OpenString(messagedata)
Do reader.Rewind()
If $$$ISERR(status) {do $System.Status.DisplayError(status)}
// Associate a class name with the XML element name
Do reader.CorrelateRoot("Testing.Messages.Session")
// Read objects from xml data
While (reader.Next(.tMessage,.status)) {
Do:$$$ISERR(status) $System.Status.DisplayError(status)
Write tMessage.sessionId,!
}
}Terminal:
USER >do ##class(Testing.Messages.Session).test() 124364
The correct way to accomplish that is to use source control and CI:
Can you post a sample?
Maybe rename Global Summit 2016 group to Global Summit?
It would, because cache for that chunk would be invalidated, and cache for other chunks would still be valid. But OP wants to invalidate cache for a whole cube, and for that inserting one fact is not enough.
It would only invalidate one chunk (most probably first, but ultimately it depends on id) of cube data, not all of them.
How are the timestamps stored in globals?
Disclaimer. I am not familiar with EDI.
Some solutions would be:
Then you need a dtl to transform incoming message into your new classes. If there's a lot of them maybe it would be better to write one generic transformer or write a transformer generator based on class (which would generate transformation method based on class properties).
After that you can transform your class object into json via several ways:
If you have classes (persistent or not) producing JSON is much easier.
The caveat with relationships is that all of the many objects are loaded or none are. That may present a performance problem if you have a one-many relationship with thousands of rows on the many side.
Generally yes, but here's some thoughts:
Property Providers as List of ProviderList(SQLProjection = "table/column", STORAGEDEFAULT = "array");The CALLIN^%ZSTART entry point gets executed when an external program begins or completes a callin. You can add logging there to see if something initiates callin.