Local Worker for Cloud Tenants: Installation and Usage
Table of Contents
How to install a Functional Worker in the customer network and use it with data providers, client workflows and scripts when Matrix42 Enterprise is hosted in the cloud.
Overview
When Matrix42 Enterprise runs in the cloud, the application server cannot reach systems in your own network, such as Active Directory, file shares or internal databases. A local worker closes this gap: you install a Functional Worker in your network, and it runs the tasks that need access to local resources. In this article, local always means your network, not the location of the application.
Starting with version 26.1, the component is called Functional Worker. In earlier versions it was the Matrix42 Worker or Remote Worker, and before version 11.0 the Data Gateway. For older versions, see Matrix42 Worker Engine.
How it works
The worker never accepts incoming connections. It asks the Matrix42 server regularly for tasks, runs them and returns the results.
Every task has a target: a Worker Capability. A worker runs only the tasks whose capability it holds. Capabilities replace the former Data Gateway assignment. Some screens call the same object Data Provider Pool.
You can send work to the worker in two ways:
| Use case | What you configure | Where |
|---|---|---|
| Data providers, for example Active Directory | The field Data Provider Pool of the provider configuration | Administration → Integration → Data Providers |
| Your own workflows and scripts | The activity Run Client Workflow with a client workflow and a capability | Workflow Studio |
Prerequisites
- A Matrix42 Enterprise tenant, version 26.1 or later.
- A user with permissions in the Administration application.
- A computer in your network with access to the resources that the worker has to reach.
- Network access from this computer to your tenant. See Functional Worker in Matrix42 ESM for the operating system, runtime and service account requirements.
Install and Connect the Worker
Generate an API Token
In the Administration application, open Integration → Web Service Tokens and run the action Generate New Token. Details are described in Web Services tokens: Generate API Token.
The token is displayed only once, directly after it was generated. Copy it and store it securely. Starting with version 26.1, the action also returns an encrypted API token. Use the encrypted value as ApiToken in the worker configuration file.
Download and Install the Worker
- Open Services & Processes → Workers and select Download Worker.
- Copy the package to the computer in your network and run the installation.
- Enter the URL of your tenant and the API token. The configuration file
appsettings.jsoncontains, among other settings,ServerBaseUrl,ApiTokenandFriendlyName. All settings are described in Functional Worker in Matrix42 ESM.

Install only one Functional Worker on a computer. If several workers are installed on the same computer, keep one and uninstall the others.
Check the Connection
In Services & Processes → Workers, the worker appears in the list. Check that its status is Active and that Last Update changes regularly. The column Token expires shows when you have to renew the API token.
Create a capability and Assign it to the Worker
Create a Capability
- Open Services & Processes → Workers → Worker Capabilities and select Add Worker Capability.
- Enter a unique Name, for example
CustomerNetwork, and a Description. - Leave the check box Maintained automatically cleared. The system maintains automatically detected capabilities, such as Windows or Server, by itself.
- Select Save & Close.

Assign the Capability to the Worker
- Open Services & Processes → Workers and open the worker in your network.
- In Assigned Capabilities, select the new capability.
- Select Save & Close.

The list Worker Capabilities now shows the worker in the column Workers.

Use the Worker with Data Providers
Data providers, such as Active Directory, run on the worker that holds the capability selected in the provider configuration.
- Open Integration → Data Providers and open the provider.
- In Configurations, open the configuration.
- On the tab General, select your capability in Data Provider Pool. The grid shows the same value in the column Runs on.
- Save the configuration and set the schedule of the engine activation as usual.

The tab Workflows of a configuration shows only the run history of the provider workflows. The worker is selected only in Data Provider Pool.
The provider workflows read the Data Provider Pool of the configuration themselves. You do not have to change the workflows.
Run Workflows and Scripts in Your Network
Principle
A normal workflow runs in the cloud. Everything that needs access to your network runs in a client workflow on the local worker. You start the client workflow from the normal workflow with the activity Run Client Workflow.
Workflow A (cloud) Client workflow (worker in your network)
Get data Get Single Record Data
Run Client Workflow ───────────────► Invoke PowerShell (reads a file share)
Data Provider Pool = CustomerNetwork Assign result to an Out argument
Arguments: In / Out ◄───────────
Decision on the result
Update data
Create the Client Workflow
- In Workflow Studio, create a workflow and set Integration Context to Client Custom Workflow in the workflow properties.
- Define the arguments of the workflow, as described in Pass parameters between the workflows.
- Add the activities that run in your network.

A worker in your network has no direct SQL connection to the Matrix42 database. Read Matrix42 data with Get Single Record Data, not with Execute SQL.
The toolbox shows only the activities that can run in the workflow. In a client workflow, activities that run only on the server are hidden, for example Run Client Workflow, Get Package and Encrypt Data. A client workflow cannot start another client workflow.

