Assign a Case and Set Its Deadline¶
Goal¶
Assign the current case to a responsible group and set a deadline from a case-related workflow task.
What You Will Learn¶
- resolve an assignee without embedding an environment-specific identifier
- assign the current case with an audit comment
- calculate and set a case deadline
Difficulty and Estimated Time¶
- Difficulty: Beginner
- Estimated time: 15 minutes
Assumed Knowledge¶
You should be familiar with cases, channels, related processes, prework scripts, and group identities.
Required Reading¶
Prerequisites¶
- a group named
Case Reviewersin the test domain - a process configured as a related process of a case-enabled channel
- a task marked as a case handler
Steps¶
Add the Assignment Script¶
Open the prework script of the case-handling task and add:
1 2 3 4 5 6 7 8 | |
Use a dedicated group created for the tutorial. Replace the group name only when your domain uses a different configuration; do not replace it with a copied identity identifier.
Run the Related Process¶
- Create a case in the test channel.
- Start the related process from the case.
- Open the case details after the case-handling task starts.
How It Works¶
$Case resolves the case that started the related process. Assign records the new identity and the supplied audit comment. DeadlineAt stores the calculated date on the same case.
Verify the Result¶
Confirm that the case is assigned to Case Reviewers and that its deadline is two days after the task start time. Remove or rename the group and repeat the test to confirm that the script fails before changing the case.
Failure and Edge Cases¶
$Caseis unavailable when the process was not started in a case context.- Identity names must resolve unambiguously in the current domain.
- Calendar and time-zone rules can change the effective deadline.
Security and Portability Notes¶
- Assign only to identities that are allowed to view the channel and case.
- Resolve identities in the current domain instead of storing tenant-specific GUIDs.
- Keep assignment comments free of secrets and unnecessary personal data.