Overview
This guide will walk you through creating your first datalink and linking document properties to database values. We’ll use the included employee datalink example to demonstrate the workflow.Before starting, ensure you have completed the installation steps and have all three components running.
Prerequisites Checklist
Verify all services are running:Alfresco Repository
Check that Alfresco is accessible at
http://localhost:8080/alfresco/Default credentials: admin / adminYour First Datalink
Step 1: Verify Datalink Configuration
The employee datalink is already configured in the system. Let’s verify it’s loaded:Understanding the Employee Datalink Configuration
Understanding the Employee Datalink Configuration
The employee datalink is defined in Key Points:
venzia-datalink/src/main/docker/datalink/datalink-employee.json:- Connects to a public endpoint (no authentication)
- Maps to the
dlnk:employeeaspect - Displays employee name and hire date
- Uses
emp_noas the primary key (hidden from users)
Step 2: Upload a Test Document
In Alfresco Content App:Upload a Document
Click the Upload button or drag and drop a fileAny file type works—try a PDF, Word document, or text file
Step 3: Link Employee Data to Document
Now let’s link the document to an employee record:Open Datalink Editor
Right-click on the uploaded document and select Edit Datalink from the context menu
If you don’t see the “Edit Datalink” option, verify that the ACA extension is properly loaded and that you’re using the correct version of ACA.
Select Employee Datalink
In the datalink editor dialog:
- Choose Company Employee from the datalink type dropdown
- The form will load dynamically based on the datalink configuration
Search for an Employee
Start typing an employee name in the search field:
- Try searching for “Adolfo”
- The system queries the REST endpoint:
- Results appear in a searchable list showing:
- First Name
- Last Name
- Hire Date
Step 4: Verify the Linked Data
Confirm that the datalink was applied successfully:- Via ACA UI
- Via REST API
- Select the document in ACA
- Open the Info Drawer (click the info icon)
- Expand the Properties section
- Look for the Employee aspect properties
- You should see the linked employee ID stored in
dlnk:employee
Try the Department Datalink
Now let’s try the department datalink, which uses basic authentication:Right-Click the Same Document
Open the datalink editor again by right-clicking on your test document
Search Departments
Search for a department:
- Try “Recursos” or “Marketing”
- This endpoint uses basic authentication (configured in the datalink JSON)
- Credentials:
user2019/g3n3r4l
A document can have multiple datalink aspects applied simultaneously, allowing you to link different types of data to the same document.
Test the Mock Database
Let’s understand what’s happening behind the scenes:Employee Endpoint (Public)
Sample Response
Sample Response
Department Endpoint (Authenticated)
Sample Response
Sample Response
Create a Custom Datalink
Now let’s create your own datalink configuration:Create Configuration File
Create a new JSON file in the datalink configuration directory:Create
datalink-project.json:Add Content Model Aspect
Edit the content model to add the new aspect:Open
venzia-datalink/src/main/resources/alfresco/module/aqua-datalink/model/datalink-model.xmlAdd the new aspect:Rebuild and Restart
Rebuild the backend module and restart Alfresco:This will:
- Rebuild the ACS module
- Recreate the ACS Docker image
- Restart the ACS container with the new configuration
Configuration Options
Authentication Types
- No Authentication
- Basic Authentication
Column Types
Text
Date
Primary Key
Required Response Format
Your REST API endpoint must return an array of objects:Common Use Cases
HR Document Management
HR Document Management
Scenario: Link employee documents (contracts, evaluations) to HR databaseConfiguration:
Customer Documents
Customer Documents
Scenario: Link customer documents to CRM systemConfiguration:
Product Documentation
Product Documentation
Scenario: Link product specs and manuals to product databaseConfiguration:
Troubleshooting
Datalink Not Appearing in List
Datalink Not Appearing in List
Problem: New datalink doesn’t show up in the dropdownSolutions:
- Verify JSON syntax is valid
- Check the datalink file is in
src/main/docker/datalink/ - Ensure the aspect exists in the content model
- Restart ACS:
./run.sh reload_acs - Check Alfresco logs for errors
- Verify via API:
Can't Connect to REST Endpoint
Can't Connect to REST Endpoint
Problem: Search returns no results or connection errorsSolutions:
- Test endpoint directly with curl:
- Check authentication credentials
- Verify URL is accessible from Docker container
- For localhost endpoints, use host networking or
host.docker.internal - Check for CORS issues
- Review ACS logs for connection errors
Wrong Data Displayed
Wrong Data Displayed
Problem: Datalink shows incorrect or missing informationSolutions:
- Verify API response format matches column definitions
- Check that field names are exactly the same
- Ensure primaryKey is set on one column
- Test API response:
- Verify column types match data types (text, date, etc.)
Authentication Fails
Authentication Fails
Problem: 401 Unauthorized errorsSolutions:
- Verify credentials in datalink JSON
- Test authentication manually:
- Check authentication type is correct (“basic”, “none”)
- For the mock database, use
user2019/g3n3r4l - Review API server logs for auth errors
Next Steps
Configuration Reference
Detailed reference for all datalink configuration options
API Reference
Explore the Datalinks REST API and services
Content Models
Learn about custom aspects and content model design
Usage Guide
Learn how to use datalinks in Alfresco Content App
Get Help
If you need assistance:- Visit: https://venzia.es
- Demo: https://aqua.venzia.es
- Email: [email protected]
