TIF ENOVIA/3DExperience Connector - Miscellaneous

Source Object Info

A job can be associated with a context object from the ENOVIA/3DEXPERIENCE database. For this purpose there is also an extra field on the Job entity within TIF that holds a Source Object Info value, which is a string describing the source object.

Within the Administration UI, this field is typically presented like below:

source object info
Figure 1. Source Object Info

This source object info value can be generated by configuring some rules in the Job configuration like below:

<Job>
    <Name>Part Basic</Name>

    <SourceObjectInfo>
        <Text>TEST:</Text>
        <Basic>type</Basic>
        <Basic>name</Basic>
        <Text>, status:</Text>
        <Basic>current</Basic>
        <Text>, Weight:</Text>
        <Attribute>Weight</Attribute>
        <!-- or: <Select>attribute[Weight]</Select> -->
    </SourceObjectInfo>
</Job>

The different elements supported are:

<Text>

For static text

<Basic>

For basic select statements in ENOVIA/3DEXPERIENCE such as type, name, revision, current, policy, vault, owner.

<Attribute>

Attributes on the object

<Select>

For arbitrary select statements

Another option is to use a custom handler like illustrated below.

<Job>
    <Name>Part Basic</Name>
    <SourceObjectInfo className="com.technia.tif.enovia.job.impl.SourceObjectDescriberFromJobParam"                       jobParam="nameOfParam" />
</Job>

The class name used, must implement the interface com.technia.tif.enovia.job.SourceObjectDescriber. The example above is an example implementation, which is capable of resolving the value from a job parameter.

Job Macros

In many places one can use macros that during runtime are resolved to real values. Depending on the context the possible macros varies, but in general, the table below illustrates the syntax of the macros and what they are resolved to.

Macro Descriptions

${job.id}

Resolves the id of the current job

${destination.id}

Resolves the id of the current destination (if available)

${payload.name}

Resolves the name of the current payload (if available)

${tif.instance.id}

The ID of the TIF instance

${tif.setting.ABC}

A setting from TIF named ABC

${system:AAA}

A Java system parameter named AAA

${secret:NameOfTheSecret}

The value for the secret key with name NameOfTheSecret stored in TIF

${job.enoviauser}

The ID of the ENOVIA/3DEXPERIENCE user

${job.source.id}

The ID of the source object in ENOVIA/3DEXPERIENCE which the job relates to

${job.source.type}

The TYPE of the source object in ENOVIA/3DEXPERIENCE which the job relates to

${job.source.name}

The NAME of the source object in ENOVIA/3DEXPERIENCE which the job relates to

${job.source.revision}

The REVISION of the source object in ENOVIA/3DEXPERIENCE which the job relates to

${job.source.current}

The CURRENT STATE of the source object in ENOVIA/3DEXPERIENCE which the job relates to

${job.java.CLASSNAME:KEY}

CLASSNAME is a class implementing com.technia.tif.enovia.job.EnoviaJobMacroResolver

Example:

${job.java.a.b.c.TheResolver:the-key}
package a.b.c;

public class TheResolver implements com.technia.tif.enovia.job.EnoviaJobMacroResolver {
    public String resolve(EnoviaJob job, String key) {
        return "foo";
    }
}
The class is only instantiated once and later reused to improve performance.

${job.source.selectexpression}

A custom select expression that is selected on the source object.

Note that this results in extra DB calls.

${job.rpe.ABC}

The ENOVIA/3DEXPERIENCE RPE variable named ABC as set when the job was initiated

${rpe:ABC}

Same/alternative format to access RPE variable as above.

${job.param.ABC}

The parameter named ABC as specified when the job was initiated

Secrets/Passwords

In many places where a password is configured in a configuration file, such as in the destinations.xml file or similar, the password can be defined in a non-clear-text format. There are some different ways how to encrypt the value and how to declare the encrypted value in the configuration file. Once the value is encrypted, the value must be prefixed correctly.

The valid prefixes are:

  • secret

    • Resolves to a secret stored in the TIF DB via the Admin UI.

  • enovia

    • For passwords encoded with a MQL client prior to version 19xHF2

  • enovia-19x

    • For passwords encoded with a MQL client between the version 19xHF2 and 20x

  • enovia-21x

    • For passwords encoded with a MQL client of version 2021x or later.

  • b64

    • Base64 encoded string

  • b32

    • Base32 encoded string

  • plain

Some examples:

secret:The name of the secret variable
enovia:=ne4wGNWRarkZP65/2EywBZx8vqHEmBQ=
plain:NotSoSecret

The enovia encryption is made from within the MQL client using the "mql encrypt" command as shown below.

<MQL> encrypt password the_password_to_be_encrypted;

If you ran the mql encrypt command in a release between 19x-HF2 and 20x then you must use the prefix enovia-19x.

If you ran it in 21x or later, then use enovia-21x as prefix.