Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 8 Using Sub-Processes and Process Interfaces : Inline Sub-Process in Detail

Inline Sub-Process in Detail
This section describes in detail what happens when you use an inline sub-process (including its parameters, participants, and so on).
Data Fields and Mapped Parameters
References to parameters in sub-processes are replaced according to the parameter mapping. For example, consider the parameter mapping to the following sub-process:
The data field CustRef in the parent process is mapped to RefNum in the sub-process. In the sub-process, the parameter RefNum is used by the single user task:
After refactoring as an inline sub-process, the user task is brought into the main process with RefNum as its parameter.
Sub-Process Data Fields and Unmapped Formal Parameters
Sub-process data fields and unmapped formal parameters are moved up to the calling process after refactoring. In order to preserve the original semantics of the sub-process, any data fields or unmapped formal parameters in the sub-process that also exist in the calling-process are renamed (each new instance of the same named data is suffixed with a sequence number). Any references to the renamed sub-process data are updated when the sub-process activities and flows are moved up to the calling process.
Example
A sub-process has a data field called CustomerField which its activities use internally. The calling process also has a field called CustomerField which it uses internally.
When the sub-process is in-lined, the sub-process CustomerField is copied into the calling-process as CustomerField2. All references to CustomerField in sub-process activities and flows are replaced with references to CustomerField2.
Multiple Calls to a Sub-Process
This rule also applies when several sub-processes are called from a single process. If the sub-processes have the same data fields names, then each invocation will cause separate, sequence-numbered instances of data fields in the calling process when they are made inline.
Example
There are two calls to the same inline sub-process from a single calling process. The sub-process has a field called CustomerField.
The copy of sub-process activities and flows ‘moved up’ in place of one reusable sub-process task will operate on CustomerField and the other will operate on CustomerField2.
Field Name Conflicts
This rule also applies when inline sub-processes are nested, and have conflicting field names.
Example
The calling-process (MainProcess) calls an inline sub-process (SubProcess) which in turn calls a nested inline sub-process (SubSubProcess).
Each process has a field called CustomerField.
1.
2.
3.
Sub-Process Participants And Type Declarations
Participants are moved up to the calling process if the calling process does not already have a participant with the same name. If the Participant already exists in the calling process, references to the sub-process participant are exchanged for references to the calling process participant in the sub-process content that is moved up.
Similarly, type declarations (that are referenced by sub-process data fields and unmapped formal parameters) are moved up to the calling process if the calling process does not already have a type declaration with the same name. Otherwise, the calling-process type declaration is used.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved