AES-Driven IDO-Layer Data Replication
This project is in pre-beta testing and is shared for collaboration. Use at your own risk!
An event-driven data replication system for Infor CloudSuite Industrial (Syteline), built on the Mongoose framework. Administrators set up replication rules in Syteline forms: which IDO to watch, which external system to send to, and how each field maps and transforms. When a record is inserted, updated or deleted, an Application Event System (AES) trigger replicates it. Failures are logged and retried automatically.
Full documentation for administrators and developers is in the wiki.
Targets
| Target |
Status |
Details |
| Azure Event Hubs |
:white_check_mark: Working |
Batched sends sized for every Event Hubs tier. Works with Microsoft Fabric Eventstreams through a custom endpoint, including standard, inferred multi-schema and Event Schema Eventstreams. For Event Schema Eventstreams, set the rule’s Event Schema URI and the credential’s Event Source, and each event carries the CloudEvents properties Fabric needs. |
| Salesforce REST API |
:white_check_mark: Working |
Upserts by external ID. Deletes are optional, per rule. |
Log only (LogOnly) |
:test_tube: For testing |
Sends nothing. Writes the replication log as if it had, so triggers and field maps can be tested without a target. |
| Other Syteline instances (REST or SOAP) |
:x: Not started |
Conceptual |
| SQL databases (PostgreSQL, SQL Server, MySQL, …) |
:x: Not started |
Conceptual |
| Other ERP systems with a REST API |
:x: Not started |
Conceptual |
How it works
- Triggers. From the IDO Replication Configs form, you set up triggers on any IDO. This creates AES event handlers for insert, update and delete, each calling the replication method with its operation (
Insert, Update or Delete). The delete trigger runs before the row is removed, so the record can still be read.
- Rules. The method loads the IDO’s active replication rules, reads the record through the IDO layer, and builds one output record per rule from the rule’s field map (IDO properties or literal values, each with an optional transformation).
- Sending. Each rule sends to its target with its credential:
- Azure Event Hubs: events carry the operation (
Insert, Update, Delete, or Upsert for bulk loads and tests) as an operation user property. Optionally, a body field holds it too.
- Salesforce: records are upserted by external ID. A delete is skipped unless the rule’s Delete Behavior is
Delete.
- Logging and retries. Every record’s outcome goes to the replication log, with the payload exactly as sent. A scheduled background task resends failed records from their stored payloads, so deleted records can be retried too, and skips any that were replicated again since. It purges old successful rows.
Replication errors are caught and logged, so they don’t fail the user’s save. The one exception seen in testing: for a few minutes after an assembly is uploaded, a save can fail because Syteline can’t load the extension class (see Upgrading).
Saves made in Syteline’s forms replicate. A REST API or extension class update replicates only when it includes the record’s RowPointer, and their inserts aren’t replicated; those changes are logged as skipped instead of sent. See Known limitations.
You can also run replication as a background task over many records, for example for an initial load.
Components
All objects use the AIR prefix (ue_AIR_...) on IDO server ue_AIR.
Tables (each with a view of the same name without _mst, which the IDO uses)
ue_AIR_idorepl_rule_mst: replication rules
ue_AIR_idorepl_cred_mst: credentials for external targets
ue_AIR_idorepl_mapfield_mst: field maps
ue_AIR_idorepl_mapfieldsource_mst: map field sources
ue_AIR_idorepl_log_mst: the replication log
IDOs
ue_AIR_IDOReplicationRules: rules, with the replication, output preview and retry methods
ue_AIR_IDOReplicationCredentials
ue_AIR_IDOReplicationMapFields and ue_AIR_IDOReplicationMapFieldSources
ue_AIR_IDOReplicationLogs: the replication log
ue_AIR_IDOReplicationConfigs: extends IdoCollections to manage triggers per IDO
ue_AIR_EventHandlers: extends EventHandlers to show trigger status
Forms: ue_AIR_IDOReplicationRules, ue_AIR_IDOReplicationCredentials, ue_AIR_IDOReplicationConfigs, ue_AIR_ImportJob and ue_AIR_JobFileInputWindow.
Extension class assemblies (.NET Framework 4.8)
ue_AIR_IDOReplicationRules_ECA: replication, output preview, logging and retries
ue_AIR_IDOReplicationConfig_ECA: trigger setup, removal and repair
Test tools: diagnostic triggers that log how Syteline fires each IDO event, and tools/Test-AIRTriggers.ps1, which saves test records through the REST API or an extension class and times read-only polls. They are for a test system. See Trigger Diagnostics.
Screenshots (from an earlier version):


Installing
The install package is in dist/. Its folders are numbered in install order.
- SQL (
dist/1 - SQL (Paste Rows Append)/): paste the rows of SQL Tables.csv and SQL Columns.csv into Syteline’s SQL Tables and SQL Columns forms as appended rows. Then create each table’s view (the table name without _mst).
- IDOs and extension classes (
dist/2 - IDOs and Extension Classes (IDO Import Wizard)/): import the file with the IDO Import Wizard. It includes both extension class assemblies. Then run Refresh Form Metadata to clear the IDO cache. If you build the assemblies yourself, upload them after this import, not before: the import most likely puts the export’s own assemblies in place.
- Forms and strings (
dist/3 - Mongoose Objects (FormSync)/): import the forms and Strings.XML with FormSync. Then unload global form objects (Form > Definition > Unload All Global Form Objects).
- Background tasks: create Background Task Definitions for:
- replication, called from the Rules form:
ue_AIR_ReplicateRecordToExternalSystems, with parameters BG~TASKID~, <filter>, <IDO name>, <record cap>, <rule number>. The rule number is optional. A background run shows as failed when a rule fails or nothing could be sent, and its task messages say why
- retries:
ue_AIR_RetryFailedReplications, calling the Rules IDO method ue_RetryFailedReplications with parameters BG~TASKID~, 90. The second parameter is how many days to keep successful log rows, and 0 keeps them forever. Schedule it to run every minute, and don’t let two runs overlap.
- resend:
ue_AIR_ResendReplications, calling the Rules IDO method ue_ResendReplications. The IDO Replication Resend form submits it, so it isn’t scheduled.
- Configure: add credentials and rules (below), then set up triggers on the IDO Replication Configs form.
Configuring
Credentials
| Target type |
Value 1 |
Value 2 |
Value 3 |
AzureEventHub |
Connection string (from a shared access policy on the event hub itself, including EntityPath) |
Event Source: a URL identifying your organization, required for Event Schema Eventstreams |
Max Batch KB Override (optional). Leave blank for the default of about 220 KB, safe for every tier; Standard tier and above can use up to 850. |
SalesforceRESTAPI |
Client ID: the consumer key of a Salesforce external client app |
Client secret: the app’s consumer secret |
Domain: your My Domain name, mycompany for production or mycompany--sandboxname.sandbox for a sandbox |
LogOnly |
none |
none |
none. A LogOnly rule doesn’t need a credential. |
Salesforce sign-in uses the OAuth client credentials flow only. Turn that flow on for the external client app and choose the user it runs as. No username or password is stored in Syteline.
Rules
| Target type |
Option 1 |
Option 2 |
Option 3 |
AzureEventHub |
Event Schema URI (optional, for Fabric Event Schema Eventstreams) |
ID field: the output field used to identify records in the log |
Operation Field Name (optional): adds the operation to each event body under this name. Your event schema must then include it. |
SalesforceRESTAPI |
sObject name |
External ID field |
Delete Behavior: Skip (default) or Delete |
LogOnly |
Delay Milliseconds (optional): wait this long per send, at most 60,000, to stand in for a slow target |
ID field: the output field used to identify records in the log |
Simulated Result: Succeeded (default) or Failed |
Field maps
Each map field has an output name, a source type (IDOProperty or Literal), a source value (the property name or the literal), and an optional transformation:
| Transformation |
Result |
| DateTime to Date |
yyyy-MM-dd text |
| Decimal to Integer |
A whole number, with halves rounded away from zero |
| Decimal to USD String |
Text such as $1,234.50 |
| Checkbox (Byte) to Boolean |
true / false |
| Checkbox (Byte) to True/False String |
"True" / "False" |
| Checkbox (Byte) to Yes/No String |
"Yes" / "No" |
Empty values stay empty. A value a transformation can’t convert is sent unchanged, and the record’s replication log row gets a warning naming the field and value.
Replication log and retries
ue_AIR_IDOReplicationLogs holds one row per record per rule. Each row stores:
- the source (which trigger event, a bulk load or a test), the operation (
Insert, Update, Upsert or Delete; a Salesforce rule logs an insert or an update as Upsert, which is what Salesforce does with it) and the record’s ID
- the payload as sent (up to 4,000 characters)
- the status (
Succeeded, Failed or Skipped) and the error
- the number of retries left (3 to start)
What’s logged: trigger runs log every record. A trigger that can’t find its record logs a Skipped row with the filter it was given. Background-task runs log every record when they load 100 or fewer. Above that they log failures, warnings, and records that have an older failed row.
What the retry task does:
- It resends failed rows that still have retries left and a stored payload, using each rule’s current settings.
- It marks a failed row
Skipped when the same record was replicated again later, so older data doesn’t overwrite newer data. This needs the rule’s ID field (Option 2). Without it, the row is still retried, but the check can’t be made.
- It ignores rows for inactive rules.
- It deletes
Succeeded and Skipped rows older than the number of days you set. Failed rows are kept.
Resending by hand: each failed record gets 3 automatic retries, one per run of the retry task, which is meant to run every minute. For anything left after that, the IDO Replication Resend form (ue_AIR_IDOReplicationResend) resends one rule’s records. Resend Errors resends every record that has a failed row in the log. Bulk Resync resends the records changed in a period you choose, narrowed by a filter and a limit if you want. Both reload each record and send its current values.
Building
The extension class assemblies are in src/IDO Extension Class Custom Assemblies/, one Visual Studio solution each. They need Windows, Visual Studio or MSBuild, and the .NET Framework 4.8 targeting pack. They reference Infor’s DLLs from the Lib/ folder and NuGet’s Newtonsoft.Json.
nuget restore "src/IDO Extension Class Custom Assemblies/ue_AIR_IDOReplicationRules_ECA/ue_AIR_IDOReplicationRules_ECA.sln"
msbuild "src/IDO Extension Class Custom Assemblies/ue_AIR_IDOReplicationRules_ECA/ue_AIR_IDOReplicationRules_ECA.sln" /p:Configuration=Release
Upload the built DLL in Syteline’s IDO Extension Class Assemblies form. If a method signature changed, use Resync Parameters on the IDO method.
License
MIT
评论