Start the Client Workflow
In the workflow that runs in the cloud, add the activity Run Client Workflow from the category Integration. The activity is available only in workflows with a server-side Integration Context.

| Property | Description |
|---|---|
| Data Provider Pool | The capability of the worker that runs the client workflow. At least one active worker has to hold it. |
| Workflow | The client workflow that is started. |
| Arguments | The values that are passed to the client workflow (In) and returned from it (Out). |
| Related Objects | Objects to which the started workflow instance is attached. They appear on the page Affected Objects of the workflow instance. |
| Do not wait | Select this option if the calling workflow must not wait until the client workflow has finished. |
| Ignore Failure | Select this option if the calling workflow continues when the client workflow fails. |
| Is Failed | Output. Shows whether the client workflow has failed. |
| Error Message | Output. The error message of the client workflow. |

Select the capability for Data Provider Pool in one of two ways:
- Static: Select the capability from the list. The list contains all capabilities of the system, including the automatic ones such as Windows or Server. Select your own capability.
- Variable or Expression: Use a variable that contains the ID of the capability. The workflows of the data providers use this way: they read the Data Provider Pool of the provider configuration into a variable.


Run scripts in your network
Add the activity Invoke PowerShell to the client workflow. Make sure that the check box Run on Application Server is cleared.

If Run on Application Server is selected, the script runs on the application server in the cloud and cannot reach your network.
Draft note for review: Where a script in a normal cloud workflow runs, the PowerShell version per host and the limits of scripts on the worker have to be confirmed by Engineering.
Pass Parameters Between the Workflows
The workflows exchange values through arguments. The delivered Active Directory workflows Change Password \ Unlock Account (in the cloud) and Change Password \ Unlock Account on Agent (client workflow) show the complete pattern.
- Declare the arguments in the client workflow. Each argument has a name, a direction (In or Out) and a type.
- Map the arguments in the calling workflow. In the property Arguments of Run Client Workflow, add one entry for each argument. The key is the argument name of the client workflow. For an In argument, enter an expression or variable of the calling workflow. For an Out argument, enter the variable that receives the result.
- Work with the arguments in the client workflow. Read further data from the passed ID, run the local action and assign the result to an Out argument.
- Continue in the calling workflow. After the client workflow has finished, the Out variables are available, for example for a Decision.
| Argument | Direction | Type | Purpose |
|---|---|---|---|
ObjectId |
In | Guid | ID of the account that is processed |
UnlockRequested |
In | Boolean | Whether the account has to be unlocked |
NewPassword |
In | SecureData | The new password |
UnlockCompleted |
Out | Boolean | Whether the account was unlocked |
ChangePasswordCompleted |
Out | Boolean | Whether the password was changed |


Pass IDs and flags, not complete objects. The client workflow reads the data it needs from the ID.
Pass passwords and other secrets only as type SecureData, never as plain text.
Return results through Out arguments. Use Is Failed and Error Message to react to errors.
Migrate Workflows from On-Premises to the Cloud
When you move an on-premises installation to the cloud, the application server is no longer in your network. Workflow parts that access local resources have to move into client workflows.
Find the Affected Workflows
Look for workflows with activities that access your network:
- Invoke PowerShell with file paths, local programs, Active Directory commands or internal hosts.
- Execute SQL on internal databases.
- Activities for LDAP, files and packages on internal systems.
- Custom activities that rely on files on the application server.
Decide What to Change
| Finding | Action |
|---|---|
| The workflow uses only Matrix42 data | No change. |
| The workflow needs a resource in your network | Move the part into a client workflow and start it with Run Client Workflow. |
| The workflow needs a resource on the application server | Redesign the workflow. The application server is in the cloud and does not reach your network. |
| A data provider | Select the capability of your local worker in Data Provider Pool. |
Move a Workflow Part into a Client Workflow
- Create the client workflow and move the local activities into it.
- Turn the variables that the moved activities read into In arguments. Turn the values that later steps need into Out arguments.
- Replace the moved part in the original workflow with Run Client Workflow and map the arguments.
- Decide how to handle errors: use Is Failed, Ignore Failure and a TryCatch in the client workflow.
- Release both workflows and test them with a capability that only the worker in your network holds.
After the migration, the data provider configurations can still point to the former default pool, which is named after the old server. Select the capability of your local worker in Data Provider Pool for each provider.
Troubleshooting
| Question | Where to look |
|---|---|
| Is the worker connected? | Services & Processes → Workers: status and last update. Check also the expiry date of the token. |
| Does the worker hold the capability? | Services & Processes → Workers → Worker Capabilities: the column Workers lists the workers. |
| Was the client workflow executed? | Services & Processes → Workers → Worker Logs: a client workflow appears as a process of the type Data Gateway. The ErrorMessage shows errors. |
| The worker does not start or reports authentication errors | See the knowledge base article about workers that do not work with the error Authentication failed. |