Skip to main content

Version: 22.10

Form deployment and security

Prerequisites

Before deploying Journey Engage as an Open UX form, be sure to address the following in your project.

  1. Ensure the index file for the configuration is updated with all the defined spaces required in the application.
  2. Ensure the application's transact-config.json is updated to point to the correct configuration path.
  3. Ensure the application's locale setting is defined correctly in the index file.

Deployment

Before deploying your Journey Engage form, make sure you have a .transact-auth file at the root of your project with the following details relating to your TJM environment.

tmHost=JM_SERVER
username=JM_USERNAME
password=JM_PASSWORD
tip

Journey Workspaces allows you to use .transact-auth variables inside transact-config.json. To learn more, see Transact Config.

Replace the following:

  • JM_SERVER: The URL for your Journey Manager server where the application will be deployed. For example, https://tm.workspaces.avoka-transact.com.
  • JM_USERNAME, JM_PASSWORD: Your credentials to authenticate on JM_SERVER.

Then, run the following command to deploy your form to the configured environment:

npm run build:deploy

If JM is behind a proxy, use the following command instead:

npm run build:deploy -- --proxy-host=HOST --proxy-port=PORT --proxy-username=USERNAME --proxy-password=PASSWORD

Replace HOST, PORT, USERNAME and PASSWORD with the relevant details for your environment.

info

If you're deploying your Journey Engage form to a local instance of JM, make sure the URL does not contain /secure/. That is:

thumb_up Like this: http://localhost:9080/workspaces/app/FORM_CODE/FORM_VERSION

thumb_down Not this: http://localhost:9080/workspaces/secure/app/FORM_CODE/FORM_VERSION

Security

When you first deploy your Journey Engage form, JM deploys it with the Authenticated and Anonymous modes enabled to all form spaces that belong to your organization. This behavior is expected for Open UX forms, but it's not what we need for a Workspaces form. Instead, we need to restrict form access to just the form space where the Workspaces WAR file is deployed (Work Spaces, by default), and with Authenticated mode enabled only.

To achieve this, follow these steps:

  1. Select Forms > Forms.
  2. Locate your form by Form Name, and click the Form Name or the form's Edit icon.
  3. Switch to the Spaces tab.
  4. Ensure that only the Work Spaces form space is in the list. Remove any other form spaces from the list.
  5. For the Work Spaces form space, ensure that only Authenticated Access is enabled. If Anonymous Access is enabled, click the Edit icon and clear the Anonymous Access checkbox.
  6. Click Save.
note

If you have renamed the Workspaces form space (Work Spaces, by default), make sure you associate the correct form space with your Journey Engage form in the steps above.

Finally, the Workspaces WAR file comes with default index.htm and logout.htm files that need to be updated with the new form URL so that all default routes redirect to the new Journey Engage form.

  1. In Journey Manager, select Forms > Form Spaces.
  2. In the list of form spaces, locate the Workspaces form space that you want to edit and click the Edit icon for that space.
  3. Select the Pages tab, and copy the following template into index.htm and logout.htm.
    <html>
    <head>
    <meta http-equiv="Refresh" content="0;URL=/workspaces/app/FORM_CODE/FORM_VERSION" />
    </head>
    </html>
    Replace FORM_CODE and FORM_VERSION with appropriate values for your form.

You're all set now!

We have built-in standard components, mock data, hot module reloading, state management, and i18n. Continue exploring our documentation to learn about these topics.