General
The Fusion Manage Source Module V2 is a complete redesign of the original Fusion source module, providing significant performance improvements, simplified configuration, and expanded data-retrieval capabilities. The module incorporates multi-threaded processing, optimized data-fetching workflows, and support for additional Fusion Manage item content such as Grids, Images, and fields from Linked Items.
This article describes how the Fusion Source V2 Module operates, how it processes Fusion Manage items, and key considerations when integrating it into an NTI workflow.
How the Fusion Manage Source Module V2 Works
The module begins by examining a specified Fusion Manage workspace for items that meet the criteria defined in the Job Queue section of the module’s settings.
When a matching item (referred to as a job item) is identified, the module:
Fetches the job item from Fusion Manage based on predefined filtering in the settings.
Fetches all the related items (referred to as process item) and create articles.
Executes Fusion Manage scripts on certain events: When Processing, On Completion and On Error.
Creates a transaction with articles, structureArticles, documentArticles and Change Orders based on the fetched data.
Important note: By default, the different importers work independently of each other, so two different configurations in Integrator can be fetching items from Fusion Manage at the same time. It’s possible to change this to sequential processing by changing the “SingleThread” field in the module’s web.config file.
Throttling
Fusion Manage has a throttling functionality, which means that too many requests from an IP will be slowed down for a while. Throttling affects all requests made to Fusion Manage, including requests made by other Fusion Manage modules, by several factors.
Therefore, the below settings for parallel threads and update frequency should be carefully set to avoid throttling.
Import Settings
The Import settings contain four sections:
- Import
- Job Queue
- Process
- History
Import
Update Frequency
The wait time between each check for new job items in Fusion Manage. The default is 6 minutes (360 seconds). It is recommended to keep this value as high as possible to lower the risk of getting throttled by Fusion Manage.
Parallel Threads
The number of requests to Fusion Manage that are executed simultaneously. 20 is in the upper limit of what Fusion Manage allows. If there are multiple configurations communicating with Fusion Manage it’s worth lowering the number of threads to avoid getting throttled.
Client
The Fusion Manage client to use for the module. The client is created and configured on the Clients page. See Clients.
Job Queue
The following settings are configured in the Job Queue section:
State Name
The name of the Fusion Manage workflow state that the job item should be, in order to be fetched by the module.
Workspace
The workspace in Fusion Manage containing job items.
Relation View
Which view/tab on the job item containing the items linked to the job (the process items).
Configuration Field
The field on the job item containing the name of the Integrator configuration that it uses to filter which jobs to fetch or not to fetch.
Processing Script
The script to be called in Fusion Manage for setting the job into the processing state.
For more details on scripts see the “Fusion Manage Job Workspace” section.
Error Script
The script to be called in Fusion Manage for setting the job into the error state.
For more details on scripts see the “Fusion Manage Job Workspace” section.
Complete Script
The script to be called in Fusion Manage for setting the job into the completed state.
For more details on scripts see the “Fusion Manage Job Workspace” section.
Process
The following settings are configured in the Process section:
Identifier Field
The name of the field that will be used as the unique identifier for the resulting articles in Integrator.
Change Order Mode
The change order mode dropdown decides how change orders should be handled and processed.
The different options are:
- As CO Properties: All of the change order items fields are added to all the resulting articles under it, these are named “CO.<Field Name>”. But no actual article is created for the change order itself.
- As Top Item: The change order item is created as its own article and as the top of the structure articles.
- As Change Order: The transaction is changed to Change Order mode and it builds its articles and structure according to that. Be aware that not many ERP modules support Change Order transactions.
Items are classified as Change Orders if they are in a “Revisioning Workspace”.
Process Materials
When selected the related items bill of materials are included in the transaction.
How many levels down it fetches is controlled by the “Structure Transfer Depth” setting on the configuration.
Process Attachments
The process attachments dropdown defines what attachments should be included.
The different options are:
- None: No attachments are included.
- Job: Only attachments linked to actual job item is included.
- Top: Only attachments on the items related to the job are included.
- All: Attachments on any item encountered during the parsing of the are included.
What types of files that are included is controlled by the document settings. As an example if you want all the .pdf files there needs to be a matching document setting for that file extension.
Process Grid
When selected, data from grid views in related items are included in the transaction.
The format of the resulting properties are: “Row[<Row Number>].<Field Name>”
Process Images
When selected, images in related items are included in the transaction.
The images are Base64 encoded and saved in a property.
Process Linked
When selected, any fields that contain links to other items has its properties included depending on what’s defined in the “Linked Fields” table.
Linked Fields
The linked fields table is for defining which fields of the linked items should be included.
As an example, if you add “Number” to the table it will create properties in the resulting article looking like “<Linked Field Name>.Number”.
History
The history table is a live updated table where rows are added when new transactions are created or if the module fails to get data from Fusion Manage. More details are found in the transactions log.
The history table is automatically cleaned up at reboot or once a day. Rows that are older than the system setting “Clean up time” are removed.
Buttons
Test
The test button will check if there are any job queue item that matches the saved settings. It is not an indicator if the actual transactions will function or not.
Activate/Disable
Activates/disables the import. If the server is freshly restarted it can take a minute to start working as the internal queue system in Integrator starts up.
Save Changes
Commits the changes to the database.
Fusion Manage Job Workspace
The Fusion Manage Source module requires a workspace it will pick up jobs from, the following is a simplified guide on what’s required for its setup.
Begin with creating a new “Basic Workspace with workflow” that will hold the job items.
The fields required for this workspace are a unique identifier of some kind, in this case it’s just a simple auto number field and a text field that’ll contain the name of the Integrator configuration that’s used for filtering.
Then it needs a workflow for it to be able to know what it should run and report back the result of the transaction it has created in Integrator.
Finally, it needs three workspace scripts for the Integrator to use, to manipulate the workflow.
- A processing script that puts the job from pending to processing.
- A complete script that goes to complete from either the processing or the error state.
- An error script that switches it from processing to the error state.
An example script of the complete to process or error state:
var state = item.workflowActions[0].transition.toState.shortName;
if(state == 'Proccessing') {
item.performWorkflowTransition(464);
}
if(state == 'Error') {
item.performWorkflowTransition(494);
}