---
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."
---

# <i class="fal fa-arrows-left-right" aria-hidden="true"></i> 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.

## <i class="fal fa-table" aria-hidden="true"></i> 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.*  

## <i class="fal fa-lightbulb" aria-hidden="true"></i> 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.

<h2 id="log-views"><i class="fal fa-filter" aria-hidden="true"></i> Use Event Directions in Log Views</h2>

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** |

<h2 id="examples"><i class="fal fa-code" aria-hidden="true"></i> Examples</h2>

### 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.*  

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-code" aria-hidden="true"></i> [JSON Log Event][]  
* <i class="fal fa-diamond-turn-right" aria-hidden="true"></i> [Endpoint Directions][]  
* <i class="fal fa-plug" aria-hidden="true"></i> [Endpoint Types][]  
* <i class="fal fa-search" aria-hidden="true"></i> [Log Views][]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-bolt" aria-hidden="true"></i> [Log Event][]  
* <i class="fal fa-tags" aria-hidden="true"></i> [Context Options][]  
* <i class="fal fa-sign-in-alt" aria-hidden="true"></i> [Endpoints][]  
* <i class="fal fa-box-archive" aria-hidden="true"></i> [Log Agents][]  
* <i class="fal fa-cloud-arrow-down" aria-hidden="true"></i> [Log API][]  
* <i class="fal fa-cloud-arrow-up" aria-hidden="true"></i> [Log using REST][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/CoreServices/LogAPI/SearchEventDirection.png
[2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/CoreServices/LogAPI/SearchEventDirections.png
[3]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/CoreServices/LogAPI/EventDirectionCombos.png
[4]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/CoreServices/LogAPI/EventDirectionsFromScalar.png

[Context Options]:https://docs.nodinite.com/core-services/log-event/features/context-options/
[Endpoint Directions]:https://docs.nodinite.com/core-services/log-event/features/endpoint-directions/
[Endpoint Types]:https://docs.nodinite.com/core-services/log-event/features/endpoint-types/
[Endpoints]:https://docs.nodinite.com/repository-model/endpoints/overview/
[Explore operations in Scalar or Swagger]:https://docs.nodinite.com/core-services/log-api/features/log-using-rest/#explore-operations
[Hero]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/CoreServices/LogAPI/EventDirections_LogView.gif
[JSON Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[JSON Log Event - EventDirection]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/#eventdirection
[Log Agents]:https://docs.nodinite.com/administration/log-management/log-agents/features/what-is-a-log-agent/
[Log API]:https://docs.nodinite.com/core-services/log-api/overview/
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Log Overview]:https://docs.nodinite.com/getting-started/log/overview/
[Log using REST]:https://docs.nodinite.com/core-services/log-api/features/log-using-rest/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Orchestrations]:https://docs.nodinite.com/logging-and-monitoring/microsoft-biztalk-server-monitoring/features/orchestrations/overview/
[Order-to-Cash demo]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/
[Send Ports]:https://docs.nodinite.com/logging-and-monitoring/microsoft-biztalk-server-monitoring/features/send-ports/overview/