Oracle by Example brandingUse a Structured Process in a Dynamic Process

section 0Before You Begin

This 15-minute tutorial shows how to use a structured process in a dynamic process.

Background

You've created a simple dynamic process - Emergency Process, and configured advanced properties in it.

What if part of the Emergency Process (dynamic process) follows a sequential and predictable path? You can model that part as a structured process which your dynamic process calls. In the emergency room example, suppose the surgery process follows a sequential process flow. You can model the surgery process as a structured process and call it from the Emergency dynamic process.

What Do You Need?

  • Access to an Oracle Integration Cloud instance
  • Sign-in credentials (user name and password)
  • Access to the Emergency application that you created and configured in the Learn Dynamic Process Basics and Explore Advanced Dynamic Process Concepts tutorials

section 1Create a Structured Process

  1. From the Emergency application in design time, click the Application Home tab.
  2. Click Create, then New Process.
  3. In the Create Process dialog box, enter Surgery Process in the Name field, and select Message in the Select a Pattern field. Deselect Create Immediately and click Create.

    The two processes in the Application Home tab have different icons to indicate dynamic versus structured processes.

    Description of the illustration er-example-structured1.png
    Description of the illustration er-example-structured1.png

section 2Add Human Tasks

  1. Open the Surgery Process.
  2. Insert an Approve human task. Drag and drop an Approve human task from the Elements palette onto the process flow. Position it where you want to add it. Double-click the task's name and enter Patient Consent.
  3. Insert a Submit human task. Drag and drop a Submit human task from the Elements palette onto the process flow. Position it where you want to add it. Double click the task's name and enter Surgery Tasks.
  4. Modify properties for the Submit human task.
    • Click Surgery tasks. Click Menu Menu icon and then select Open Properties.
    • In the properties pane, select Is Draft. The Surgery tasks turns grey. This means that it is just a placeholder for the surgery tasks to be configured later.
    • Click Collapse Pane Collapse pane icon to collapse the properties pane.
      Description of the illustration er-example-structured2.png
      Description of the illustration er-example-structured2.png

section 3Edit the Process' Swimlane

Edit the process' swimlane to assign a role responsible for performing each task within the process. In the Surgery Process, let us change the process' swimlane to a surgeon role.

  1. Select Process Owner and click Edit.
  2. In the implementation pane, click Add Role next to the Role field.

    In the Create Role dialog box, enter Surgeon and click OK.

    Description of the illustration er-example-structured3.png
    Description of the illustration er-example-structured3.png
  3. Click Collapse Pane to collapse the implementation pane and save your changes.

section 4Associate a Form with the Approve Human Task

  1. Click the Patient Consent human task.
  2. Click Menu Menu icon and select Open Properties to open the related properties pane.
  3. Click the Browse icon next to the Form field to search for PatientForm.
  4. Select PatientForm and click OK.
  5. In the Presentation field, select Surgery.
    Description of the illustration er-example-structured4.png
    Description of the illustration er-example-structured4.png
  6. Collapse the implementation pane to save your changes.

section 5Define the Process Start and End Events

  1. Click the Start Message event.
  2. Click Open Properties, and then click Configure for Define Interface.
  3. In the Arguments Definition table of the Configure dialog box, click Add to enter two arguments as follows:
    • Name: FirstName and Type: string
    • Name: LastName and Type: string
  4. Select the End Message event and repeat the steps from 1-3.
  5. Description of the illustration er-example-structured5.png
    Description of the illustration er-example-structured5.png

section 6Configure Data Associations for Process Start and End Events

Define data associations for the Surgery Process' start and end events to define what payload passes onto the process start event and what data passes out of the process end event.

  1. Click the Start Message event.
  2. Click Menu Menu icon and then select Open Data Association to open the Data Association editor.
  3. Map FirstName to patientFormDataObject.firstName, and LastName to patientFormDataObject.lastName.
    Description of the illustration er-example-structured6.png
    Description of the illustration er-example-structured6.png
  4. Click Apply.
  5. Click the End Message event, and repeat step 2.
  6. Map patientFormDataObject.firstName to FirstName, and patientFormDataObject.lastName to LastName.
  7. Click Apply.

section 7Call the Structured Process in the Dynamic Process

  1. Return to the dynamic process by selecting the Emergency Process tab.
  2. Change the Surgery activity's type.

    Click the Surgery activity and click More. Select Change Type, and then click Process Activity. Notice that its activity icon now shows a process rather than a human task.

  3. Edit the Surgery activity's properties (Implementation).

    Select SurgeryProcess in the Process field. Select Start in the Start Event field. Leave Non blocking deselected, which means that the dynamic process will wait for the structured process instance to complete to continue. Deselect the Repeatable and Manually Activated markers.

    Description of the illustration er-example-structured7.png
    Description of the illustration er-example-structured7.png
  4. Set data association now that the activity has changed type. Use auto mapping for input and output.
  5. Click Apply.

section 8Try Out the Structured Process in Runtime

Before you try out the structured process in runtime, you've to test activate the Emergency application to validate, and make it available in runtime.

  1. Click Test.

    If the validation is successful, proceed to the next step. If any validation issues are listed, correct the issues and click Test again.

  2. Click Activate.

    From the Activate to Test dialog box, leave Add Me to All Roles selected, and click Activate. A message displays that the application activated successfully.

  3. Click Try in Test Mode. A new test mode browser tab opens, and the navigation pane now displays runtime options.
  4. Now that you've test activated the application, let's try out the Surgery process in runtime to see how it works.

  5. Click My Apps, then create and open the Emergency dynamic process instance. Notice that the Surgery activity shows a structured process icon in the Activities list.
    Description of the illustration er-example-structured8.png
    Description of the illustration er-example-structured8.png
  6. Select Inbox in the navigation pane. Typically, the surgeon would be accessing an assigned task from a structured process like the Surgery process from the Inbox rather than from within the dynamic process, although knowledge workers can open structured process tasks from either the Inbox or Dynamic Process.
  7. Open the Emergency task whose process is Surgery Process. Click Approve and the task is completed.
  8. Select Dynamic Processes in the navigation pane and reopen the topmost instance. The Surgery task no longer appears, since you completed it through the Inbox. Click the Audit tab and you can see (and open) the just completed Surgery process activity.