Play Processes and Test Applications

Use the application player to test the behavior of your business processes at design time. You can test a process using different user IDs without having to activate the Process application.

Map Process Roles to Users in Your Organization

Before using the application player, you must map the roles defined in your business process to the users or groups of the organization infrastructure defined in your runtime environment. The application player uses the information of your organization to mimic the behavior of your business processes in real-world situations.

To map roles to users in your organization:
  1. Open your application.
  2. Start the player either by selecting Test Application from the main menu or by clicking the Player player icon icon.
  3. Select the role that you want to map from the drop-down list, which displays all the roles defined in your process.
  4. Select the user or group you want to map.
    1. Click Choose.
    2. Select User or Groups from the drop-down list.
    3. Enter the name of the user or group you want to search for, then click Search.

      To see a list of all users or groups, leave the text area blank, then click Search.

    4. In the table, select the user or group you want to map.

      After selecting a user or group, it appears at the bottom of the selected window.

    5. Click OK.
  5. Click Add Mapping.

    The users or groups you mapped to the Process role appear in the mappings table.

Note:

You must map at least one user or group for each role in your process. If the player encounters a user task with an unmapped role, it can’t continuing running the process beyond the human task.

About Testing Processes Using the Application Player

When testing a business process, the application player deploys a version of the application to runtime using a special runtime partition. This allows the player to run a business process using the same environment as a normally activated application.

The application player provides an efficient way of testing the business processes. It uses a runtime environment, accessible from design time, that emulates the real-world behavior of business processes. As the process runs, the player displays a visual representation of the business process showing the path the process instance follows through the process flow. This allows process designers to easily create, test, and revise business processes without having to save and deploy the application and view it.

As a process instance progresses through a process flow, the player displays an animated view of the behavior of your business process. The outline shows the path the process instance takes through the flow elements and sequence flows of your process. The specific path an instance takes through your process depends on the input data you provide for various flow elements.

Note:

The Instances section on the Application Player tab displays only those instances that are running.

When running the player on a business process, the application is validated and the current version of the application is activated to a player partition of the Process runtime environment. When using the player, you don’t have to publish or manually activate the application to view changes while designing a business process.

Note:

Before process modelers can use the application player to test their business processes, an administrator must enable the player. See Enable the Application Player.

Emulating the Runtime Behavior of Flow Elements

As the player runs through a business process, it emulates the runtime behavior of some of the flow elements in your process.

  • Human Tasks

    When the player reaches a human task in a process, it shows the role or user to select on its behalf. It shows all the possible outcomes as actions. If a form is associated with the task, then the player also gives you the option of launching the form or manually selecting the outcome. If you launch the form, the form is activated and displayed in a separate viewer.

    If no form is assigned, the player pauses to allow you to select the role you want to perform the task. It prompts you to select one of the outcomes defined for the human task. Approve and Reject are defined as default outcomes.

    However, the list of possible outcomes depends on how outcomes are defined for the human task. After selecting an outcome, the player continues to the next flow element of your business process.

  • Message Send Events and Send Tasks

    When the player reaches a message send event or a send task event within a business process, it performs these events automatically. It then continues to the instance of the process being called and pauses at the corresponding message catch event or receive task.

    In both cases, you must manually return to the parent process. For example, if the send and receive pair is creating an instance on a different business process of the same application, then you must return to the Application Player tab, select the new instance for this process, run the child process, and then return to the parent process.

    If the send and receive pair calls an external web service, then you must manually enter the required web service message to continue running the process.

  • Timer Events

    When the player reaches a timer event within a business process, it pauses and waits until you click Run. The player then moves to the next flow element in the process flow.

  • Call Activities

    When the player reaches a call activity, it calls the child process and creates a new instance of the process. Click the Drill-Down icon to view the child process.

  • End Events

    When the player reaches an end event, it pauses and displays the Drill-Up icon. Clicking this icon causes the player to return to the parent process. If the current process has no parent, the player returns to the Application Player tab and deletes the process instance.

  • Other Flow Elements

    When the player reaches another flow element that causes the instance to wait for some operation or external event, the player pauses. To continue running the process click Refresh, which is located at the top of the Application Player tab.

Test a Business Process

After enabling the application player, you can access the player from the Application Home tab and use it to test the behavior of your business processes. You can access the player from the main menu or the Application toolbar while you’re working in Edit mode.

