Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ The [import mapping](/refguide/import-mappings/) defines how to transform the XM

### Input Content Type

If the import mapping is based on a [message definitions](/refguide/message-definitions/), it can import both XML and JSON. Select whether the input object contains XML or JSON.
If the import mapping is based on a [message definition](/refguide/message-definitions/), it can import both XML and JSON. Select whether the input object contains XML or JSON.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there is no collection document, do we need to remove the plural format in the ref guide link? message-definitions to message-definition

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will the UI appear in Studio Pro? When a user is adding one to their app (following right-click > Add other), does it appear as "Message defintion" or "Message defintions" in the menu? We suggest matching the UI. However, keep in mind that if we change the URL to /refguide/message-definitions/, this will need to be updated if the link is hard coded in Studio Pro.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new UI will show singular but since I know that changing URLs is a painful, my suggestion is to keep it as it is!


### The Input Contains

If the import mapping is based on a [message definitions](/refguide/message-definitions/), it can import both single objects and lists. Select whether the input is a single object or a list of objects.
If the import mapping is based on a [message definition](/refguide/message-definitions/), it can import both single objects and lists. Select whether the input is a single object or a list of objects.

### If No Object Was Found

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,62 +12,35 @@ Message definitions define the structure of the messages that are sent from and

A message definition can be used for both JSON and XML and can be used for both single objects and lists of objects.

## Adding a Message Definitions Document
## Adding a Message Definition Document

Message Definitions is a type of document you can add to modules in your app.
A message definition is a type of document you can add to modules in your app. Each document contains a single message definition.

To add a message definitions document, do the following:
To add a message definition document, do the following:

1. Right-click your module or a folder within a module.
2. Choose **Add other > Message definitions**.
3. Give your message definitions a name and click **OK**.
2. Choose **Add other > Message definition**.
3. Give your message definition a name and click **OK**.

## Managing Message Definitions

The message definition document shows a list of message definitions.

Here you can do the following:

* **Add** a new [message definition](#message-definition)
* **Edit** an existing message definition
* **Delete** an unwanted message definition
* **Find usages** of a message definition
* **Generate mapping(s)…** from a message definition (see below)

### Generate Mapping(s)…

The **Generate mapping(s)…** button allows you to generate import and/or export mapping documents from the selected message definition. The mappings are added to your module.

To generate mappings, do the following:

1. Select the message definition you want to use.
2. Click **Generate mapping(s)…**.
3. Ensure that the required mapping (or mappings) is selected.
4. Click **OK**.

{{< figure src="/attachments/refguide/modeling/integration/message-definitions/generate-mappings.png" alt="General mappings dialog" class="no-border" width="400" >}}
The name of the document is the name of the message definition.

## Defining a Message Definition{#message-definition}

In the message definitions document, click **Add** to create a new message definition or **Edit** to edit an existing message definition.
To define a message definition, open its document.

### General

The message definition is defined in the **General** tab.

{{< figure src="/attachments/refguide/modeling/integration/message-definitions/message-definition.png" alt="The Message Definition General tab" class="no-border" width="750" >}}

#### Name

The name of the message definition.

#### Entity

An entity in your app domain model (or models) on which to base the message definition. Using this message definition, you can export and import individual objects and lists of objects of this entity type.Ω
An entity in your app domain model (or models) on which to base the message definition. Using this message definition, you can export and import individual objects and lists of objects of this entity type.

#### Structure

The structure tree shows the attributes and some of the associations of the entity. Use the **Filter** to find specific attributes.
The structure tree shows the attributes and some of the associations of the entity. Use **Search** to find specific attributes.

| Column | Description | Can edit? | Notes |
| --- | --- | :---: | --- |
Expand All @@ -77,9 +50,21 @@ The structure tree shows the attributes and some of the associations of the enti
| Occurrence | How many times this item can occur for each parent item. | n | |
| External Name | The name of the XML node or the JSON property. | y | By default, the name of the attribute or (for associations) entity.<br />For a `0..*` occurrence, a letter `s` is added. |
| External Single Item Name | The XML node that represents a single item. | y | Only relevant for XML when the occurrence is `0..*`<br /> By default, the entity name. |
| Example value | A typical value for an attribute. | y | For a published REST service, this value shows up in the [interactive documentation](/refguide/published-rest-services/#interactive-documentation).<br />A date/time value is specified in the format `year-month-day` or `year-month-day hour:minute:second`. |
| Example Value | A typical value for an attribute. | y | For a published REST service, this value shows up in the [interactive documentation](/refguide/published-rest-services/#interactive-documentation).<br />A date/time value is specified in the format `year-month-day` or `year-month-day hour:minute:second`. |
| Public Documentation | Additional information to be displayed in the [interactive documentation](/refguide/published-rest-services/#interactive-documentation). | y | |

#### Generate Mapping(s)…

The **Generate mapping(s)…** button allows you to generate import and/or export mapping documents from the message definition. The mappings are added to your module.

To generate mappings, do the following:

1. Click **Generate mapping(s)…**.
2. Ensure that the required mapping (or mappings) is selected.
3. Click **OK**.

{{< figure src="/attachments/refguide/modeling/integration/message-definitions/generate-mappings.png" alt="Generate mappings dialog" class="no-border" width="400" >}}

### Documentation

Use the **Documentation** tab to describe what the message definition is used for.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.