Find

Question
· Aug 30, 2024

Only load part of XML/ SQL Snapshot in visual trace- portal loads too slow

As part of fully decoupling code we send a snapshot from a business service (running a SQL statement). 

sql service                         Processor                                File Out

This is picked up by a processer and puts it into a file .txt. 

Issue is if you open it up via the SQL.snapshot message as this is 46,819 rows it'll take too long to respond to opening up the sql.snapshot in the message viewer when viewing the session if looking from the business service 

Is there any way to not have this xml open up in full in the portal? I.e. have a see more? 

I am aware this could just be in the BP but for me this is the correct integration setup- SQL service to pick up the data- process to do something with it (passed in the correct message type for it) and then sent to a file/ downstream. 

3 Comments
Discussion (3)2
Log in or sign up to continue
Question
· Aug 30, 2024

Changing a Setting value on a schedule?

I can START and STOP a business process via its Schedule setting.

Is it possible to change the value of another Setting in an analogous way?

I can imagine a SettingSchedule that could look like 

action:YYYY-MM-DDThh:mm:ss[,action:YYYY-MM-DDThh:mm:ss]

But rather than just START or STOP, action could be "SET Setting = value", overriding whatever the normal value is.

Is there an existing way of achieving this kind of functionality?

I've got a business process that triggers from a scheduled task, and sends documents to a downstream system according to business requirements. At certain times of the day there will be more documents in the queue than the downstream system can cope with - I'd like to say:

  • between time XXXX and time YYYY never send more than NN documents at a time, even if there are more in the queue
  • at other times send as many as are in the queue.

Then the code in the business process would pick up the (current value at the point of execution, according to the schedule) and send that many documents.

(We are currently planning on achieving this by adding another Property to the scheduled task, and adding that to the trigger message, but wondered whether there was another way of doing it.)

4 Comments
Discussion (4)2
Log in or sign up to continue
Article
· Aug 30, 2024 2m read

Recorrer roles de forma recursiva

Recientemente me encontré en una situación en la que un usuario tenía algunos roles, que le otorgaban roles adicionales, y así sucesivamente.

Como no entendía de dónde venía un permiso en particular, escribí este código que obtiene un conjunto inicial de roles y los recorre recursivamente, teniendo en cuenta cualquier repetición.

/// Recursively unwraps roleset.
/// Accounts for circular dependencies and repeats.
Class Utils.Roles
{

/// roles: comma-separated string of roles
/// showResources: show resources in addition to roles.
/// do ##class(Utils.Roles).Display
ClassMethod Display(roles As %String, showResources As %Boolean = {$$$NO})
{
	new $namespace
	set $namespace = "%SYS"
	set roles = $lfs(roles)
	set i=0
	while i<$ll(roles) {
		do $i(i)
		set role = $lg(roles, i)
		continue:$d(processed(role))=1
		write "Current role: ", role,!
		
		write "Grants roles: "
		set sc = ##class(Security.Roles).Get(role, .p)
		for j=1:1:$l($g(p("GrantedRoles")),",") {
			set grantedrole = $p(p("GrantedRoles"),",", j)
			continue:grantedrole=""
			continue:$lf(roles, grantedrole)
			
			write grantedrole, ", "
			set roles = roles _ $lb(grantedrole)
		}
		
		write:showResources !, "Grants resources: ", p("Resources")
		write !
	}
}

}
 
Spoiler

Code.

Discussion (0)1
Log in or sign up to continue
Article
· Aug 30, 2024 1m read

QuinielaML - Predicciones de la 4ª jornada de la Quiniela

¡Venga con la nueva jornada de la Quiniela, que ya estamos a viernes! Y nuevamente con partidos de 1ª y 2ª División.

Estas son las predicciones para Primera:

Y para Segunda:

Esto nos deja la siguiente predicción:

Pues listo, ¡disfrutad de la jornada!

Discussion (0)1
Log in or sign up to continue
Digest
· Aug 30, 2024

There's still time to participate in the internal Video Demos Contest!

Dear colleague,

We hope you've enjoyed your summer (or winter 😊). 

You may have heard of the InterSystems Video Demos Contest that Scott Gnau announced earlier this month in his letter, which was due to end on September 1.

Many of you reached out, asking for an extension due to the holiday season. We’ve listened to your feedback and are pleased to announce that the deadline for the Video Demos Contest has been extended till September 22, 2024.

This means you still have ample time to create and submit your video for the contest. The Insider Article contains more information including contest details.

If you have any questions, please don't hesitate to ask.

Good luck!