Time to run the rewards project

Time to run our new rewards process by submitting ourselves for a reward, evaluating this award as the HR department in the user task, submit that decision in the form provided, and verify that the personnel file got updated. We also need to verify that we were notified of the results with an email.

Running Rewards - What about that email?

We have an email task, but no local SMTP mail server? Another problem, email tasks need configuration at project level, so let's start with configuring the email task handling in the project:

  • This is done with a Work Item Handler (WIH), nothing more than the code behind the service task
  • We'll use an email WIH that sends to local SMTP server on port 25
  • Open the project assets view with Menu -> Projects -> (click on) rewards -> Settings

Running Rewards - Install email service task

Select in menus:

  • Service Tasks -> Email
  • In right pane click on the Email item Install button

Running Rewards - Configure email service task

Fill in the following fields:
  • Host: 127.0.0.1
  • Port: 25
  • Leave the rest of the fields blank and click on Install button

Running Rewards - Using local SMTP server

Mail is now inbound on port 25, we need a server to listen for it:
  • Download the latest fakeSMTP-latest.zip
  • Unzip fakeSMTP-latest.zip for a jar file: fakeSMTP-[VERSION].jar
  • Launch form console with java -jar fakeSMTP-[VERSION].jar
  • It captures emails on port 25 after clickoing on Start Server

Running Rewards - Build the project

From project assets view, click on top right BUILD button:

Verify build successful in bottom Alerts pane:

Running Rewards - Deploy the project

Now let's deploy the project by clicking on top right DEPLOY button. If deployed previously, a pop-up appears asking if you want to replace the existing build artifact. Click OVERRIDE to replace the build artifact:

Running Rewards - Successful deployment

If all goes well you'll see a green pop-ups verifying the deployment. Note that deploying also triggers a build:

Running Rewards - Navigate to process definitions

Let's take a look at the process definition deployment by selecting via top Menu -> Manage -> Process Definitions:

Running Rewards - Open process definition

This opens the Manage view pane where you'll see our Rewards definition. Later you can use the drop-down menu at the top to jump between different views. We're going to open the Rewards definition by clicking on it:

Running Rewards - Start a process instance

This view offers choice of definition details or image of the process. Clicking on the button: New Process Instance starts a new process instance:

Running Rewards - Fill in start process form

You're presented with your previously created start process form in a pop-up. Add some valid input data and click on SUBMIT:

Running Rewards - Examining process instance details

A new screen displays the process id and other instance details. Now note the Current Activities and select the Diagram tab for a visual status view of process:

Running Rewards - Examining process instance details

Note the process instance is waiting at the user task, let's open our task inbox to view it:

Running Rewards - Open user task inbox

Open task inbox from Menu -> Track -> Task inbox:

Running Rewards - About the task assignment

Remember we assigned Approve Reward tasks to group Manager and our user is a manager, so the task Approve Reward waits on us. Note the filter at the top applied to show READY, IN PROGRESS, RESERVED status tasks only:

Running Rewards - Claim your user task

Click on Approve Reward task to open. Note that it's waiting for first status of a user task, so click on CLAIM to take ownership:

Running Rewards - Start your user task

The task is now ready for the next stage, so click on START to being the task and make the form editable:

Running Rewards - Complete your user task

Approve the task (or reject), check (or not) the box Approve, then submit the task by clicking on COMPLETE:

Running Rewards - Adjusting task inbox filters

The task is no longer in the inbox, it's due to the filter at the top. Click the filter line to remove, note the Approve Reward task is now green and completed:

Running Rewards - Review process instance (again)

If all went well our process instance is completed, so let's check:
  • Open the instance with Menu -> Manage -> Process Instance
  • Instance is not listed due to filter, so remove State: Active

Running Rewards - Open process instance (again)

Click on the rewards process instance to open:

Running Rewards - Verify process instance completion

After opening, select the DIAGRAM tab to view complete process visual status. We see there should be a message in the logs simulating a personnel file entry for reward approval. We also see there should be an approval email waiting for us:

Running Rewards - Verify business level logs

To verify the logging, see Logs tab, but it's business level logging:

Running Rewards - Verify developer level logs

Let's check the server logs, back in the console used to start from. We see there the entire run of our process including the logging and email sent messages. Let's go see what our fakeSMTP server has captured for us:

Running Rewards - Verify process generated email

Check fakeSMTP server, it's indeed holding (in our case) an approval email:

Lab 7 sub-goal - view and explore reports

To view and explore available process and task reports

Reports - View process reports

Data gathering from processes and tasks can be found in Reports:
  • First open Menu -> Track -> Process Reports
  • Initial process reports lack data, explore now for reference

Reports - View task reports

Now open Menu -> Track -> Task Reports:
  • Initial reports lack data, explore now for reference
  • Feel free to start and complete more process instances

Lab completed - What's next?

(coming soon... new requirements leads to next evolution of the reward process project...)
Eric D. Schabell
Portfolio Architect Director
@ericschabell
http://schabell.org
Other Red Hat Process Automation Manager Workshops

Red Hat Process Automation Manager Articles

Red Hat Process Automation Manager Demos:

Up next...

Lab 8 - Automated task reassignment