Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/reference/functions/callstack_callers.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ Output:

**History:** Introduced in CFEngine 3.9

**See also:** `callstack_promisers()`
**See also:** `callstack_promisers()`, `this.calling_bundle`
36 changes: 36 additions & 0 deletions content/reference/special-variables/this.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,42 @@ declared).

This variable contains the current bundle name.

### this.calling_bundle

This variable contains the name of the bundle from which the current bundle was called.

**Example:**

```cf3 {file="example-this_calling_bundle.cf"}
bundle agent main
{
methods:
"two";

reports:
"in bundle $(this.bundle), caller $(with)"
with => ifelse( isvariable( "this.calling_bundle" ), "$(this.calling_bundle)",
"bundlesequence" );
}

bundle agent two
{
reports:
"in bundle $(this.bundle), caller $(with)"
with => ifelse( isvariable( "this.calling_bundle" ), "$(this.calling_bundle)",
"bundlesequence" );
}
```

```output
R: in bundle two, caller default:main
R: in bundle main, caller bundlesequence
```

**History:**

- Added in CFEngine 3.27.0

### this.handle

This variable points to the promise handle of the currently handled
Expand Down