---
title: Event Direction Values (EventDirection) for Nodinite Log Events
description: "Reference for the optional EventDirection field of a Nodinite Log Event: every value, where in the process each one applies (before or after the port, inside the process), the combinations you can filter on in Log Views, and examples."
---

# :fa-arrows-left-right: Event Directions

[EventDirection][JSON Log Event - EventDirection] is an **optional** number in a [Log Event][]. It tells where in the process the event was logged: before or after the port, or inside the workflow. With it, [Log Views][] can tell the same message apart before and after port or workflow processing, which gives you end-to-end logging and message tracking.

## :fa-table: Reference

| Value | Event Direction | Where the event is logged |
| --- | --- | --- |
| <span id="event-direction-null"></span>`null` | Default | Not set |
| <span id="event-direction-17"></span>`17` | ExternalIncoming | Incoming message, before a **one-way** receive port processes it |
| <span id="event-direction-21"></span>`21` | ExternalIncomingRequest | Incoming **request**, before a request-response receive port processes it |
| <span id="event-direction-25"></span>`25` | ExternalIncomingResponse | Outgoing **response**, after a request-response receive port processed it |
| <span id="event-direction-18"></span>`18` | ExternalOutgoing | Outgoing message, after a **one-way** send port processed it |
| <span id="event-direction-22"></span>`22` | ExternalOutgoingRequest | Outgoing **request**, after a request-response send port processed it |
| <span id="event-direction-26"></span>`26` | ExternalOutgoingResponse | Incoming **response**, after a request-response send port received it |
| <span id="event-direction-33"></span>`33` | InternalIncoming | Incoming message, after a **one-way** receive port processed it |
| <span id="event-direction-34"></span>`34` | InternalOutgoing | Outgoing message, before a **one-way** send port processes it |
| <span id="event-direction-65"></span>`65` | ProcessIncoming | Incoming message to a function, workflow, or orchestration |
| <span id="event-direction-66"></span>`66` | ProcessOutgoing | Outgoing message from a function, workflow, or orchestration |

To get the current list for your version, call `GET /LogAPI/api/LogEvent/EventDirection` on the [Log API][]; see [Explore operations in Scalar or Swagger][].

