having + past participle (having served)

"Matt Hanley was the deputy director of Operations for CIA, having served in this role for only a few months."Having said that, we still have a lot of work to do.

Used with completed action, often in the beginning of a sentence:
Having said, that...  ||| that= the words, the person previously said.

// We did a great job. Blah blah blah.

My friend wants to run a marathon. I have run a marathon in the past. I have already done it and I have experience in it. So I can say: "Having run a marathon I can give you some tips."

We can use it as a second part of a sentence and is going to follow a comma:
// New York City is known for its busy streets, and having lived there I can confirm that this is true.
// Or: New York City is known for its busy streets. Having lived there I can confirm that this is true.

(Having + Past Participle - Advanced English Grammar)

Clauses

The Basics of Clauses in English

Clauses: the Essential Building-Blocks

The Garden of Phrases

Relative pronouns
Relative pronouns

that, which, whichever, who, whoever, whom, whomever, whose, and of which

whichever - какой бы ни, какой угодно

whoever - кто бы ни

whom- кого, кому, которого

whomever - кто бы то ни было

Conditionals

Linking Words, Connecting Words: Full List and Useful Examples

My Learning: Grammar – 1 (Clauses/Conditionals)