Skip to main content
Skip table of contents

Step 3: Testing With Roles

In the Controls panel you should see the message Test environment ready. Click icon Open test application to access the test service:

open_test_application.png

The Applications start page is displayed. It lists all available processes in this service. Hover over the name of your service to display the quick start icons. Click Plus to display the list of available start events for the process. You want to create a new instance, so click Start_Order_Approval_Process:

start_test_application.png

Role Test 1: Write and List Permission

Now create some test instances but do not finish them (see below):

instance1.png

If your order value is within the limit, do not click OK in the third form. Open the menu on top left and click the name of your process to go back to the instance overview:

If your order value exceeds the limit, you are currently not allowed to execute process step Check order. Click Back to Overview to display the instance overview:

test_instance_exceeds_limit.png

Reminder: If you have finished tutorial 4, the new order limit is 500.

Create at least two different instances:

  • One instance should fit the order value limit.

  • One instance should exceed the order value limit.

instances_in_list.png

Reminder: If you have finished tutorial 4, the new order limit is 500.

Now open both instances and check their behavior:

Current Task

Role Right of pas_tutorial_employee for this step

Instance Behavior

Show_approval_message

Write

  • You are able to open the instance.

  • You can process the instance (you can click button OK in the form).

Check_order

Read

  • You are not able to open the instance. The Processing...  message is displayed. It indicates:

    • that the instance is currently processed in task Check_order.

    • that you do not have the permission to execute this task.

Role Test 2: Write and Read Permission

Switch back to your process and change the role right of lane Supervisor to Read. Save the change and open the application again:

Until now, your user did not have permission to perform the approval step. Therefore the instance that exceeds the order limit (created in test 1) is still available:

instance_to_check.png

Create one new test instance that fits the order value limit:

two_test_instances.png

Now open both instances and check their behavior:

Current Task

Role Right of pas_tutorial_employee for this step

Instance Behavior

show_approval_message

Write

  • You are able to open the instance.

  • You can process the instance (you can click button OK in the form).

Check_order

Read

  • You are able to open the instance.

  • You cannot process the instance: If you click any button in the form, you are transfered to the instance list and a toast message is displayed: You are not allowed to execute this operation (see picture below).

instance_not_allowed.png

Roles Test 3: Write Permissions for all Steps

Switch back to your process and change the role right of lane Supervisor to Write. Save the change and open the application again:

Open the instance overview:

Since your user did not have permission to perform the approval step so far, your test instance is still displayed in the instance list:

instance_to_check.png

Open the remaining instance and check its behavior:

  • You are able to open the instance.

  • You can process the instance (you can click one of the two buttons in the form).

reject_order.png

If you have confirmed or rejected, the form of the next process step is displayed:

Checking the Deployed Service

If you have followed all tutorials step by step, you can review the differences between a test service and a deployed service. So far, you have deployed the service only once in tutorial 4. The roles were implemented in tutorial 5. The deployed service should not yet reflect the implementation of the roles.

Open the deployed service:

deployment_open_app.png

Start the service to create a new instance:

You still see the order form created in tutorial 1 - without the label element created in tutorial 4:

And no matter what role permissions you store in the test service, you will always able to execute the Form_CheckOrder:

check_order.png

Congratulations - you have done it!
You have modeled your first role-based process and tested it.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.