![The Log API's Scalar page with GET /LogAPI/api/LogEvent/EventDirection, its 200 and 500 responses, a C# code snippet, and the example response (7.13)][4]  
*Scalar shows the EventDirection operation with a code snippet. The example response shows `null` for both fields because it is the schema example; **Test Request** returns the real rows of the table above.*  

## :fa-lightbulb: Choosing a value

A messaging process has many steps, some internal and some external. The Event Direction adds location semantics to the [Log Event][] (**before port**, **after port**, **inside workflow**, **inside process**), so you can log the same message at several points.

### Where in the process

For example:

* Message **before** decryption
* Message **after** decryption
* Message **before** encryption
* Message **after** encryption
* Message batch **before** a split
  * Messages **after** the split
* Flat file **before** it is translated to XML (BizTalk, IBM IIB, or another broker using flat file schemas on a **Receive Port**)
* Flat file **after** it is translated from XML (BizTalk, IBM IIB, or another broker using flat file schemas on a [Send Port][Send Ports])
* A workflow or orchestration **inside a loop** that generates new messages

### Which value to set

* For custom logging, use the **External** values for what enters or leaves your solution, the **Internal** values for the message just inside the port, and the **Process** values for messages in and out of a workflow or orchestration.
* Set the Event Direction together with the mandatory [Endpoint Direction][Endpoint Directions]: the Endpoint Direction describes the [Endpoint][Endpoints], the Event Direction describes the position in the process. The [examples](#examples) show both.

## :fa-filter: Use Event Directions in Log Views {#log-views}

For filtering in [Log Views][], you can search and group [Log Events][Log Event] on the **Event Direction**. Business users can hide internal events and see only what came in or went out (the net result), while developers see every detail of the process.

![A Log View of Contoso orders with the Direction and Event Direction columns, the Event Direction search clause set to External Outgoing, a new search, and an event's Details showing External Outgoing, animated walkthrough (7.12)][Hero]  
*Animated walkthrough: a [Log View][Log Views] of the [Order-to-Cash demo][] with both direction columns. Set the **Event Direction** clause to **External Outgoing**, search again, and open an event: its Details show the Event Direction by name.*  

A Log View has two direction columns: **Direction**, the [Endpoint Direction][Endpoint Directions], and **Event Direction**. The result shows each as an icon; an event's Details show the Event Direction by name, with its parts.

The **Event Direction** search clause is there when an Administrator has put Event Direction in the Log View's default search setup, or in **Advanced** search mode ([Log Overview][]) when the Log View offers the field. With the operator **=** you pick one value from **Select Event Direction**; with **In** you pick several from **Select Event Directions**.

![The Event Direction search clause set to External Outgoing, with Query: (Event Direction = 18) under it, next to the O2C - Order ID field (7.12)][1]  
*The **Event Direction** clause in a [Log View][Log Views]; the query under it shows the value it searches for.*  

![The Select Event Direction list with the ten Event Directions, from External Incoming (Id 17) to Process Outgoing (Id 66) (7.12)][2]  
*The ten Event Directions, each with its Id.*  

You can also filter on a combination of Event Directions, for example only the messages that entered and left your solution: ExternalIncoming (`17`) and ExternalOutgoing (`18`).

![The Select Event Directions list scrolled to the combinations, from Incoming (Id -1) to Incoming Response (Id -9) (7.12)][3]  
*The same list holds the ten values first and then the combinations, with negative Ids. It loads ten rows at a time, so scroll to see the combinations.*  

| Combination | Id | Values | Shows |
| --- | --- | --- | --- |
| <span id="combination-incoming"></span>Incoming | `-1` | `17` + `21` + `33` + `65` | **All** messages with any type of **incoming** direction |
| <span id="combination-outgoing"></span>Outgoing | `-2` | `18` + `22` + `34` + `66` | **All** messages with any type of **outgoing** direction |
| <span id="combination-request"></span>Request | `-4` | `21` + `22` | **All** messages with any type of **request** direction |
| <span id="combination-response"></span>Response | `-8` | `25` + `26` | **All** messages with any type of **response** direction |
| <span id="combination-external"></span>External | `-16` | `17` + `21` + `25` + `18` + `22` + `26` | **All** messages coming in from or going out to external systems. For BizTalk: **before** the Receive Port and **after** the [Send Port][Send Ports] |
| <span id="combination-internal"></span>Internal | `-32` | `33` + `34` | **All** internal messages. For BizTalk: **after** the Receive Port and **before** the [Send Port][Send Ports] |
| <span id="combination-process"></span>Process | `-64` | `65` + `66` | **All** messages for a **process** direction. For BizTalk: every event related to an [Orchestration][Orchestrations] |
| Incoming Request | `-5` | `21` + TBD | ⚠️ For future use; selectable in 7.12 |
| Outgoing Request | `-6` | `22` + TBD | ⚠️ For future use; selectable in 7.12 |
| Incoming Response | `-9` | `25` + TBD | ⚠️ For future use; selectable in 7.12 |
| Outgoing Response | `-10` | `26` + TBD | ⚠️ For future use; selectable in 7.12 |
| <span id="combination-external-incoming"></span>External Incoming | `-17` | External and Incoming | Messages that are both **external** and **incoming** |
| <span id="combination-external-outgoing"></span>External Outgoing | `-18` | External and Outgoing | Messages that are both **external** and **outgoing** |

## :fa-code: Examples {#examples}

### File transfer

<div class="mermaid">
graph LR
    subgraph "Source"
        roA["fa:fa-file Send file"]
    end
    subgraph "EAI solution"
        roA --> | EventDirection: 17<br/>EndPointDirection: 0 | ro1{"fa:fa-gears Process"}
    end
    subgraph "Destination"
        ro1 --> | EventDirection: 18<br/>EndPointDirection: 1 | roB["fa:fa-file Receive file"]
    end
    style roA fill:#2678BD
    style ro1 fill:#E47528
    style roB fill:#2678BD
</div>

*Event Directions in a file transfer: the external systems (blue) send and receive the file, your integration process (orange) logs `17` on the way in and `18` on the way out.*  

The incoming event of this file transfer:

```json
{
  "LogAgentValueId": 42,
  "EndPointName": "INT101: Receive Hello World Log Events",
  "EndPointUri": "C:\\temp\\in",
  "EndPointDirection": 0,
  "EndPointTypeId": 60,
  "OriginalMessageTypeName": "Hello.World.File/1.0",
  "LogDateTime": "2017-11-22T08:44:22.309Z",
  "EventDirection": 17
}
```

### API

<div class="mermaid">
graph RL
    subgraph "Source"
        roA["fa:fa-user API consumer"]
    end
    subgraph "EAI solution"
        roA --> | Request<br/>EventDirection: 21<br/>EndPointDirection: 10 | ro1{"fa:fa-gears Process"}
        ro1 --> | Response<br/>EventDirection: 25<br/>EndPointDirection: 10 | roA
    end
    subgraph "Destination"
        ro1 --> | Request<br/>EventDirection: 22<br/>EndPointDirection: 11 | roB["fa:fa-server API provider"]
        roB --> | Response<br/>EventDirection: 26<br/>EndPointDirection: 11 | ro1
    end
    style roA fill:#2678BD
    style ro1 fill:#E47528
    style roB fill:#2678BD
</div>

*Event Directions in an API integration: requests and responses between the external systems (blue) and your integration process (orange), each logged with its own Event Direction.*  

## :fa-hand-point-right: Next Steps

* :fa-code: [JSON Log Event][]  
* :fa-diamond-turn-right: [Endpoint Directions][]  
* :fa-plug: [Endpoint Types][]  
* :fa-search: [Log Views][]  

## :fa-link-horizontal: Related Topics

* :fa-bolt: [Log Event][]  
* :fa-tags: [Context Options][]  
* :fa-sign-in-alt: [Endpoints][]  
* :fa-box-archive: [Log Agents][]  
* :fa-cloud-arrow-down: [Log API][]  
* :fa-cloud-arrow-up: [Log using REST][]  

[1]:{ndm}/Documentation%20Pictures/IM/CoreServices/LogAPI/SearchEventDirection.png
[2]:{ndm}/Documentation%20Pictures/IM/CoreServices/LogAPI/SearchEventDirections.png
[3]:{ndm}/Documentation%20Pictures/IM/CoreServices/LogAPI/EventDirectionCombos.png
[4]:{ndm}/Documentation%20Pictures/IM/CoreServices/LogAPI/EventDirectionsFromScalar.png

[Context Options]:{ndr}/Core%20Services/Log%20Event/Features/Context%20Options.md
[Endpoint Directions]:{ndr}/Core%20Services/Log%20Event/Features/Endpoint%20Directions.md
[Endpoint Types]:{ndr}/Core%20Services/Log%20Event/Features/Endpoint%20Types.md
[Endpoints]:{ndr}/Repository%20Model/Endpoints/Overview.md
[Explore operations in Scalar or Swagger]:{ndr}/Core%20Services/Log%20API/Features/Log%20using%20REST.md#explore-operations
[Hero]:{ndm}/Documentation%20Pictures/IM/CoreServices/LogAPI/EventDirections_LogView.gif
[JSON Log Event]:{ndr}/Core%20Services/Log%20Event/Features/JSON%20Log%20Event.md
[JSON Log Event - EventDirection]:{ndr}/Core%20Services/Log%20Event/Features/JSON%20Log%20Event.md#eventdirection
[Log Agents]:{ndr}/Administration/1.%20Log%20Management/3.%20Log%20Agents/Features/What%20is%20a%20Log%20Agent.md
[Log API]:{ndr}/Core%20Services/Log%20API/Overview.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Log Overview]:{ndr}/Getting%20Started/2.%20Log/Overview.md
[Log using REST]:{ndr}/Core%20Services/Log%20API/Features/Log%20using%20REST.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Orchestrations]:{ndr}/Logging%20and%20Monitoring/Microsoft%20BizTalk%20Server%20-%20Monitoring/Features/Orchestrations/Overview.md
[Order-to-Cash demo]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Generate-O2C-Demo-Data.md
[Send Ports]:{ndr}/Logging%20and%20Monitoring/Microsoft%20BizTalk%20Server%20-%20Monitoring/Features/Send%20Ports/Overview.md