Table of Contents
DCR Agent effects
DCR Agent implements the following Dynamic DCR Effects. For historical reasons,
they reside in the namespace DCR.Flow.
DCR.Flow.Effects.AssignRoleToUser
This effect allows assigning a role of the currently executing process to a DCR.Flow user
in the current tenant.
| Parameter | Description | Comment |
|---|---|---|
assignUser |
The user to assign | The user must be in the current tenant. The user can be specified either by email or by GUID id |
toRole |
The role to assign the user to | The role must be a role of the graph |
The effect executes as an "after" effect. The effect invokes the "ok" continuation if the assignment
was succesful; or the "fail" continuation with an appropriate error message if not. The
following errors are reported:
| Message | Code | Explanation |
|---|---|---|
| Unknown user '...' | 404 | The assignUser parameter does not correspond to the email or GUID id of a DCR.Flow user in the current tenant |
| Unknown role '...' | 404 | The toRole parameter does not correspond to a role of the current model. |
Security Considerations. The effect can assign users only to roles in the current case. However, the effect does not otherwise authorization. In particular, the effect will execute
even if the current user does not have rights to independently assign the requested user to the requested role.
DCR.Flow.Effects.Toast
This effect shows a toast notification to the user.
| Parameter | Description | Comment |
|---|---|---|
message |
Body of the toast message | Required |
title |
Title of the toast message | Required |
type |
Toast message level | Optional. Can be info, success, warning, or error. Defaults to info. |
The effect executes after the activity completes. It always invokes the "ok" continuation.
DCR.Flow.Effect.ArchiveCase
This effect toggles the archive state of a case.
| Parameter | Description | Comment |
|---|---|---|
CaseId |
Target Case ID | Optional. If ommited, will default to the case the effect is attached to |
UserId |
The ID of the user who is archiving the case | Required |
The effect executes after the activity. The effect either invokes the "ok" continuation or the "fail" continuation if the case IDs are invalid or not found.
| Message | Code | Explanation |
|---|---|---|
| Malformed case id '...' | 404 | The CaseId parameter was not a valid case ID |
| Case ... not found | 404 | The specified case IDs do not exist |
| User was not provided | 400 | The UserID was not provided |
| "Unknown user ... | 404 | The specified User do not exist |
⚠️ Security Warning: Allowing users to execute this effect directly can interfere with other cases if used maliciously. This effect should only be used in controlled contexts where proper permissions are enforced.
DCR.Flow.LoadDataFromCase
This effect loads data from one case into another.
| Parameter | Description | Comment |
|---|---|---|
source |
Source Case ID | Required |
CaseId |
Target Case ID | Required. The case into which data is loaded. |
The effect executes before the activity. The effect either invokes the "ok" continuation with a list of values or the "fail" continuation if the case IDs are invalid or not found.
| Message | Code | Explanation |
|---|---|---|
| Invalid 'source' case id '...' | 404 | The source parameter was not a valid case ID |
| Case ... or ... not found | 404 | One or both of the specified case IDs do not exist |
⚠️ Security Warning: Allowing users to execute this effect directly can expose potentially sensitive data across cases. This effect should only be used in controlled contexts where proper permissions are enforced.
DCR.Flow.LoadFileUrl
This effect constructs a file URL for a specific activity in a case.
| Parameter | Description | Comment |
|---|---|---|
CaseId |
Case ID | Required |
Target |
File ID | Required. The activity ID of the file |
The effect executes before the activity. It invokes the "ok" continuation with a string value representing the constructed file URL.
⚠️ Security Warning: This effect may generate URLs granting access to potentially sensitive files. Ensure it is only available to trusted actors with appropriate access rights.
DCR.Flow.Effect.GetRoleUser
This effect retrieves user information for a specific role in the current case.
| Parameter | Description | Comment |
|---|---|---|
Role |
The role to resolve | Required. Must be a role defined in the current model |
The effect executes before the activity. It invokes the "ok" continuation with a FEEL context of type { id: string, email: string, name: string } containing the resolved user's information, or the "fail" continuation with an error if the role or user cannot be found.
The effect returns the following user fields as a FEEL context:
| Field | Description |
|---|---|
id |
The user's GUID identifier |
email |
The user's email address |
name |
The user's full name |
| Message | Code | Explanation |
|---|---|---|
| Role was not provided | 400 | The Role parameter was not supplied |
| Unknown role '...' | 404 | The specified role does not exist in the current model |
| No user assigned to role '...' | 404 | The role exists but no user has been assigned to it |
