XDDQCBatchExecAgent

In this section:

The supplied iWay DQC service named com.ibi.agents.XDDQCBatchExecAgent invokes the iWay DQC run-time (batch) execution environment, through the runcif.bat file. This service enables dynamic allocation of external files and data sources. By running the runcif.bat file, the service executes a Plan with a dynamic run-time configuration file.


Top of page

x
Supplying Parameters

You must supply parameters that define the XDDQCBatchExecAgent. An inbound document causes the iWay DQC run-time environment to execute, based on the supplied parameters.

The following table describes the XDDQCBatchExecAgent parameters.

Parameter Name

Description

DQC Runtime Command File (required)

Location of the runcif.bat file. By default, the runcif.bat file is located in the DQC_BASE/runtime/bin directory. For example:

C:\dqc\runtime\bin

Plan File Location (required)

Fully qualified location of the Plan file that the runcif.bat file will execute. For example:

C:\dqc\workspace\samples\
01_Hello_World\bin\batch_Hello_World.plan

Runtime Configuration File Location (required)

Fully qualified location of the default run-time configuration file. This file contains all the static default allocations.

Additional Path Variable Name(s)

Comma-separated list of names of additional path variables, or a single name of an additional path variable. Use this parameter to add one or more path variables to the dynamic default run-time configuration file.

Use this parameter with the Additional Path Variable Value(s) parameter. For each additional name, there must be a corresponding value.

If you supply this parameter, the path variables will be added to the default configuration file. The file will then be used to execute the iWay DQC run-time environment.

For example:

MyPath

For a detailed example of a run-time configuration file with additional path variable names, see Sample Run-Time Configuration File With Additional Path Variable Names.

You may leave this parameter blank.

Additional Path Variable Value(s)

Comma-separated list of additional path variable values. Use this parameter to add path variable values (allocation values) to the preceding list of names.

For example:

C:/temp

Timeout

Time, in seconds, for an iWay DQC timeout. The default value, 0, means no timeout.

The following guidelines apply.



x
Generating a Run-Time Configuration File

In the iWay DQC Graphical User Interface (GUI), you can generate a run-time configuration file. Right-click your project, click New, and click iWay Runtime Configuration.

In design time, you can create a path variable. Right-click your project, click New, and click Path Variable.



Example: Sample Default Run-Time Configuration File
<runtimeconfig>
    <dataSources>
    </dataSources>
    <pathVariables>
       <pathVariable name="APath" value="c:/temp"/>
    </pathVariables>
    <runtimeComponents>
       <runtimeComponent class=
         "cz.adastra.cif.processor.monitoring.file.FileLoggerComp"
         fileName="c:\temp\DQCout.log" stdout="false"
         loggingIntervalInMins="1"/>
    </runtimeComponents>
 </runtimeconfig>


Example: Sample Run-Time Configuration File With Additional Path Variable Names

In the Additional Path Variable Name(s) field, specify the following:

PathOne,PathTwo,PathThree

in the Additional Path Variable Value(s) field, specify:

C:/pathOne,c:/pathTwo,c:/pathThree

The resulting run-time configuration file used by the service is shown here. It is based on the default run-time configuration file.

<runtimeconfig>
    <dataSources>
    </dataSources>
    <pathVariables>
      <pathVariable name="APath" value="c:/temp"/>
      <pathVariable name="PathOne" value="c:/pathOne"/>
      <pathVariable name="PathTwo" value="c:/pathTwo"/>
      <pathVariable name="PathThree" value="c:/pathThree"/>
    </pathVariables>
    <runtimeComponents>
       <runtimeComponent class=
       "cz.adastra.cif.processor.monitoring.file.FileLoggerComp"
       fileName="c:\temp\DQCout.log" stdout="false" loggingIntervalInMins="1"/>
    </runtimeComponents>
 </runtimeconfig>


Example: Other Examples

The following table lists other examples of path variable names and their values.

Additional Path Variable Name

Additional Path Variable Value

SREG(DQC.pathnames)
APath
SREG(DQC.PathValues)
C:\apath



x
How Does the XDDQCBatchExecAgent Work?

The XDDQCBatchExecAgent accepts an XML document and executes the configured Plan.

The resulting XML document is the original document with the addition of the attribute DQCResult="0" on the root element.

The following table describes the possible return codes.

Return Code

Description

0

iWay DQC execution completed successfully.

16

iWay DQC execution completed with warnings.

17

iWay DQC execution completed with errors.

18

Abnormal iWay DQC execution termination.

19

No valid license file was found.

20

Plug-in version check failed. This usually means that the iWay DQC installation is corrupted. Reinstallation is recommended.

21

Incorrect arguments were given to the runcif script.

Assume that you have the following XML input file:

<test>
    <one/>
    <two/>
 </test>

After successful execution of the XDDQCBatchExecAgent, the resulting XML file is:

<test DQCResult="0">
    <one/>
    <two/>
 </test>

With the XDDQCBatchExecAgent, the structure of the original XML file is preserved.



x
Sample Files

runcif.bat File

@echo off

rem Start script for DQC - batch mode
rem $Id: runcif.bat 11177 2009-02-06 15:50:18Z pavel.nejedly $


set PURITY_HOME=D:\DQC-5.3.1\runtime

rem preparing classpath
set CLASSPATH=
for %%I in (%PURITY_HOME%\lib\*.jar) do @call %PURITY_HOME%\bin\appendcp.bat %%I

rem echo Using CLASSPATH=%CLASSPATH%


:okJava
"D:\DQC-5.3.1\jre\bin\java" cz.adastra.cif.processor.bin.CifProcessor %*


:end

Run-Time Configuration File

<?xml version="1.0" encoding="utf-8" ?>
<runtimeconfig>
  <dataSources/>
  <pathVariables>
      <pathVariable name="MyPath" value="D:/tmp/dqc"/>
  </pathVariables>
  <runtimeComponents>
      <runtimeComponent
       class="cz.adastra.cif.processor.monitoring.file.FileLoggerComp"
       fileName="filename" stdout="true" loggingIntervalInMins="1"/>
  </runtimeComponents>
</runtimeconfig>

Top of page

x
Referring to a File Name

In the iWay DQC Plan, the Text File Reader refers to the location using:

purity://MyVariable/filename

In the iWay DQC Graphical User Interface (GUI), use the path variable as follows. The first image shows the file name in the File Name field for the Text File Reader.

File Name field for Text File Reader

The next image shows the DQC Explorer tree.

DQC Explorer tree

To directly refer to a file name, instead of using folder navigation, use the following syntax:

purity://MyFileVariable/

iWay Software