How to Create an Inline Subprocess

An inline subprocess is similar to a standalone subprocess, except that the inline subprocess is embedded in the parent process. For example, you may have a BPEL 2.0 process that includes assign and invoke activities within a scope activity that update the status of a customer order. You may have a business need for repeating these same activities later in the same process. One method is to physically repeat the same assign and invoke activities of the scope activity later in the process, but this can be error prone. In addition, every time a change is necessary, it must be implemented in both scopes. As an alternative to repeating the activities, you can use an inline subprocess.

Note:

Creating an inline subprocess within an existing inline subprocess is not supported.

To create an inline subprocess:

  1. Go to the scope activity in the BPEL 2.0 process that includes the assign and invoke activities that update the status of a customer order.

    Note:

    Inline subprocesses can also be created in a BPEL process by selecting Inline Subprocesses from the Property Structure menu above Oracle BPEL Designer, selecting the Inline Subprocesses folder, and clicking Add.

  2. Collapse the scope activity. Figure 40-25 provides details.
  3. Right-click the scope activity, and select Convert to a Subprocess.

    The Create Inline Subprocess dialog is displayed, as shown in Figure 40-26.

    Figure 40-26 Create Inline Subprocess Dialog

    Description of Figure 40-26 follows
    Description of "Figure 40-26 Create Inline Subprocess Dialog"
  4. Enter values appropriate to your environment, then click OK.

    Table 40-4 Create Inline Subprocess Dialog

    Element Description

    Name

    Enter a name or accept the default value, which defaults to the scope name.

    Replace scope with subprocess call

    Select to automatically replace the scope with a BPEL call activity (the default selection). If you want to create an inline subprocess and keep the selected scope in the process, you can deselect this check box.

    Label

    Optionally enter a description.

    Comment

    Optimally enter a comment.

    Image

    Select to replace the standard call activity icon with a unique image.

    The scope activity is converted to a call activity in the BPEL 2.0 process, as shown in Figure 40-27.

    The new inline subprocess is also displayed in the Subprocess section of the Components window. Figure 40-28 provides details.

    Figure 40-28 Inline Subprocess in Components Window

    Description of Figure 40-28 follows
    Description of "Figure 40-28 Inline Subprocess in Components Window"
  5. Above Oracle BPEL Designer, select Subprocess - updateOrderStatusSP to display the contents of the subprocess (the same contents as the initial scope activity). Figure 40-29 provides details.

    Figure 40-29 Subprocess Selection Above Oracle BPEL Designer

    Description of Figure 40-29 follows
    Description of "Figure 40-29 Subprocess Selection Above Oracle BPEL Designer"

    The contents of the inline subprocess are displayed. Figure 40-30 provides details.

    Figure 40-30 Inline Subprocess Contents

    Description of Figure 40-30 follows
    Description of "Figure 40-30 Inline Subprocess Contents"
  6. Make changes to the subprocess, if required, such as adding additional invoke activities.

    You can add the subprocess to the same BPEL 2.0 process, as necessary.

  7. From the Subprocess section of the Components window, drag the inline subprocess into an appropriate section of the BPEL 2.0 process. Figure 40-31 provides details.

    Figure 40-31 Subprocess Added to Same BPEL 2.0 Process

    Description of Figure 40-31 follows
    Description of "Figure 40-31 Subprocess Added to Same BPEL 2.0 Process"

    The subprocess name is automatically changed to Callnumber as shown in Figure 40-32.

    Figure 40-32 Subprocess Name Changed

    Description of Figure 40-32 follows
    Description of "Figure 40-32 Subprocess Name Changed"

For more information about using inline BPEL subprocesses, see Section "Updating Order Status with an Inline BPEL Subprocess" of Understanding Oracle SOA Suite.