PingOne Advanced Identity Cloud

Suspend and resume journeys

You can use the action object to suspend an authentication journey and send a message to display to the user. Evaluate the resumeFromSuspend script binding to determine whether to continue the journey.

ActionWrapper suspend(String message)

Suspend the current authentication session and send a message to display to the user.

ActionWrapper suspend(String message, SuspensionLogic logic)

Suspend the current authentication session and send a message to display to the user. This method also accepts a callable function that references the resume URI at the point of suspension.

 

  • Next-generation

  • Legacy

// Use the resumedFromSuspend object to check if the journey has resumed after suspension
// For example, it returns true after sending an email and receiving a response
if (resumedFromSuspend) {
  action.goTo("true");
} else {
  // Send a message to display to the user and the URL to resume the journey
  action.suspend('Check your email for a magic sign-in link.', (resumeUri) => {
    requestOptions = {
      "method": "POST"
      "body": {
        "resumeUri": resumeUri
      }
    }
    // Use internal mail server to send email
    httpClient.send("https://my.email.service/sendEmail", requestOptions));
  }
}

Not supported for Legacy bindings.