When calling out to web services there are several settings of the Business Operation that play together in controlling what will happen when a response is not returned in the desired time.
One of the topics that comes up often when managing Ensemble productions is disk space:
The database (the CACHE.DAT file) grows in a rate that was unexpected; or the Journal files build up at a fast pace; or the database grows continuously though the system has a scheduled purge of the Ensemble runtime data.
It would have been better if these kind of phenomena would have been observed and accounted for yet at the development and testing stage rather than on a live system.
For this purpose I created a basic framework that could aid in this task.
Question:
How can I get a value of a setting of a Production item programmatically?
Answer:
You can use one of the API methods of the Ens.Director class, for example:
Ens.Director:GetItemSettingValue()
For example –
In the Production Demo.Workflow.Production the item (Business Operation) 'Demo-Development' has an 'Auto Create Role' setting:
Clicking on the Settings Defaults button you can see this is a 'Host' setting:
And you can access the value using this call for example:
ENSDEMO>write ##class(Ens.Director).GetItemSettingValue("Demo-Development","Host","AutoCreateRole",.status)
1Question
I am configuring IIS to work with the CSP Gateway but I'm running into this error:
"The Module DLL 'C:\Inetpub\CSPGateway\CSPms.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a x86 processor architecture."
Answer
Question:
How can I create, change etc. Security entities (like Users and Roles) programmatically?
Answer:
You can use the Security package classes in the %SYS namespace. For example Security.Roles or Security.Users.
Of course in order to perform these actions the user will require the needed authorization.
Here's a small example using Security.Roles:
Question:
How do I get a list of files residing in a certain folder/directory, according to some wildcard/filter.
For example all '*.txt' files in 'C:\Temp'.
Answer:
In CACHE –
You can use the %Library.File's FileSet class query.
Here's some sample code using it (also attached):