23 August 2013

1. Overview

The ENOVIA client part of TIF is needed inside the ENOVIA application server in order to be able to create integration jobs (for example as a result of some event that been triggered).

The ENOVIA client is installed via the automated installer as described in the chapter Installing the ENOVIA Client.

Creation of integration jobs is typically done via registration of a trigger onto some event, for example promotion of a Part into Released state or releasing an ECO.

2. Create Jobs

You can trigger a job manually from the ENOVIA-MQL™ client like this example shows

execute program TIFTrigger -method newJob 1.2.3.4 tvc:jobcfg/NAME_OF_CONFIG.xml;
  • 1.2.3.4 is an ENOVIA object identifier

  • You may for configurations in the default namespace omit the prefix tvc:jobcfg/

The jobs invoked in this manner are executed asynchronously, which is the normal usage pattern. If you need to invoke jobs in a synchronous way, please read this document.

The TIFTrigger.newJob method supports the following arguments

Argument No Required Description

1

Yes

The object ID

2

Yes

The job configuration name

3

No

The queue. May be omitted, but if you intend to pass additional arguments then you need to specify the queue. Use an empty string to refer to the default queue

4

No

Addional arguments. Use format`name=value`.

Example:

execute program TIFTrigger -method newJob 1.2.3.4 tvc:jobcfg/NAME_OF_CONFIG.xml "" "test1=123" "test2=456";

2.1. Exclusive Mode

It is possible to configure that a job should be created exclusivelly, meaning that the job will only be created IF there are no other uncompleted job triggered with the same combination of object id and job configuration. In some cases you may have triggers that would create a lot of TIF jobs within a short time period and thus cause ENOVIA to "spam" other systems with data. The exclusive mode setting may help you to prevent creating multiple jobs for the same object / job combination.

To use the exclusive mode, one will need to invoke the method newExclusiveJob instead like below:

execute program TIFTrigger -method newExclusiveJob 1.2.3.4 tvc:jobcfg/NAME_OF_CONFIG.xml;

By default if this method is invoked, it will prevent creating a new job IF there is one job already having the same object-id/job-config combination and be in either the Create, Waiting or In process states.

Although, the TIF client can be configured via TVC init parameters, e.g you can via properties defined in either tvc.properties or via TVC-servlet-init parameters. By so, you can configure the exclusive mode setting for jobs created in a certain queue OR for a certain job type.

tif.client.exclusiveMode.default = <VALUE>
tif.client.exclusiveMode.queue.<NAME OF QUEUE> = <VALUE>
tif.client.exclusiveMode.job.<NAME OF JOB> = <VALUE>

The default behavior can be configured. Default is exclusive. Secondly, you can configure this per queue. However, if the job has a matching configuration that will be used

The value of such property may have one of the following values:

Value Description

0

Non Exclusive

1

Exclusive

3

Exclusive, but do not include the "In Process" state when searching for jobs

5

Exclusive, but only among the jobs in the same queue as the job that is requested to be created

7

Same as 5 but do not include the "In Process" state when searching for jobs

Below is an example configuration:

/WEB-INF/classes/tvc.properties
tif.client.exclusiveMode.default = 0
tif.client.exclusiveMode.queue.My\ Queue = 3
tif.client.exclusiveMode.job.ReleaseECO.xml = 5
tif.client.exclusiveMode.job.ReleasePart.xml = 5

2.2. Pickup Delay

It is possible to configure pickup delay for jobs created in a certain queue OR for a certain job type via TVC init parameters, similarly as exclusive mode. In practice, the queue listener reacts on created jobs with delay by not picking up jobs before the configured time has elapsed.

The pickup delay works well in combination with exclusive jobs to prevent for example triggers from creating duplicate jobs.

tif.client.pickupDelay.queue.<NAME OF QUEUE> = <PICKUP DELAY IN SECONDS>
tif.client.pickupDelay.job.<NAME OF JOB> = <PICKUP DELAY IN SECONDS>
Pickup delay is configured in seconds.

You can configure pickup delay per queue. However, if the job has a matching configuration that will be used.

If there is pickup delay configured in queue listener settings, that will override the settings configured via TVC init parameters. See more about queue configuration from ENOVIA Connector part of the documentation.