Support objects - Introduction

Last modified by Erik Bakker on 2024/08/19 22:05

While building your flow in eMagiz, you’ll encounter a variety of support objects that enhance the functionality of your components. These support objects play crucial roles in areas like connectivity, authentication, file handling, and more. In this microlearning, we’ll introduce you to the concept of support objects and explore a few key examples to illustrate their purpose and utility. This overview will help you understand how these elements can streamline and strengthen your integration flows.

Should you have any questions, please contact academy@emagiz.com.

1. Prerequisites

  • Basic knowledge of the eMagiz platform

2. Key concepts

This microlearning focuses on support objects.

With support objects, we mean: Component that help the functional components do the work they are supposed to do

3. Support objects Introduction

Apart from having components in the flow editor that ensure the message is received, validated, transformed, and sent, you can also use so-called support objects while building your flow.
There are many support objects in various categories. As this is an introduction, we are not going to discuss all of them in detail.

Support objects can be linked to a functional component to aid the working of that component. Some areas in which a support object could help:

  • Connectivity (i.e. JDBC, FTP, SFTP)
  • Authentication (i..e Basic, OAuth2.0, Metacom, Azure)
  • Headers (i.e., XPath expression)
  • Message Format Transformation (i.e., JSON result factory, JSON result transformer, JSON source factory)
  • Security (i.e., Merlin crypto, WSS4J Security Interceptor, WS-addressing action callback)
  • File handling (i.e., Composite file list filter, FTP composite file list lifter)

Aside from the areas mentioned above, other less frequently used support objects for particular cases exist.

Support objects are not displayed on the flow designer but have a particular place within the right panel. Here you can view, add and edit support objects.

crashcourse-platform-create-support-objects-introduction--support-objects-location.png

In the remainder of this microlearning, we will zoom in on two of these support objects as illustrative examples of what all support objects conceptually do for you.

3.1 File handling

When retrieving (pulling) files from a specific directory, you might want to determine criteria based on which you will either retrieve (or not retrieve) the files in that directory.
To register such a list, you can add a support object called a Composite file list filter.

crashcourse-platform-create-support-objects-introduction--composite-file-list-filter-selection.png

Opening the support object will give you the following pop-up. In this pop-up, you have a myriad of options you can use for filtering files.

crashcourse-platform-create-support-objects-introduction--composite-file-list-filter-pop-up.png

The combination that is most used and is effective in most cases becomes a best practice within eMagiz when using this filter option to retrieve files.
This combination is:

  • Regular files only filter
  • Size list filter (minimum bytes is 1, maximum bytes is 1048575)
  • Age file list filter (minimum age is 10000)
  • Simple pattern file list filter (property reference)

crashcourse-platform-create-support-objects-introduction--composite-file-list-filter-pop-up-filled-in.png

By ordering the filters in this way, you make optimal use of the functionality in eMagiz and ensure that every time you check for new files, all new and existing files will get another shot.

If you use other filter options or start mixing up the order of filter options, a file could get stuck in limbo.

This way, a file that has been checked previously will not be processed anymore (even though it would have passed the second time around).

This behavior is the direct consequence of an internal list being kept on the flow level (in cache). This internal list references all files that have been checked before.
Once you are on the list and try to enter again, eMagiz will deny you access.

An example of a filter option with memory is the Accept Once option. As the name suggests, this will only allow a file once.
If this is the first thing you check for (before other checks) and the further checks fail the first time around, eMagiz will never retrieve the file anymore because the file is already on the list.

So be careful experimenting with this one without consulting another team member.

To ensure that your file inbound channel adapter considers the filter, you have to link the support object to the file inbound channel adapter.

crashcourse-platform-create-support-objects-introduction--link-to-file-inbound-channel-adapter.png

3.2 Authentication

Almost all cases, some form of Authentication is needed when calling a REST web service. One type of Authentication is Basic Authentication.
This is the most straightforward form of Authentication and the least complex one. To ensure that the Authentication is sent correctly to the REST web service, you can use a support object in eMagiz called a REST Template.

crashcourse-platform-create-support-objects-introduction--rest-template.png

Opening the support object will give you the following pop-up. This pop-up has several options that could add authorization to your call to the HTTP endpoint.

crashcourse-platform-create-support-objects-introduction--rest-template-pop-up.png

For now, we will focus on the Basic access authorization.
After you select this option, you can fill in property references to the username and password you need to execute the basic Authentication.

crashcourse-platform-create-support-objects-introduction--rest-template-basic-access.png

crashcourse-platform-create-support-objects-introduction--rest-template-basic-access-filled-in.png

After saving this setting, you will see that an Interceptor has been added to the REST Template.

crashcourse-platform-create-support-objects-introduction--rest-template-input.png

You can press Save here; the only thing remaining to make it work in combination with the HTTP outbound gateway is to link it to the HTTP outbound gateway.

crashcourse-platform-create-support-objects-introduction--link-to-http-outbound-gateway.png

4. Key takeaways

  • Support objects help other functional components in executing their functional
  • Support objects can help in various categories
  • Each support object has a specific task and uses a case

5. Suggested Additional Readings