Skip to main content

Version: 20.05 (EOL)

Form Deployment and Security

caution

While you can deploy the Workspaces 19.11 application in a TJM 20.05 instance, we don't recommend this mixed-release deployment. For more information, see Can I deploy the Workspaces 19.11 portal in a TJM 20.05, 20.11 or 21.05 environment?.

Prerequisites

Before deploying Workspaces 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 index file is updated to point to the correct configuration folder.
  3. Ensure the application's locale setting is defined correctly in the index file.

For details, see Migrate from 19.11 to 20.05 > Spaces.

Deployment

Before deploying your form, you need to make sure you have a .transact-auth file at the root of your project with the following information. Update the host and the appropriate credentials for that environment.

tmHost=https://tm.workspaces.avoka-transact.com
username=[email protected]
password=password123

Then, run the following command to deploy 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> 
tip

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

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 your form is first deployed, by default JM will deploy it to all the Form Spaces that belong to your Organization with the Authenticated and Anonymous mode enabled.

This behavior is expected for normal Open UX forms, but for a Workspaces Form we need to restrict access to the Space where the Workspaces WAR file was deployed so that it only uses Authenticated mode. To do this, follow these steps.

  1. Select Forms > Forms.
  2. Search for your Form Name and click it.
  3. Select the Spaces tab. Make sure that there is only one form space in the list and that it is called "Workspaces". If there are more spaces, you will need to remove them.
  4. Click the Edit icon, and clear the Anonymous Access checkbox. Only Authenticated Access should be enabled.
note

If you have renamed the Workspaces form space to a different name, make sure you associate the correct form space to the Workspaces form in the above step.

There is one more step. 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 Workspaces Form.

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

What's next?

We have built-in standard components, mock data, hot module reloading, state management, i18n, et cetera. Explore our documentation to learn more about those topics.