Wiki source code of Flow Editor - Components

Last modified by Carlijn Kokkeler on 2024/02/27 15:32

Show last authors
1 {{container}}{{container layoutStyle="columns"}}(((
2
3 Not all flows in the flow editor are completely pre-built yet and do require changes made by you.
4 In this microlearning, we will focus on getting to know the various types of components that are at your disposal while creating/editing a flow and illustrate what those types are based on some examples.
5
6 Should you have any questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]].
7
8 == 1. Prerequisites ==
9
10 * Basic knowledge of the eMagiz platform
11
12 == 2. Key concepts ==
13
14 This microlearning focuses on the components in the flow editor.
15
16 == 3. Flow Editor Components ==
17
18 Not all flows in the flow editor are completely pre-built yet and do require changes made by you.
19 Therefore we would like to walk you through the various types of components that you can use to edit your flow:
20
21 * Inbound (Input)
22 * Outbound (Output)
23 * Transformation (Change)
24 * Splitter (Change)
25 * Filter (Decision)
26 * Router (Decision)
27 * Support (Help)
28
29 To connect each of these components you use channels that connect one component to another component.
30
31 === 3.1 Inbound ===
32
33 All inbound components represent the input of your flow (i.e. the starting point). Inbound components can be identified through the green color of the components
34
35 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--inbound-components.png]]
36
37 Via these components, the flow either **receives** or **retrieves** data from an external source. The inbound components most frequently used are:
38
39 * JMS Message-Driven Channel Adapter
40 * HTTP Inbound Gateway
41 * Web service Inbound Gateway
42 * File inbound channel adapter
43 * Kafka message-driven channel adapter
44
45 We will not discuss each of them in detail here but all of them receive or retrieve data from an external source.
46 The JMS Message-Driven Channel Adapter for example **receives** messages placed on a certain queue. The HTTP Inbound Gateway **receives** messages every time someone calls your endpoint.
47 The file inbound channel adapter **retrieves** messages from a specific location.
48
49 === 3.2 Outbound ===
50
51 All outbound components represent the output of the flow (i.e. the endpoint). Outbound components can be identified through the white color with a green border.
52
53 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--outbound-components.png]]
54
55 Via these components, the flow either **sends** or **retrieves** data to/from an external source. The outbound components most frequently used are:
56
57 * JMS outbound channel adapter
58 * HTTP Outbound Gateway
59 * Web service Outbound Gateway
60 * File outbound channel adapter
61 * Kafka outbound channel adapter
62
63 As you can see, the list is pretty similar, and when you make the correct design decisions most of these are already placed on the canvas and you only need to fill in the details at most.
64 The JMS outbound channel adapter for example **sends** messages to a certain queue.
65 The HTTP outbound gateway **sends** or **retrieves** (based on the operation) messages from an external source by calling an endpoint.
66 The Kafka outbound channel adapter **sends** data to a topic.
67
68 === 3.3 Transformation ===
69
70 All standard transformations as created as part of the message mapping in Design are automatically transferred and correctly linked to the flow in Create. So that is easy.
71 In all other cases, you will have to add a transformation component to the flow. These components are identified as blue rectangles in eMagiz
72
73 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--transformation-components.png]]
74
75 The two most often use cases of a transformation component are:
76
77 * XSLT Transformer (Using the message mapping in Design)
78 * Standard Header enricher
79
80 We will talk more about the former later in this course.
81 The latter gives you the option to add pieces of metadata to the data that you are processing (i.e. where does it come from, what is it about, where should it go to).
82 To do so you can add a Custom header with name and value to the standard enricher component that will be stored on the message level.
83
84 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--standard-header-enricher-component.png]]
85
86 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--standard-header-enricher-component-name-value.png]]
87
88 Some other transformation components that are used are:
89
90 * Flat file to XML transformer
91 * XPath header enricher
92 * Standard Transformer
93
94 === 3.4 Splitter ===
95
96 In eMagiz, you can split messages based on the input message.
97 If an input message contains a list you can make separate messages based on each entry in the list with the help of a splitter. These components are identified as blue trapeziums in eMagiz.
98
99 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--splitter-components.png]]
100
101 We will discuss the splitter components in more detail in a later microlearning.
102
103 === 3.5 Filter ===
104
105 In eMagiz, you can filter messages based on certain criteria a message should adhere to. If an input message does not fit the criteria it will be filtered out.
106 The failure of matching the criteria can lead to silently dropping messages or could lead to an error (the decision is yours). These components are identified as yellow pentagons in eMagiz.
107
108 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--filter-components.png]]
109
110 There are three filter components available of which the XML validating filter is used most often:
111
112 * XML validating filter
113 * Standard filter
114 * XPath filter
115
116 The best practice is to validate your message **before** and **after** any change done by a component that is capable of altering the message (i.e. transformation and splitter).
117 This can be done with the help of an XML validating filter. This filter validates your input message against your message definition. If the message is valid it can pass. If not it will be refused.
118
119 In a standard filter or XPath filter, you could filter on the information in the body of the message or metadata information stored in a header related to the message. More on those in a later course.
120
121 === 3.6 Router ===
122
123 In eMagiz, you can route messages based on criteria. The content to verify if the criteria are met can be either stored in headers or in the body itself.
124 These components are identified as yellow diamonds in eMagiz.
125
126 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--router-components.png]]
127
128 There are several router components in eMagiz. The most used ones are:
129
130 * Header value router
131 * Recipient list router
132
133 As most of the use cases for incorporating a router component on flow level without eMagiz generating it for you lie within messaging we won't go into detail in the exact mechanics of each of these router options.
134
135 === 3.7 Service activators ===
136
137 In eMagiz, service activators can be used to execute a Groovy script or SpEL expression, or to trigger custom error messages.
138
139 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--service-activator-components.png]]
140
141 === 3.8 Support ===
142
143 In eMagiz, support objects can be linked to a functional component to aid the working of that component. These components can be found in the right panel of the screen.
144
145 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--support-components.png]]
146
147 More information on the support components can be found in [[this microlearning>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Platform.Create - Flow Editor - Components.WebHome||target="blank"]].
148
149 === 3.9 Channel ===
150
151 To connect all these components (except for the support objects) we need channels. A channel makes sure that the output of component A is sent to component B for further processing.
152
153 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--channel-components.png]]
154
155 Each channel should be given a descriptive name so you and others you work with know what the channel is used for.
156
157 === 3.10 Annotation ===
158
159 eMagiz also offers you the option to add an annotation and link it to one or more components.
160 This way you can make it explicit for yourself and others what is exactly happening in those components and why you have opted for a certain option.
161
162 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--annotation-components.png]]
163
164 === 3.11 The Combination ===
165
166 Combining this all together results in a flow with at least an input and output component helped by several support objects. An example of what a working flow looks like is:
167
168 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-create-flow-editor-basics--working-flow.png]]
169
170 == 4. Key takeaways ==
171
172 * By making the correct Design decisions eMagiz will generate most of your flow for you based on defined best practices.
173 * If no best practice has yet emerged only the known components are generated
174 * A flow needs to have at least an input and output component paired with the default support objects
175 * Every component has a specific function and there are a lot of them
176
177 == 5. Suggested Additional Readings ==
178
179 If you are interested in this topic and want more information on it please read the help text provided by eMagiz or browse through the reference guide to see which components eMagiz offers.
180 )))((({{toc/}}))){{/container}}{{/container}}
eMagiz
1.0.0