Skip to content

Commit c3a3ad1

Browse files
committed
fleshing out invocation ID
1 parent 4d2a148 commit c3a3ad1

1 file changed

Lines changed: 33 additions & 6 deletions

File tree

docs/invocationid.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,38 @@
11
# Invocation IDs
22

3-
Purpose of IDs:
4-
- Unique location for logs
5-
- Deriving unique file/folder names
3+
Each FaaSr workflow can be tagged with a unique ID. This is useful for two key reasons:
64

7-
## Default - UUID
5+
* It determines where [logs] are stored
6+
* It allows you to derive unique names from your FaaSr functions, e.g. to create unique file names
87

9-
## Custom: User-provided ID
8+
FaaSr allows you to specify a method for your unique invocation ID in one of three choices:
109

11-
## Timestamp
10+
* Randomly-generated UUID (default)
11+
* Timestamp-derived ID
12+
* User-provided ID
13+
14+
The invocation ID can be retrieved in your user functions using the [R API] or [Python API], respectively.
15+
16+
## Default: randomly-generated UUID
17+
18+
This is the default method in the WebUI, and the behavior is as follows:
19+
20+
* A [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) is generated randomly in the _entry action of your workflow_, e.g. `550e8400-e29b-41d4-a716-446655440000`
21+
* The UUID generated in the entry action is automatically _propagated to all actions in your workflow_
22+
23+
## Timestamp-derived ID
24+
25+
This method can be selected in the WebUI under _Workflow Settings_ in the drop-down menu for _InvocationID_. If selected, you need to also determine the _Timestamp format_ to be used to derive the Invocation ID. The behavior is as follows:
26+
27+
* A timestamp string is generated in the _entry action of your workflow_ based on the UTC local time of the invocation of the action
28+
* The format of the timestamp is defined as a special-format string that specifies which fields of the data/time are used. This depends on your particular use case - e.g. for a timestamp that is unique daily you can use `%Y%m%d`; unique hourly: `%Y%m%d%H`; unique per minute: `%Y%m%d%H%M`
29+
* Example: Suppose the entry action is dispatched on October 21, 2025 at 11:03pm (or 23:03). A timestamp format for daily, i.e. `%Y%m%d` generates an invocation ID that looks like `20251021`. A timestamp format for hourly, i.e. `%Y%m%d%H`, generates an invocation ID `2025102123`. A timestamp format for per-minute, i.e. `%Y%m%d%H%M`, generates an invocation ID `202510212303`
30+
31+
## User-provided ID
32+
33+
Finally, in the user-provided ID, the invocation ID is provided by the user in the JSON configuration.
34+
35+
36+
[logs]: logs.md
37+
[R API]: r_api.md
38+
[Python API]: py_api.md

0 commit comments

Comments
 (0)