FillInstanceDataViaXMLManager

This timer can be used for monitoring a designated folder within the file system to detect the addition of XML files. Upon identification of an XML file, the timer initiates processing, extracting the data and setting them as process variables for the process instance, based on the process instance ID given in the XML file.

This process instance ID is used to verify the existence of the instance on the correct node as defined in the timer configuration. Subsequently, the timer populates the identified instance's process variables with the extracted data and progresses to the specified wait state or node.

Additionally, error-handling mechanisms are implemented to manage instances where no matching process instances, process definitions, wait states, or nodes are found.

Class

com.dooris.bpm.beans.FillInstanceDataViaXMLManager

 

Screenshot 2024-05-27 213522.png

 

Parameter

Description

Parameter

Description

Timer Name

Name of the timer i.e FillInstanceDataViaXMLManagerTest

Webservice Name

FillInstanceDataViaXMLManager - the manager that enables the processing of XML timer

Webservice Method

fillInstanceDataViaXML - method name that is called for processing the XML files

Parameters

The parameter field should include these 4 parameters:
1. Name of process definition - matching process definition to be processed
2. Name of Activity is the matching activity where the processing of XML happens
3. Path of XML file - where the file is located
4. Variables XPATH - XPATH to process variables inside the XML file

Time to Start

The time to start presents the starting time for the timer.

Starting Time

The starting time interval of the timer is displayed.

Max Runs

How many times the timer will run

Status

The status field displays the most recent execution time and date of the process. In case of an error, it shows the timer didn’t run correctly

Start Timer

The ‘Start’-button activated the timer.

Delete

The ‘Delete’-button can be used to remove the timer.

Save

The 'Save'-button allows the changes to be saved.

Use case

A new timer is created, that searches an XML file in the by-parameter-defined folder that was added to the file system. Below are displayed the examples for the XML path from the files.

Timer configuration

Screenshot 2024-05-28 110517.png


XML file path

Screenshot 2024-05-27 164209.png

XML file structure

Screenshot 2024-06-06 093923.png

When the timer is executed, we have two options:

If the file was processed correctly, it is moved to the “success” subfolder.

If the file was not processed correctly, it is moved to the “error” subfolder and sends an email (see below)

Screenshot 2024-05-27 164452.png

From the process instance report, you can see the process variables from the XML.

Screenshot 2024-05-27 224628.png

If the timer has failed, the owner of the workflow will also receive an email.

Screenshot 2024-05-28 095449.png