- 5 minutes to read

Event Directions

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.

Reference

Value Event Direction Where the event is logged
null Default Not set
17 ExternalIncoming Incoming message, before a one-way receive port processes it
21 ExternalIncomingRequest Incoming request, before a request-response receive port processes it
25 ExternalIncomingResponse Outgoing response, after a request-response receive port processed it
18 ExternalOutgoing Outgoing message, after a one-way send port processed it
22 ExternalOutgoingRequest Outgoing request, after a request-response send port processed it
26 ExternalOutgoingResponse Incoming response, after a request-response send port received it
33 InternalIncoming Incoming message, after a one-way receive port processed it
34 InternalOutgoing Outgoing message, before a one-way send port processes it
65 ProcessIncoming Incoming message to a function, workflow, or orchestration
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.12)
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.

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)
  • 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: the Endpoint Direction describes the Endpoint, the Event Direction describes the position in the process. The examples show both.

Use Event Directions in Log Views

For filtering in Log Views, you can search and group Log Events 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)
Animated walkthrough: a Log View 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, 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)
The Event Direction clause in a Log View; 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)
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)
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
Incoming -1 17 + 21 + 33 + 65 All messages with any type of incoming direction
Outgoing -2 18 + 22 + 34 + 66 All messages with any type of outgoing direction
Request -4 21 + 22 All messages with any type of request direction
Response -8 25 + 26 All messages with any type of response direction
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
Internal -32 33 + 34 All internal messages. For BizTalk: after the Receive Port and before the Send Port
Process -64 65 + 66 All messages for a process direction. For BizTalk: every event related to an Orchestration
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
External Incoming -17 External and Incoming Messages that are both external and incoming
External Outgoing -18 External and Outgoing Messages that are both external and outgoing

Examples

File transfer

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

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:

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

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

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.

Next Steps