/
How to Create a Second Workspace

How to Create a Second Workspace

Search the IFS Workflow Wiki

Back to Tips and Tricks Home Page

 

Multi-Workspace Setup

Create Second Workspace

This can be done simply by logging into workflow as an administrator and modifying the existing Uniform Resource Locator (URL) to indicate the installation of a new site.

1. Login to your existing workspace with admin credentials:

2. Modify the URL, after the Skins name, with /install/newSite:

  • In this example, the Skins name is p2theme.  The Skins name in your environment will be different.

  • Note that install/newSite is in camel case format.

Once the URL has been modified, a New Workspace form will be displayed.

3. Populate the New Workspace form according to your business needs (e.g. Name = Test Environment):

4. Complete the following information about the new workspace.



FIELD

DESCRIPTION

FIELD

DESCRIPTION

Name

Enter a name for the new workspace with a maximum length of 30 characters or less. It is recommended to only use ASCII letters, numbers and underscores (_) to avoid problems.

Database Options

This section defines the MySQL database that will be created to hold data for the new workspace. Each database name can only have 16 characters or less. By default, the prefix "wf_" is added to the Workspace Database Name.

Workflow Database

The name of the database that will hold data about processes, cases, users, report tables, etc.

Drop Database (if it exists)

Check this option to delete any existing databases that have the same name as the ones above.

Workspace Administrator

Defines the administrator credentials for the new workspace. This user will have the "PROCESSMAKER_ADMIN" role, which has permissions for all the ProcessMaker functions.

Username

Enter the username of the administrator of the new workspace. By default, the username is "admin".

Password

Enter the password of the administrator of the new workspace. By default, the password is "admin".

Re-type Password

The password must be entered twice to confirm it.

  • As a “best practice” it is recommended to leave Drop database if exists unchecked, in the Database Options section, when creating new workspaces.  This will ensure that an existing workspace is not inadvertently deleted while creating a new one.

  • Once the form is complete, select Test to create the new site or Reset if you need to modify an entry within this form.

5. Confirm creating the new site:

  • Upon selecting Yes, a dialog box is generated confirming the creation of the new site.

  • Selecting No will end the new site creation process.

6. New site confirmation:

  • Upon selecting Yes, the Update License form is displayed.

  • Selecting No still creates the new site but does not redirect the user to the new site.

7. Update License:

 

  • Locate and choose the License file (Note:  The License file type is .dat).

  • Once the license file is selected, click the Update License button and a new, blank workspace is created.

8. New workspace:

  • The user admin can now begin configuring the new space (e.g. adding new users, exporting / importing workflows from other spaces into the new workspace, etc.)

Register the Client ID and Secret

To provide for security when data is sent, you must register your application with OAuth.

OAuth is an authorization protocol - or in other words, a set of rules - that allows an application to access a user’s data without the user needing to share login credentials.

When you register an application with OAuth, you will generate a client ID and a secret.

  • client_id - is a public identifier for apps. Even though it’s public, it’s best that it isn’t guessable by third parties, so your ID will look something like a 32-character hex string.

  • client_secret - is a secret known only to the application and the authorization server. It must be sufficiently random to not be guessable.

To register the IFS Application:

1. While logged in as Admin level user in the newly created workspace, navigate to the following URL

http://{p2wf-srver}/sys{workspace}/en/neoclassic/oauth2/applications

2. This will open the IFS Workflow OAuth screen.

3. Under User Applications, select New.

4. In the New Application window, type in the following information:

  • Name

  • Description

  • Web Site

Your screen should look similar to the following:

5. To generate the Client ID and Client Secret, click Register Application.

Your screen should look similar to the following:

6. Make a note of these values and store them in a referenceable location.

Import the External_API Table

To import the external_API Table:

  1. In the original workspace, select the Admin Tab.

  2. On the Admin screen, select PM Table, single click on EXTERNAL_API, and then select Export.

  3. On the Tables to Export pop up, select Export.

  4. Log in to the newly created workspace, navigate to the PM Tables section, and then select Import.

  5. In the EU row, configure the fields with the information necessary to allow your EU Server to connect to the target server.

Your screen should look similar to the following:

Import the API Token Update

To import the API Token update:

  1. From the original Workspace, select the Designer tab.

  2. On the Designer page, search or locate the API Token Update workflow.

  3. Select Normal Export.

  4. This will put the .pmx file in the downloads section of your terminal.

  5. Once the download is completed, navigate to the newly created workspace.

  6. In the new workspace, select the Designer tab, and then select Import.

  7. Select the file to import, and the process will be migrated.

Make sure the admin user has access in the assignment rules of the Manual Start for Authenticate Against Auth0.
This will update the PM table to the proper credentials automatically, and given the proper cron setup of the original workspace, will continue to execute once per day automatically.

Create the IFSApplication User

To create the IFSApplication User:

  1. Select the Admin tab and create the IFSApplication User.

  2. Make note of the username and password as this will be needed for the EU workflow.properties file.

  3. It is also necessary to get the userUID of this particular user. This can be done in any of the following ways

  • The simplest way is to create a quick test workflow with DEBUG on and run a case to get the value.

  • Another way is to run a REST service call such as: GET /api/1.0/{workspace}/users

  • One last method is to execute a query on the MySQL database. This would require proper phpMyAdmin setup.

phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. For more information on phpMyAdmin, see the following resources:

Configure the Workflow Properties File

On the Enterprise Upstream Server, there is a file that looks similar to the one used in these steps.

To configure the properties file:

  1. On the Enterprise Upstream server, find the following file: workflow.properties

  2. Open the file for editing.

  3. Make sure the highlighted sections are configured with the values collected:

In the following section, the use of the word workflow denotes the name of the Workspace. 

For example, if a workspace called TestServer was created, the URI would be:
/api/1.0/TestServer/cases

http://ddevwf2/TestServer/oauth2/token














Copyright© 2024 IFS AB. Copying prohibited. All rights reserved.