Testing Process: Triggering the process

While testing, we will run the process as you will log in with various sample end users. You will initiate the process and then advance it to all possible paths, that is, you will test it across all possible flows by performing actions on the task in the work list and you will ensure that the expected paths are followed.

For each process in which you have been assigned a role, the Workspace displays your current tasks. The participants in the process and their roles and groups have already been created. Remember that the Enter Quote activity will be performed by the user SalesRepresentative, user and approval of terms and deals will be carried out by the users, Approver, and Contracts. You have not taken users with names such as 'Adam' as SalesRepresentative and so on. You have followed a generalized approach by making a role of SalesRepresentative to be assigned to a user created with the same name.

Role

User

Task

SalesRepresentative

salesrepresentative

Enter Quote Activity

BusinessAnalyst

businessanalyst

Business Review Activity

Approvers

approver

Approve Deal Activity

Contracts

contracts

Approve terms and Finalize Contacts activities

How to do it...

As a user, you can log in to Workspace . It's the common place where end users log in to participate in the process.

  1. Go to the following URL to log in the Business Process Workspace: http://localhost:8001/bpm/workspace/.
  2. Log in with the credentials: salesrepresentative/Welcome1.
  3. Go to the Applications in Workspace and click on the Process name SalesToContract v1.0 that you have deployed.
  4. You have logged in as salesrepresentative. This is the user that has the role SalesRepresentative, which has an Initiator Task. When you click on the application, it will generate a task which will be available in the Inbox of the user, SalesRepresentative.
    How to do it...
  5. You can find that Worklist Views has an Inbox. Click on Inbox, and the task assigned to you (when logged in as SalesRepresentative) is listed on the right-hand side of the screen, that is, the Enter Quote task.
    How to do it...
  6. Double-click on the Enter Quote task to open it in a new window.
  7. In the Enter Quote window modify quote Details. As you have used a script task to initialize the values of Quote, they are available here. You can change them too, but keep them as it is for now.
    How to do it...
  8. Click on the Submit button.
  9. The task has now moved ahead and you will find that it has moved from the enlisted task in the Inbox of salesrepresentative.
  10. Log out of the salesRepresentative user.
  11. Log in with the Approver role with the user credentials: approver/Welcome1.
  12. The process now has now moved to the Approver role and the Contracts role for the Approve Deal and Approve Terms tasks respectively.
  13. Double-click on the Approve Deal task assigned to you when you log in as approver.
    How to do it...
  14. Click on Approve to approve the Approve Deal task.
    How to do it...
  15. The task will move from the task list of the Approver user.
  16. Log out of approver.
  17. Log in again with the credentials contracts/Welcome1 to perform the Approve Terms and Finalize Contract tasks.
  18. Double-click on the Approve Terms task assigned to the contracts user.
    How to do it...
  19. Click on the Approve button to approve the Approve Terms task.
    How to do it...
  20. Double-click the Finalize Contracts task assigned to the contracts user.
  21. You will find that as soon as you approve, the task moves out of the list. However, as the same user is also going to finalize the contract, as the Finalize Contracts task is assigned to the user Contracts:
    How to do it...
  22. Click OK to finalize the contract.
    How to do it...
  23. Go to the Output directory which you have given while configuring the service task SaveQuote, which is a file adapter. In my case, it's TEMP/QuoteOutput. You can find a quotation file created there.

How it works...

When you log in as the user salesrepresentative (the Initiator of the process) and click on the application name SalesToContractv1.0, the process gets triggered. The Enter Quote task is assigned to salesrepresentative. Once you submit the Enter Quote task, the token moves to another task.

As you have already set the BusinessAnalystReviewRequired Data object to false() in the Script Task Initialize Quote, so when the token Is business Analyst Review Required? is switched on, it will not move to the Yes path but take the No Path, as shown in the following screenshot:

How it works...

Hence the token will reach the Approve Deal and Approve Quote simultaneously, as you have used a parallel Gateway. Once both are approved, the contracts role user will finalize the contract and the SaveQuote service will save the quote in a file location.

There's more...

Files can be attached to tasks and also you can add notes in the comments section.

Attaching files and adding notes

In this section, you will learn to add files and notes to tasks as follows:

  1. Go to BPM Workspace and log in with the salesrepresentative credentials.
  2. Open the assigned task from the task list is in the Inbox , double-click on it. It will open the Enter Quote task.
  3. Scroll down to the Comments and Attachment section at the end.
  4. In the Attachment section, click on the green plus (+) sign to open the Add attachment file browser.
    Attaching files and adding notes
  5. You can browse the file to attach the file attachment . It will appear as a link for other participants.
  6. You can also add a note in the Comments section.

    Note

    For any user to add a note, the task item status should not be processed or completed. Also, while configuring the task UI, we had checked the Is Editable to be true. Hence any approver can also make changes in the form values submitted by the sales representative.

Analyzing process instances

You may now be interested in knowing the path your process has taken and if it has met the expected path. You can analyze, view an audit trail, and monitor your process instance through process tracking in Oracle BPM Workspaces.

How to do it...

  1. Log in to Oracle BPM Workspace with the credentials salesrepresentative/Welcome1.
  2. Click on the Process Tracking tab.
  3. On the right-hand side, click on Advanced to search for the Process Instance.
  4. Enter the eligibility criteria for the search as follows:
    How to do it...
  5. You can find the instance listed. Click on the instance row and you can find instance Details on the lower side of the window.
    How to do it...
  6. Scroll down to the Audit Trail section and expand it.
  7. Choose the Graphical Radio to view the audit in graphical form.
    How to do it...
  8. You can find that the screen lines on the sequence path show the path taken by the Process Token.
  9. Attachments and notes are also listed, if you scroll down a little.

There's more...

You can also find an instance being created in the EM (Enterprise Manager) console and you can use it to view the Audit Trail of the process.

Instance tracking from EM Console

  1. Log in to the WebLogic EM Console with credentials weblogic/Welcome1.
  2. Go to SOA-INFRA | Default | SalesToContractDemo, where the partition is Default and SalesToContractDemo is the project you have deployed.
    Instance tracking from EM Console
  3. Click on the Instance ID 20001. It's the same Instance ID that you have found in BPM Workspace too.
  4. The Instance window opens and you can check the flow, can find the fault details, if any, and trace the audit trail too.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.28.9