![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
See "Embedded Sub-Processes" in TIBCO Business Studio Concepts.To create an embedded sub-process, refactor one or more objects in your process as described in Creating a New Embedded Sub-Process.
If you want to use the chained execution resource pattern, you can do so by selecting the Chained Execution check box in the Properties view for the embedded sub-process. For more information, see Chained Execution- Multiple Parallel Paths in a Chaining Group.You can add data fields that are local to a sub-process (they are not used in the process that contains the embedded sub-process). By default, activities in the embedded sub-process have access to all local data and process data. However, using the Interface tab, a subset of data can be selected.
1. Click the Data Fields tab in the Properties view for the embedded sub-process.
2. At the right of the Data Fields tab, clickto add local data fields. The properties of the data fields that you create are the same as for process data (see Adding Data Fields or Parameters to a Package or Process).
In this example, the data fields Status, Status2, Status3, and Field are local to the embedded sub-process. On the Interface tab for activities within the embedded sub-process, you can access the local data as well as the process data:In this case the address data fields (process data) and the local data defined on the Data Fields tab are both available.
You can quickly create an embedded sub-process that has local data by using the fragment BPMN Process Fragments > Basic Fragments > Embedded Sub-Process with Data Fields. For more information about fragments, see Process Fragments.
2.
b. Select the New Sub-Process is a transaction checkbox if you want the new sub-process to become a transaction and therefore be under transaction control (see User Tasks and Pageflow Processes).
c. Select the Insert start event in new sub-process and Insert end event in new sub-process checkboxes to control whether start and end events are added to the refactored sub-process.
4. Click Finish. The objects that you selected are placed within a new embedded sub-process (with start and end events if those options were selected):
2.
− Select the New Sub-Process is a transaction checkbox if you want the new sub-process to become a transaction and therefore be under transaction control (see User Tasks and Pageflow Processes).
− Select the Insert start event in new sub-process and Insert end event in new sub-process checkboxes to control whether start and end events are added to the refactored sub-process.
5. Click Finish. The objects that you selected are copied to the new sub-process and the selected objects are replaced with a task that calls the reusable sub-process.
• If a data field is referenced only in the selection that you are refactoring, you have the option of moving or copying it. Data fields that are copied into the sub-process are created as formal parameters and mapped. Data fields that are moved into the sub-process are created as data fields. By default, data fields are moved. In order to copy them as formal parameters, you must uncheck the selection boxes on the dialog.
• If a data field is referenced in one or more of the tasks you select for refactoring but is also referenced elsewhere, it is automatically copied into the sub-process as a formal parameter.
• A mapping is created between data fields and formal parameters of the sub-process and any corresponding formal parameters that are created in the sub-process. You can view this mapping by selecting the task that calls the sub-process and clicking the Map To Sub-Process and Map From Sub-Process tabs in the Properties view.In this process, flow proceeds from User Task 1 to the gateway without necessarily waiting for Task A to finish. If User Task 1 and Task A are refactored into a reusable sub-process, an end event is inserted into the sub-process, effectively synchronizing the flow. TIBCO Business Studio prompts you to confirm this change to the process:
1.
You can see the location of each problem by highlighting it. If you select all of the problems in this dialog, the Finish button is enabled and you can refactor the sub-process.Because t he errors cannot be resolved, click Cancel, resolve the problems manually, and retry the refactoring.
The following are potential consequences of a refactoring. For more information, see Inline Sub-Process in Detail:
• Type declarations referenced by data copied up from the sub-process are copied to the package of the calling process only if the sub-process is in a different package.
• If the sub-process implements a process interface (see Process Interfaces), the start or intermediate events that implement interface-defined events are changed so that they are no longer flagged as such.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |