Expose a Form to an external Link

Hi Guys I’d like to receive some tips for this topic, so the scenario is:
I’ve created a Workflow composed by an Input form where selecting an Identity you are able to see some infos and then by proceeding through it will trigger some action based on the choice of the user.
My question is, is it possible to create a referral Link for this form in order to share it with someone else and being able to redirect them directly to this form?
We have SSO implemented so if the user would try to access it it should automatically authroized by SSO and the capabilities for this quicklink allow everyone to see it.
I know that probably is possible doing it by implementing this form though a plugin but I would prefer to keep it sealed as internal Object.

External work item links look like this: $iiqServerRoot/workitem/workItem.jsf?id=$workItemId

Is that what you need? Or do you need something fancier?

I believe what this person is wanting to do is to have a URL (in a WIKI page or onboarding document for example) that a user can click on and will automatically launch a custom workflow. Unfortunately, there is no OOB method of doing this that I’m aware of, though I’ve seen some people make a custom XHTML page with some custom Javascript that will allow this to work (somewhere on Compass).

1 Like

Oh, got it.

Yeah, I agree that it’s not possible OOTB. We’ve done the custom page thing too, but with a JSP rather than an XHTML. It’s less to configure JSF-wise.

Hey Fellas!
Thanks for the reply, sorry for the delay.
What I was looking for is exactly what @brian_weigel said, I’ll try to find something about it in compass.
The other idea was to build the same Workflow with the form through a Plugin, but the maintenance of that would be something that must be carried out through every upgrade so is not really optimal.

Thank you all!

So what I’d do is create a QuickLink that launches the workflow you want to launch.

Then, create a small JSP page that does the following:

  • Check user authorization to be accessing the page at all and redirect to home.jsf if not authorized.
  • Check user authorization to use the QuickLink, which you can do via the LcmRequestAuthorizer class. Again, redirect to home.jsf if not authorized.
  • Use the sailpoint.service.quicklink.QuickLinkLauncher service to cause IIQ to act as though the user had clicked the QuickLink. If a form results from the workflow launch, redirect the user.

Here is how you do that in a REST API. You’d have to adapt it for JSP, but you still have access to all the same objects, including the HTTP session.

// launcher is an Identity representing the logged in user
QuickLinkLauncher api = new QuickLinkLauncher(getContext(), launcher);

// Fake session map for storing the output
Map<String, Object> session = new HashMap<>();

// These are the IDs passed to the Workflow as quicklinkIdentityIds. In this case, it's a 'self' launch.
List<String> ids = new ArrayList<>();
ids.add(launcher.getId());

QuickLinkLaunchResult result = api.launchWorkflow(ql, launcher.getId(), ids, session);
if (session.containsKey("workItemFwdNextPage")) {
    // If we get here, a work item has been created. Load all of the state into the user's browser session.
    for (Object key : session.keySet()) {
	getSession().setAttribute((String)key, session.get(key));
    }

    // Fetch the base URL
    Configuration systemConfig = Configuration.getSystemConfig();
    String baseUrl = (String)systemConfig.get(SYSTEM_CONFIG_SERVER_ROOT_PATH);
    
    // Redirect to this URL - you'd do this using JSP response.sendRedirect instead
    response.put(RESPONSE_PARAM_REDIRECT, baseUrl + "/workitem/commonWorkItem.jsf#/commonWorkItem/session");
}

When the user is redirected to the commonWorkItem.jsf, the session data injected by the QuickLinkLauncher will cause it to display your form.

1 Like