Synchronizing Data with Workflow

Genian ZTNA can use the results of a Workflow as a data synchronization source. The Workflow authenticates to an external system, retrieves its data, and returns the records to synchronize. Data Synchronization maps the fields in each record to user, department, job title, node, or device life-cycle information.

Use this procedure when Workflow is available under DB Type. For a device integration example, see Synchronizing Microsoft Intune Device Data.

Preparing a Workflow

Create and test the Workflow before adding a synchronization configuration. For the editor and integration information settings, see Workflow.

The final Workflow result must contain an array of records. The following example returns two node records:

[
  {"deviceMac": "02:00:00:00:00:01", "deviceName": "example-device-01"},
  {"deviceMac": "02:00:00:00:00:02", "deviceName": "example-device-02"}
]

For this result, enter deviceMac for Column Name for MAC and map deviceName to the required node information field. Column names refer to fields within each record, rather than the array that contains the records.

Returning multiple pages

A Workflow can return an object containing a result array and a cursor for the next page. For example:

{
  "result": [
    {"deviceMac": "02:00:00:00:00:01", "deviceName": "example-device-01"}
  ],
  "nextLink": "next-page-cursor"
}

Data Synchronization passes the cursor back to the Workflow as a request parameter with the same name. Configure the Workflow to use that parameter to retrieve the next page. On the final page, return an empty cursor or omit it. The field names in this example are result and nextLink.

Note

Setting a next-page field name does not add paging to a Workflow. The Workflow must accept the cursor and return the corresponding page of data. These field names describe the final Workflow result, rather than the complete execution response that contains it.

Creating a synchronization configuration

  1. Go to Preferences > User Authentication > Data Synchronization.

  2. Select Tasks > Create.

  3. Enter a unique ID for the configuration.

  4. Set Update Interval to Disabled to verify the configuration manually before scheduling it.

  5. Set Policy Apply according to whether changes should be applied after synchronization.

  6. Under DB Type, select Workflow.

  7. Select the Workflow for each type of information to synchronize. For example, use Node Workflow for node information. Enable only the information types required by this configuration.

  8. Set the result fields as described below.

Setting

Value

Description

Result Array Field Name

Blank or result

For an object result, the field containing the record array. A blank value uses result. This setting is not required for a result that is already an array.

Next Page Field Name

Blank or nextLink

For a paginated object result, the field containing the next-page cursor. A blank value uses nextLink.

Mapping record fields

Enable the required information type and enter the source field name for each destination field. For node and device life-cycle information, Column Name for MAC is required. Leave Column Name for IPv4 blank when the source provides only MAC addresses.

For node synchronization, when both MAC and IPv4 fields are mapped, both values must match the target node. With MAC-only matching, all existing nodes with the same MAC address can be updated. Node information synchronization updates existing nodes; it does not create or delete nodes or change their MAC or IP addresses.

Note

Only mapped fields are updated. An empty value in a mapped source field can clear the existing destination value. Check the source data before mapping fields that already contain information.

Running and checking synchronization

  1. Save the configuration.

  2. Select its checkbox in Data Synchronization.

  3. Select Tasks > Synchronize Now.

  4. Check Last Synchronized, Duration of Synchronization, and Synchronization Status in the configuration list. Compare the destination information with the Workflow result, and check Logs for details if the result differs.

  5. After confirming the field mappings and target records, set the required Update Interval.

If synchronization fails, check the Workflow test result, authentication to the external system, the returned record format, and the mapped column names.