Form deployment and security
Prerequisites
Before deploying Journey Engage as an Open UX form, be sure to address the following in your project.
- Ensure the index file for the configuration is updated with all the defined spaces required in the application.
- Ensure the application's
transact-config.json
is updated to point to the correct configuration path. - Ensure the application's locale setting is defined correctly in the index file.
Deployment
Before deploying your form, make sure you have a .transact-auth
file at the root of your project with the following details relating to your Journey Manager (JM) environment.
tmHost=https://tm.workspaces.avoka-transact.com
username=<your JM username>
password=<your JM password>
Then, run the following command to deploy to that environment:
npm run build:deploy
If JM is sitting behind a proxy, use the following command instead, inserting the relevant details for your environment:
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/
.
http://localhost:9080/workspaces/app/FORM_CODE/FORM_VERSION
http://localhost:9080/workspaces/secure/app/FORM_CODE/FORM_VERSION
Security
When you first deploy your form, JM will deploy it, by default, to all the Form Spaces that belong to your Organization with the Authenticated and Anonymous modes 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 is deployed to Authenticated mode only.
To achieve this, follow these steps:
- Select Forms > Forms.
- Search for your Form Name and click it.
- Select the Spaces tab. Make sure that only the Workspaces Form Space is in the list. If there are more spaces, remove them.
- Click the Edit icon and clear the
Anonymous Access
checkbox, ensuring onlyAuthenticated Access
is enabled.
note
If you have renamed the Workspaces form space to a different name, make sure you associate the correct form space with the Workspaces 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 Workspaces Form.
In Journey Manager, select Forms > Form Spaces.
In the list of form spaces, locate the Workspaces form space that you want to edit and click the Edit icon for that space.
Select the Pages tab, and copy the following template into
index.htm
andlogout.htm
.<html>
<head>
<meta http-equiv="Refresh" content="0;URL=/workspaces/app/FORM_CODE/FORM_VERSION" />
</head>
</html>Replace
FORM_CODE
andFORM_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.