#self.id is"x:206"

1 messages · Page 1 of 1 (latest)

chrome cypress
#

When I am in the scope of an action and try to reference the actor's ID I get some unreadable ID. My machine has an id set in it's config. Is there somewhere else I can reference the ID specified in the config when in the scope of an action?

createMachine({
  systemId: 'my-system-machine',
  id: 'my-machine',
  entry: ({self}) => console.log('self id', self.id) // x:1, not 'my-machine'
})

getting the systemId would be acceptable also.

#

Maybe self.src.config.id? But will it always be present?

topaz gale
#

That self.id refers to the session ID