Refactoring a Call Sub-Process into an Embedded Sub-Process

You can refactor a call sub-process activity into an embedded sub-process.

Procedure

  1. Right-click the call sub-process activity, and select Refactor > Inline > Sub-Process Content.
    Note: Only a single level of a process hierarchy can be made inline at a time. If the sub-process you want to make inline contains a sub-process task, after refactoring, it will be brought into the embedded sub-process as a sub-process task. (the refactor does not extend into additional levels of the process hierarchy).
  2. The sub-process called by the selected task is analyzed, and a dialog is displayed with the results:
    • If there are no problems with the refactoring operation, a dialog is displayed. Select Inline into Embedded Sub-Process and click Finish.
    • If there are problems with the refactoring, but the problems can be resolved by making the sub-process inline, a dialog is displayed showing the problems:
      Note: The possible problems displayed in this dialog are similar to those for process package optimization, except that some of these problems that are not resolvable for package optimization are resolvable by refactoring into an embedded sub-process (such as those reported in the previous dialog).

      Also, problems dealing with nesting of sub-processes are not applicable because manual refactoring affects only a single level of sub-process hierarchy at a time.

      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.

    • If there are problems that cannot be resolved by refactoring, a dialog similar to the following is displayed:

      Because the errors cannot be resolved, click Cancel, resolve the problems manually, and retry the refactoring.

  3. If the sub-process was able to be refactored, its contents are placed in an embedded sub-process, however the sub-process that was made inline is not removed.

Result

Note: The following are potential consequences of a refactoring. For more information, see Inline Sub-Process in Detail:
  • References to sub-process parameters in the sub-process content are swapped for the calling process data fields that are mapped to them.
  • Sub-process data fields and unmapped parameters are copied up to the calling process and renamed with a sequence number if the data field or parameter already exists in the calling process.
  • Sub-process participants are copied to the calling process (if they do not already exist).
  • 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.