Post an Activity to a Case Timeline¶
Goal¶
Add a concise workflow-generated entry to the current case timeline.
What You Will Learn¶
- address the current case activity stream
- publish an activity from postwork
- verify activity visibility without exposing sensitive workflow data
Difficulty and Estimated Time¶
- Difficulty: Beginner
- Estimated time: 15 minutes
Assumed Knowledge¶
You should be familiar with case-related processes and postwork scripts.
Required Reading¶
Prerequisites¶
- a process configured as a related process of a case-enabled channel
- a task marked as a case handler
- activity stream enabled for the process and channel
Steps¶
Open the postwork script of the case-handling task and add:
1 2 3 4 5 | |
Start the related process from a test case and complete the task containing the postwork script.
How It Works¶
For objectType: 'case', the runtime resolves the correct stream channel from the case. The call returns the identifier of the new activity entry. The example uses fixed, anonymous text so the timeline records the event without copying form contents into a broadly visible surface.
Verify the Result¶
Open the case activity timeline and confirm that exactly one new entry appears after the task completes. Retry the task path only if the process is designed to prevent duplicate activity entries.
Failure and Edge Cases¶
- The call fails when
objectIdis not a valid case GUID. - Posting from a process without case context can target the wrong object if a separate identifier is supplied.
- Retried postwork can create duplicate timeline entries.
Security and Portability Notes¶
- Do not publish secrets, full form payloads, or unnecessary personal data.
- Use
$Case.Idinstead of a copied case identifier. - Add explicit activity targets when the entry should not be visible to the default audience.