Adding Profile as Subnode in Source Structure (Sub Profile)
Introduction: You can find a description of this phase in section Phase 3 (Introduction). See also section Nested and Networked Profiles.
You can use the context menu on a node or field of the target structure to insert an existing profile (its target structure) as a subnode in the source structure (substructure).
Requirements for a Profile to Be Added (Subprofile)
A profile can be added if
uses the normal data mapper (not the simple one).
(The options Enter output channels for each record and Incorporate IU must not be set.)
Requirements for an Added Profile
A profile can add another profile if
Adding a Subprofile
A profile can be added via the context menu (→ Add profile as sub node in source tree) of any field and node in the target structure. Another dialogue will appear.
(1) Select the profile to be added.
(2) Specify a unique prefix and a node name for the substructure. Note: The prefix ensures that all field/node names in the source structure remain unique, since two included profiles could use an identical field/node name, for example. The prefix has the effect that you get two distinct names prefix1.fieldname and prefix2.fieldname, for example. This also allows you to include the same profile twice.
(3) This will add the profile.
Result
As a result, on the one hand, the function call sub profile for source tree (a,b,c,d,e,f,g,h) is placed on your node/field in the target structure. Parameters a, b and h are set automatically (see there).
On the other hand, you will then see the following substructure in the source structure.
(4) The attributes of nodes and fields of the subprofile are locked. However, you can modify them manually if you click on the lock if only minor details in the subprofile have changed. Otherwise, you should use the synchronisation (described below).
(5) If changes have been made to the subprofile, you can synchronise them automatically via the context menu of the node (here sub1.generate_random_number) → Synchronize with profile .
Passed Variables (and lists and maps)
The variables of the calling profile are passed to the subprofile. See section Passed Variables, Lists and Maps (Profile Chains and Sub Profiles). There you will also find a description of how to pass lists and maps (and all variables of the calling profile in a map).
1:1 Mapping
In a 1:1 mapping, the substructure is not transferred.
Hierarchical Structures
As you may have noticed, the included profiles in the source structure are all 'flat'. Although they have nestings in themselves, you cannot insert a profile 1 first and then a profile 2 into profile 1. Nestings of this kind, i.e. the construction of a hierarchical overall structure, are achieved through mapping and the hierarchical structuring of the target structure. And these methods are all familiar to you from 'normal' mappings. Specifically, the data from profile 2 can be inserted below/inside the data from profile 1 in the target structure.
Application Example
Let's assume profile 2 gets a number of items in an order. You could then go through the articles in the target structure, like you already know from 'normal' mappings, and call a profile 1 (included in the source structure), which provides you with additional information about the respective article (the current price, the current stock in the warehouse, etc.). So profile 1 can be built by anyone as a service profile and you can use it in your profile to enrich your own information. So you only give profile 1 an item number, for example, and get back the desired data, without having to know what happens in the background, such as database queries or accesses to an ERP system. You also do not have to worry about changes in how those other systems are accessed. Your profile 2 can stay the same and only profile 1 has to be maintained if necessary. So just the way you want it in a service-oriented architecture.
Example Profiles
Example 1
Example 2
Example 3
Example 4
Example 5
See Also
Section Adding Lists and Maps in Source Structure (→ _ClipboardData_ )
Section Automated Workflows (→ Vertical integration with sub profiles).