Search for entities in another registry data factory

The Search for entities in another registry data factory extension is a delegate for searching entities in the databases of other registries on the Platform. This extension is configured using the template with the same name: Search for entities from another registry data factory (registryDataFactoryConnectorSearchDelegate.json).

To configure the delegate template in Camunda Modeler, perform these steps:
  1. Open the business process modeling interface.

  2. Create a Service Task.

  3. In the settings panel on the right, click the Open Catalog button and select the Search for entities in another registry data factory delegate template from the list. Click Apply to confirm your action.

    search for entities another registry 1

  4. Configure the template:

    Before configuring the template in Camunda Modeler, ensure the resources/element-templates folder of the application contains the registryDataFactoryConnectorSearchDelegate.json file.
    • In the Name field, specify the name of the task in which the delegate is configured. For example, Get entities from the DB of another registry on the Platform.

    • Continue to the Input Parameters section.

      • Expand the Target registry section and enter the name of the target registry to search for entities.

        The name of the registry must match the name specified for the registry (namespace) in the Control Plane admin console.
        • Set Local Variable Assignment to ON. This will create a local variable for the name of the registry to search for entities.

        • From the Variable Assignment Type dropdown list, select String or Expression.

        • In the Variable Assignment Value field, specify the name of the registry to search for entities. For example, test-another-registry.

          In our example, we specify the registry name directly: test-another-registry.

          You can also use the submission() function and specify the registry name from the UI form as ${submission('<formId>').formData.prop('namespace').value()}, where '<formId>' should be replaced with the ID of the user task (form) in the business process, and 'namespace' is an attribute for the environment (namespace) of the cluster where the registry is deployed.

          Example 1. Example of specifying the registry name through the submission() function
          ${submission('childDataInput').formData.prop('namespace').value()}

          search for entities another registry 2

      • Expand the Resource section and specify the name of the endpoint for the search condition (view) in the data factory API of the target registry.

        • Set Local Variable Assignment to ON. This will create a local variable for the resource.

        • From the Variable Assignment Type dropdown list, select String or Expression.

        • In the Variable Assignment Value field, specify the resource for the search condition. For example, edu-type-contains.

          search for entities another registry 3

      • Expand the Search variables section and specify the search variables (parameters) to pass in the request.

        • Set Local Variable Assignment to ON. This will create a local variable for searching another registry.

        • From the Variable Assignment Type dropdown list, select Map.

          In other words, we need to pass a set of "key-value" pairs.
        • In the Variable Assignment Value field, specify the keys and their values for the search parameters.

          Add a record by clicking Add Entry:

          • In the Key field, enter name. In the Value field, enter the parameter value—​for example, ${submission('<formId>').formData.prop('name').value()}.

            In our example, we are passing one search parameter (name) and its value from the corresponding form (<formId>) using the submission() function. You can also define the values of the search parameters as a constant—​for example, some-value-for-name-key.

            search for entities another registry 4

      • Expand the X-Access-Token section and specify the access token for the resource:

        • Set Local Variable Assignment to ON. This will create a local variable for the access token.

        • From the Variable Assignment Type dropdown list, select String or Expression.

        • In the Variable Assignment Value field, specify the access token. For example, ${initiator().accessToken}.

          The access token is taken either from the initiator (for example, $initiator().accessToken}) or the executor of the last user task (for example, ${completer('taskDefinitionId').accessToken}).

          search for entities another registry 5

    • In the Output Parameters section:

      • Expand the Result variable section and specify the name of the process variable that should contain the result. By default, it is set to response.

        • Set Local Variable Assignment to ON.

        • From the Variable Assignment Type dropdown list, select String or Expression.

        • In the Variable Assignment Value field, specify the name of the result variable (default value is response).

          search for entities another registry 6