Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

A callback is information feedback from, for example, a system, after a particular task finishes.

For example, in the context of XTM connectors and client third-party CMSs, as soon as you send a request via the XTM connector, it creates a project and sends the source file to XTM Cloud via the API. After a particular job/project finishes, XTM Cloud sends a callback to the XTM connector about the task that has finished in XTM Cloud. Then, the XTM connector will take the generated target file for each individual job, download it and upload it to the client’s CMS, for each individual language.


Available callbacks

11 different project callbacks can be set up by the XTM Support team at the client’s request:

  1. Analysis finished → A callback is sent when analysis of the entire project is completed in XTM Cloud.

  2. Project finished → A callback is sent when the entire project has been finished in XTM Cloud.

  3. Workflow transition → A callback is sent when an active workflow step has changed in the project’s workflow.

  4. Job finished → A callback is sent when an individual XTM Cloud job has been finished in a project.

  5. Invoice status changed → A callback is sent when the status of the project’s purchase order has changed.

  6. Project created → A callback is sent when a project has been created in XTM Cloud.

  7. Project accepted → A callback is sent when a project has been accepted in XTM Cloud.

  8. Source file updated (since v.13.8) → A callback is sent when at least one of the project’s source files has been updated in XTM Cloud (either a new one has been added or an old one has been updated).

  9. Project activity changed (since v.13.8) → A callback is sent when the project’s activity has changed; for example, from ACTIVE to ARCHIVED, from ARCHIVED to DELETED, and so on (the activity parameter in the project table).

  10. Project language changed (since v.13.8) → A callback is sent when at least one of the project’s target languages has been updated (either a new one added or an old one deleted).

  11. Due date changed (since v.13.8) → A callback is sent when the project’s due date has changed.


Where can callbacks be set up?

General information

There are three levels which we can set up API callbacks. Here, it is especially important to remember that these levels matter, in terms of priority. The levels are listed below, with the first one taking precedence over the second one, and the second one over the third one.

  1. SOAP API and REST API.

  2. XTM customer.

  3. The client-properties-conf.xml file (global level) on the client’s back-end side.

XTM customer

In XTM Cloud, it is possible to configure specific XTM Cloud customer IDs. Then, specific callbacks will be only sent for those customers.

To configure project callbacks on the XTM customer level, raise such request to the XTM International Support team.

IMPORTANT!

It is not possible to send the same two callbacks to different endpoints in the XTM Cloud customer configuration. Only the first one will be sent. The second one will be discarded.

client-properties-conf.xml

The second level is the application of callbacks directly in your client-properties-conf.xml file on the back-end side, which makes those callbacks apply globally on your XTM instance.

As in the case with project callbacks set up on the XTM Cloud customer level, to configure project callbacks on the global level, raise such request to the XTM International Support team.

API

This section will show you how to set callbacks via the API (the so called project level).

SOAP API

The following are SOAP API methods that include project callbacks:

  • createProjectForPMMTOM,

  • createProjectForPMURL,

  • createProjectMTOM,

  • createProjectURL.

In the SoapUI tool, set callbacks that you want to receive in the projectCallback section, contained within one of the SOAP API methods listed above, as shown below:

<projectCallback>
	<!--Optional:-->
	<analysisFinishedCallback>https://eohculpk0iygftq.m.pipedream.net</analysisFinishedCallback>
    <!--Optional:-->
    <jobFinishedCallback>https://eohculpk0iygftq.m.pipedream.net</jobFinishedCallback>
    <!--Optional:-->
    <projectFinishedCallback>https://eohculpk0iygftq.m.pipedream.net</projectFinishedCallback>
    <!--Optional:-->
    <workflowTransitionCallback>https://eohculpk0iygftq.m.pipedream.net</workflowTransitionCallback>
    <!--Optional:-->
    <invoiceStatusChangedCallback>https://eohculpk0iygftq.m.pipedream.net</invoiceStatusChangedCallback>
    <!--Optional:-->
    <projectCreatedCallback>https://eohculpk0iygftq.m.pipedream.net</projectCreatedCallback>
    <!--Optional:-->
    <projectAcceptedCallback>https://eohculpk0iygftq.m.pipedream.net</projectAcceptedCallback>
    <!--Optional:-->
    <sourceFileUpdatedCallback>https://eohculpk0iygftq.m.pipedream.net</sourceFileUpdatedCallback>
    <!--Optional:-->
    <projectActivityChangedCallback>https://eohculpk0iygftq.m.pipedream.net</projectActivityChangedCallbac>
    <!--Optional:-->
    <projectLanguageChangedCallbac>https://eohculpk0iygftq.m.pipedream.net</projectLanguageChangedCallbac>
    <!--Optional:-->
    <dueDateChanged>https://eohculpk0iygftq.m.pipedream.net</dueDateChanged>
</projectCallback>

REST API

The following are REST API methods that include project callbacks:

In the Body section, set them as a form-data in the Postman tool, like in the screenshot below:

Screenshot_13.png

Multi-callbacks feature in REST API and the client-properties-conf.xml file

There is a feature that enables you to provide multiple URLs for a single type of callback in:

Setting up

Set the callbacks in the Body section as a form-data, in the Postman tool, like in the screenshot below:

IMPORTANT!

This feature is compatible with the previous method for providing callbacks AS LONG AS THEY ARE NOT MIXED (i.e. callbacks.analysisFinishedCallback and callbacks.analysisFinishedCallbacks[0].url) in one request for a single type of callback.

  • No labels