26 June 2020

1. Rabbit MQ

The Rabbit MQ support in TIF has been enhanced a lot as of this release. The codebase has undergone a major rewrite in order to support the new features, but also some performance improvements has been done such as better reuse of connections.

Also, the code is compiled against the latest 5.9 version of the Rabbit MQ client API. E.g. you need to use this version of the client library in case you are using Rabbit MQ. As usual, put the JAR file amqp-client-5.9.0.jar within ${TIF_HOME}/lib/custom.

Previous written handlers / message receivers that uses Rabbit MQ, need to be recompiled to ensure that they work correctly. Although the intention is that the public API / extension points in TIF remains the same, there might be some side effect due to change of the client version.

1.1. Reply Handler

You can now utilize the reply handler concept in TIF together with Rabbit MQ in order to receive/handle replies to messages being sent out.

The job configuration may be configured like below. Note, if the replyTo attribute is present - the job will stay in state "Waiting for Reply" and thus you also need the reply handler to handle the replies.

<Job>
    <Name>Part BOM</Name>
    <TransferData>
    	<Payload>tvc:payload/PartBOM.xml</Payload>
    	<Destinations>
            <RabbitMQ id="rabbitmq-exchange-1"
                      routingKey="rk2"
                      replyTo="EXCHANGE-2" />
    	</Destinations>
    </TransferData>
</Job>

Reply handler example with RabbitMQ connection:

<ReplyHandler>
    <Source>
        <RabbitMQ id="rabbitmq-exchange-2" />
    </Source>
    <StatusEvaluator><![CDATA[
        function evaluate(ctx) {
            ...
            var succeeded = ...;
            var message = "...";

            ctx.setResult(succeeded, message);
        }
    ]]></StatusEvaluator>
</ReplyHandler>

See this chapter for more details.

1.2. Destination Enhancements

The RabbitMQ destination of a Job has been enhanced to allow configuring a number of aspects related to publishing a AMQP message. You can for example now configure these properties:

  • Reply To - Specifies exchange name to leave replies on

  • Correlation ID - Used to correlate messages in TIF

  • Routing Key - Control the routing of the message by resolving routing keys dynamically or statically.

  • Type - Define type of message

  • Priority - Message priority

  • Delivery Mode - Persistent / Non persistent delivery mode

  • User ID - Map a user to message

  • Application ID - Specify application

See this chapter for more details.

2. Payload storage information visible in Admin UI

The Admin UI now shows the total size of persisted payloads on service level. The information is shown in the service list and also displayed as a pie chart in the Performance view.

image
Figure 1. Information in the service list
image
Figure 2. Information in Performance view

The information is updated periodically by a scheduled task called "payloadStatsUpdater". It is not guaranteed to be real-time. The schedule can be adjusted in ${TIF_ROOT}/modules/enovia/etc/module.custom.properties.

By default, the information is updated hourly.

For example:

${TIF_ROOT}/modules/enovia/etc/module.custom.properties
payloadStatsUpdater.enabled=true
payloadStatsUpdater.execute=0 45 0-23 * * ?

3. Trigger a new Job via REST

You can configure new REST end points, which can be used to trigger running a new job for a particular object / objects or context-less.

See REST configuration example below.

<Rest>
    <DisplayName>Create New Job</DisplayName>
    <ServiceName>create-new-job-from-rest</ServiceName>
    <IdLocator type="tnr">
        <Setting name="allowWildcards" value="false" />
    </IdLocator>
    <NewJob config="MyJobConfiguration.xml" async="true" /> (1)
</Rest>
1 The configuration element that defines to run a new job using the specified configuration. The async flag is per default true and means that caller wont wait for the job to complete.

Then, the client can trigger running new jobs via REST call. See example below:

curl -X POST https://server.acme.com/tif/jaxrs/service/create-new-job-from-rest/Part/EV-000001/A

4. Fixed Bugs

Below is the list of fixed bugs as of this release.

Issue No Description

717

Admin UI - Payload from a custom Apache CXF REST service were not logged correctly

707

TIF ENOVIA/3DExperience Client installer failed with Java 11

713

TIF failed to start with Java 11 due to removed libs from the JDK

718

Config editor crashes if unknown file were opened

724

Custom webservice returned wrong HTTP status code on exception

723

Service names are not visible in new TIF Admin UI