To test the behavior of a business process:
  1. Open your process application and access the application player.

    You can access the player by selecting Test Application from the menu or by clicking Test in the toolbar.

    The Test Application tab opens. The application is automatically validated as soon as it’s selected.

    Description of test-application-first-ic.png follows
    Description of the illustration test-application-first-ic.png

  2. Select Current Application, Last Published Version, or Snapshot from the drop-down list.
  3. Click Activate.

    The Activate to Test dialog box opens.

    Description of activate-test.png follows
    Description of the illustration activate-test.png

  4. Select the Add Me to All Roles check box so that you can perform the user tasks and click Activate.

    A version of the application has now been activated to runtime using a special test partition.

    Description of test-activate-home.png follows
    Description of the illustration test-activate-home.png

  5. Click Play and select the business process that you want to test.

    The application player begins running the business process. As it passes through each flow element and sequence flow, it outlines the path it takes through the process flow.

    As the player continues running through your process, it stops when the process instance reaches one of the following flow elements:

    • Form Start Event

    • User Task

    • Call Activity

    • Service Activity

    • Message Event

    • Timer Event

    You must provide input for these types of elements before the player can continue running through the process flow. To emulate the runtime behavior of these flow elements, see About Testing Processes Using the Application Player.

  6. If the player pauses on a form start event or user task:
    1. Click Play Play icon.
    2. Select the user you want to perform the task.

      Note:

      If the list of users is empty, then verify that you mapped the process roles to your users correctly. See Mapping Process Roles to Users in Your Organization.
    3. Click Run Run icon.
      Flow Element Action
      Form Start Event The form associated with this event is launched. Submit the form.
      User Task Select the outcome from the list. The possible outcomes are defined by the human task associated with the current user task.

      The player continues to the next flow element in your process flow.

  7. If the player pauses on a message catch event or a receive task, it creates an instance of the child process.
    1. Click Run.
    2. Select the Player tab.
    3. Go to the Instances table and select the newly created instance.

      The design-time environment prompts if you want to close the Application Player tab for the original process. Closing this tab has no effect on the process instances.

    4. Click OK.

      The player opens the new process instance and begins running the business process from the message start event called from the parent business process.

    5. Click Run for any flow elements that pause the application player as outlined in previous steps.
    6. When the player reaches the message end event of the child process, click the Drill-Up arrow to return to the parent process.

      The player closes the tab for this child process and removes the process instance from the list of instances.

    7. From the list of process instances, open the process instance of the parent process.

      After reopening the process instance of the parent process, the player continues running through the process from the point where the child process was called.

  8. When the player reaches an end event in your process, click the Drill-Up icon to end the process instance.
The player returns to the Application Player editor and deletes the process instance.

About Testing an Application’s Activation

As a developer, you can activate an application from the design-time environment to a test partition in the runtime environment. You can then try out the application and simulate the end user’s experience.

Note the Testing Mode indicator at the top of the page. When using Testing mode, you can only access the data generated by the applications activated to the test partition. This data is isolated from data in the production environment. You can toggle between Testing mode and Production by selecting either On or Off.

Description of test-mode-main-ic.png follows
Description of the illustration test-mode-main-ic.png

If you sign out of the runtime environment and want to return to Testing mode, sign in again and then append the following information to the URL:

?mode=test&showMode=true

Test an Application’s Activation

As a developer, you can activate an application to a runtime test environment. You can activate one version of the application at a time.

To perform a test activation:
  1. Save any changes to your application and publish your application.
  2. Click Test.

    Note:

    The application is automatically validated when selected. Validation errors and warnings, if any, are listed on the page. To fix an error, right-click an entry in the list and select Show in Editor.

    Description of test-application-first-ic.png follows
    Description of the illustration test-application-first-ic.png

  3. Select which version of the application to test. You can test the Current Application, the Last Published Version, or any available snapshot.
  4. Click Activate. The Activate to Test dialog box opens.
  5. Select the Add Me to All Roles check box so that you can perform the user tasks.
  6. Click Activate.

    If the application is activated successfully, then the following page is displayed.

    Description of test-activate-home.png follows
    Description of the illustration test-activate-home.png

  7. Click Try in Test Mode to go to the runtime test environment and test your process as an end user.

    Description of test-mode-main-ic.png follows
    Description of the illustration test-mode-main-ic.png

    The runtime test environment provides the following information:

    • List of applications that you can start

    • List of process instances related to you

    • List of tasks related to you

    • Administration actions: Manage Roles and Manage Credentials.

      Important:

      Process Developers can only see roles for the processes for which they’re the process owner on the Manage Roles page. All other data is protected and available only to administrators.

      Only the keys that are created for test data are shown on the Manage Credentials page. Production keys are protected and only available to administrators.

Tip:

If you sign out of the runtime environment and want to return to Testing mode, sign in again and append the following information to the URL:

?mode=test&showMode=true