Ensemble settings can be specified for a namespace. So you specify common setting values (or defaults) in production class, and in a SMP you define the instance-specific settings.
- Log in to post comments
Ensemble settings can be specified for a namespace. So you specify common setting values (or defaults) in production class, and in a SMP you define the instance-specific settings.
The problem I see here is, if only one of the data object's properties has changed, how do we know which? Or do we simply overwrite all properties?
If you use old json classes, you can send only changed properties, for example this json payload would be converted into Sample.Person object with id=1 and all properties taken from disk except for Name property, which would be set to Bob:
{ _class: "Sample.Person", _id: 1, Name: "Bob" }With new json you can get dynamic object from json with only modified properties and change persistent object by iterating over defined properties of a modified object.
I usually write Abstract REST class for handling all REST technical checks and conversions, and inherit all the other REST brokers from it, so they only contain logic related to calling business logic and outputting the results.
Request -> Abstract REST -> REST -> Business Logic -> Data
For example check this abstract broker for json->obj conversion example.
IF we use cookies, they will be stored in the Session Cookie Path.
Cookie has a property named path. Whed browser determines, does the cookie apply to a current page, it checks if the cookie path is less or equal to current URL.
I'm thinking that this login cookie would be used somehow if the Login Cookie is selected? Or not used?
It would be used, if checked.
what does happen if the Login Cookie is selected in the web application?
What could we store in a cookie? Can we possibly find out if a second tab has been opened by using a cookie?
You can store text values in cookie. I suggest you read wiki article on them.
Yes, I use it for web development, when I frequently need to login as different users.
As every BP is also a SQL table, you can select active processes which are older than 1 day with this query:
SELECT ID, %SessionId, %SuperSession, %TimeCreated, DATEDIFF('day',%TimeCreated, CURRENT_TIMESTAMP) AS DaysOld
FROM <business_process_table>
WHERE DATEDIFF('day', %TimeCreated, CURRENT_TIMESTAMP) > 1
AND %TimeCompleted IS NULLAs BO messages also get logged, you can check Ens.MessageHeader table for message processing time.
How did you get this query?
You need to remove ApplicationID from the query, as that field does not exist. Maybe it was an ID field instead and got changed into ApplicationID somehow?
If that base class has a property that is another class, do I have to add the DSTIME parameters to that secondary class?
No. DSTIME needs to be defined only for a base class of a cube (fact table class).
It works like this:
You can only read into simple local variables, so it should be like:
set Name=##class(Example.Team1).%New()
read "enter your name :", NameStr
set Name.EmpName = NameStrThere are also utility prompt methods, see %Library.Prompt class. For example GetString method supports object properties:
set Name=##class(Example.Team1).%New()
do ##class(%Library.Prompt).GetString("enter your name", Name.EmpName)Here are some thoughts:
I would have done it like this:
Modification of system classes is not a very good idea:
That being said, the best solution in my opinion is to setup your critical/production systems in such a way, that developers do not have direct write access to them. Each of the developers have their own environment where they can do whatever and then commit it to source control system. Continuous integration solution (or one developer or a script) then uploads the code (after it passes the tests) to the production server. There are several source control/continuous integration systems available for Caché.
It is a good idea that a change can only be done via source control commit. All other changes simply should not exist.
You should use any (choose the one most relevant to your requirements) of the new stream objects. See subclasses of %Stream.Object.
Looks nice, but does not resolve short class references to the library package (%String for example) and current package.
There is a beforeunload HTTP event which is fired when the window, the document and its resources are about to be unloaded. Handle this event in your js code and from there you can send an HTTP request to a server (I usually use GET /webapp/logout), which would do something like this:
ClassMethod logout() As %Status
{
#dim %session As %CSP.Session
set st = %session.Logout(1)
set %session.EndSession = 1
return st
}Here's my settings:

The application also has a %DB_CACHESYS role on a second tab.
Installer xml and a bat file to load it into Cache and execute.
Can you please elaborate upon what do you want to achieve?
Index NewIndex1 On PropertyD(ELEMENTS);
I'd also love to see the web application's properties programmatically, if possible (such as the physical files path).
Use Security.Application class directly, or preferably via %Installer manifest.
but I honestly don't know why it's choosing that web application over the default of /csp/default-namespace
Uncompile and compile ZEN classes after setting default web application. Or you can try to set HOMEPAGE parameter in the application class.
My question is, if we go to using Group By ID (which is currently null) in the web application, will this fix the sharing of %session Data? (This is why I have to make sure I'm editing the correct web application!)
If the user opens one web application in two tabs, they would be sharing a session (and namespace). Group By ID would only help if you have N different applications and would specify N different values for Group By ID property. In that case, they should use N different sessions.
Finally, we have a web application for each namespace; will we need the Group By ID for each application defined for each namespace, and should it be the same ID?
Depends, if you want to share %session or not.
Add init parameters:
set htmlSnippet = "<h1>Hello</h1>"
set regex = ##class(%Regex.Matcher).%New("<[^>]*>", htmlSnippet)
set plainText = regex.ReplaceAll(" ")
write !,plainTextBoth of these tools are for GitHub and Cache (not Git and Cache, but with easy customization required to support some other Git server API over HTTP).
Cache Updater is a simple Cache task. You specify GitHub information (repository and user/pass if it's a private repo) and namespace. Then you set a schedule and that's it. Every time the tasks runs it downloads (and compiles) code from GitHub and into Cache Namespace.
CacheGitHubCI is a full fledged CI system. You may specify pre and post compile actions, unit tests, etc. The results and timings of each build and action are saved and there are DeepSee dashboards available. GitHub webhooks are supported, which allows running builds immediately after there is a new commit in a repository.
Which one you choose depends on your requirements. Cache Updater is very easy to set up, CacheGitHubCI offers more features.
Both of them are built atop GitHub COS API, which provides COS wrappers for GitHub API.
Then you need to specify MODE attribute as LOGICAL for that cspbind property. Documentation.
Sure, execute this in a terminal to open a new terminal for an instance named cache:
do $zf(-2,"cterm.exe /console=cn_ap:cache")
Okay, and how do you access it?
Please post the property definition.
by default she send the value as DISPLAYLIST
How do you get property value?
Here's the version for windows and most linux distros:
ClassMethod RunPage(Url As %String = "http://intersystems.com")
{
#Include %occOptions
Set Browser = $Select($$$isWINDOWS:"start", $$$isUNIX:"x-www-browser", 1:"x-www-browser")
Set Command = Browser _ " " _ Url
Do $ZF(-1, Command)
}