Good day, colleagues.

 

IProcessExecutor processExecutor = _userConnection.ProcessEngine.ProcessExecutor;
return processExecutor.Execute("VERY_IMPORTANT_PROCESS", valuesDictionary);

 

In context of my question, this simple script have multiple calling from different users (sessions) in one period of time. So i need to use Supervisor UserConnection to clarify "VERY_IMPORTANT_PROCESS" logging. Is it possible? Any workarounds?

 

 

 

Like 0

Like

4 comments
Best reply

Hello,

 

Something similar was implemented in the RunSendEmailToCaseGroupV2 business process:

UserConnection userConnection = UserConnection;
if (userConnection.CurrentUser.ConnectionType == UserType.SSP) {
	userConnection = userConnection.AppConnection.SystemUserConnection;
}
...

Here the system checks if the current user is an external user and if so - replaces the userConnection with systemUserConnection (which is a Supervisor user).

 

You can try the same approach in your code to make sure the business process is called under the Supervisor user.

Hello,

 

Something similar was implemented in the RunSendEmailToCaseGroupV2 business process:

UserConnection userConnection = UserConnection;
if (userConnection.CurrentUser.ConnectionType == UserType.SSP) {
	userConnection = userConnection.AppConnection.SystemUserConnection;
}
...

Here the system checks if the current user is an external user and if so - replaces the userConnection with systemUserConnection (which is a Supervisor user).

 

You can try the same approach in your code to make sure the business process is called under the Supervisor user.

Oleg Drobina,

Thx for anser.

So, when i use SystemUserConnection from NOT an admin user session i get all CRUD operaions without security?

Because i see "current user" in process log.

Alexey,

 

Yes, this should be so. If it's not sufficient, then the whole approach with the desired functionality should be changed.

Thx

Show all comments