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

Scalar showing the GET /LogAPI/api/LogEvent/EventDirection operation (7.10)
Scalar shows the EventDirection operation with a code snippet and an example response.

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.

Searching on Event Direction in a Log View
Event Direction used as a search filter in a Log View.

Log Events filtered on Event Direction
Log Events filtered on Event Direction for targeted analysis.

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

Valid combinations of Event Directions in a Log View
The combinations of Event Directions you can select in Log Views.

Combination Values Shows
Incoming 17 + 21 + 33 + 65 All messages with any type of incoming direction
Outgoing 18 + 22 + 34 + 66 All messages with any type of outgoing direction
Request 21 + 22 All messages with any type of request direction
Response 25 + 26 All messages with any type of response direction
External 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 33 + 34 All internal messages. For BizTalk: after the Receive Port and before the Send Port
Process 65 + 66 All messages for a process direction. For BizTalk: every event related to an Orchestration
Incoming Request 21 + TBD ⚠️ For future use
Outgoing Request 22 + TBD ⚠️ For future use
Incoming Response 25 + TBD ⚠️ For future use
Outgoing Response 26 + TBD ⚠️ For future use

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