Passing SessionId and PageId in SFC

I am trying to use the system.perspective.navigate () in an action block of an SFC to navigate through views, it returns an error "No perspective session attached to this thread".
Is it possible to read the sessionId and pageId in SFC? Is there an another way to do this?

The SFC are running on the gateway and have no link with perspective session

You can either start the SFC from the perspective session, passing the sessionid as an arguments, or from the SFC uses messages to interact with Perspective session (system.util.sendMessage -> session message handler -> system.perspective.sendMessage -> component message handler)

Edit: You can still uses getSessionInfo to get a list of session and scan them to find the session you want, but interacting with the session will most likely still need to uses sendMessage