Creating a new process

From the Asset view after completing previous lab click on Add Asset button on top right:

Creating process - add asset

  • From the Add Asset view
  • Click on Business Process button

Creating process - name the process

In pop-up fill in fields as shown and click on OK button:

Creating process - opening process designer

The process is created and displays the designer:

Creating process - a word on alerts

  • Note the Alerts pane at bottom
  • Drag it upwards to view, it's showing errors
  • As you build this process, each failure will be removed and eventually process builds
  • Now it's missing start node transition and an end node
  • As we progress, it will contain various errors, even when we finish laying out the nodes, don't worry, in the next lab you'll take care of all those errors!

DevOps Testing - the devops process

We are going to design a the following steps in our process:
    1. Script task: Validate Job, to check incoming job data
    2. Business rule task: Apply Code Rules, test for peer review
    3. Gateway: to check path to take based on peer review decision
    4. User task: Peer Review, user conducts peer review
    5. Gateway: to check path to take based on peer review results
    6. Script task: Log Failed Review, to note peer review results
    7. Gateway: converges all successful paths from reviews
    8. Script task: Automated Tests, placeholder for automated testing
    9. Script task: Log Deployment, notes job ready for deployment
    10. Sequence flows: transitions between modes (arrows)
    11. End nodes: showing possible end states (to developer / to deployment)

DevOps Testing - adding script task

It's possible to use the side menu to select process elements, but easier maybe to click a node using mini-icons to add next node:
  • click on the start node
  • click on mini-icon Create Task to add task node
  • hover on mini-icon under Task to Convert into Script

DevOps Testing - name validate job

Double click node to name node Validate Job:

Save the process

  • Be sure to regularly SAVE your work, located left top of designer
  • You can (and should!) comment your work, so click on that link
  • Add a comment and click on Save button
  • After saving, should see a green bar showing save succeeded

DevOps Testing - add business rule task

To add business rule task use mini-icons as before:
  • select the Valideate Job node
  • click on mini-icon Create Task to add task node
  • use mini-icon under Task to Convert into Business Rule

DevOps Testing - name apply code rules

Double click node to name node Apply Code Rules:

Save the process

  • Be sure to regularly SAVE your work, located left top of designer
  • You can (and should!) comment your work, so click on that link
  • Add a comment and click on Save button
  • After saving, should see a green bar showing save succeeded

DevOps Testing - adding gateway (XOR)

Click on Apply Code Rules node and use mini-icons to add next node type:
  • click on mini-icon to Create Parallel to add task node
  • hover on mini-icon under the gateway to Convert into Exclusive
  • we want our process to follow only one path (XOR logic)

Save the process

  • Be sure to regularly SAVE your work, located left top of designer
  • You can (and should!) comment your work, so click on that link
  • Add a comment and click on Save button
  • After saving, should see a green bar showing save succeeded

DevOps Testing - adding gateway (AND)

Let's continue on the happy path, where everything goes right... Click on the gateway and use mini-icons to add next node type:
  • click on mini-icon to Create Parallel to add task node
  • hover on mini-icon under the gateway to Convert into Inclusive
  • we want our process to converge here into one path (AND logic)

Save the process

  • Be sure to regularly SAVE your work, located left top of designer
  • You can (and should!) comment your work, so click on that link
  • Add a comment and click on Save button
  • After saving, should see a green bar showing save succeeded

DevOps Testing - add another script task

Next up after passing rule checks and eventual reviews, it's automated testing. This is a workshop placeholder task that would be plugged into testing infrastructure:
  • click on the gateway
  • click on mini-icon Create Task to add task node
  • hover on mini-icon under Task to Convert into Script

DevOps Testing - name automated tests

  • Double click node to name node Automated Tests
  • Note this task just logs this activity, it's outside the scope of this workshop to implement this devops testing infrastructure... it's left for your exploration later...

DevOps Testing - Adding log deployment

Now adding logging script task as shown:
  • add and label script task: Log Deployment

Save the process

  • Be sure to regularly SAVE your work, located left top of designer
  • You can (and should!) comment your work, so click on that link
  • Add a comment and click on Save button
  • After saving, should see a green bar showing save succeeded

DevOps Testing - adding end node

Now try completing this path to the end as shown:
  • add and label end node: Send for Deployment

Save the process

  • Be sure to regularly SAVE your work, located left top of designer
  • You can (and should!) comment your work, so click on that link
  • Add a comment and click on Save button
  • After saving, should see a green bar showing save succeeded

DevOps Testing - the happy path results

Your process design (aka the happy path) is now complete. If a code job is submitted, passes the peer review decision (rules), then it's going to by passed to automated testing and logged for final deployment before heading back to some main DevOps process flow. The process is still missing failed peer review paths, let's add it:

DevOps Testing - add a user task

Now let's go back and design the path where a peer review is needed. This starts with a path from the first gateway to a user task:
  • click on the gateway
  • click on mini-icon Create Task to add task node
  • drag task to location under gateway as shown
  • hover on mini-icon under Task to Convert into User

DevOps Testing - name peer review

Label the user task to Peer Review as shown:

Save the process

  • Be sure to regularly SAVE your work, located left top of designer
  • You can (and should!) comment your work, so click on that link
  • Add a comment and click on Save button
  • After saving, should see a green bar showing save succeeded

DevOps Testing - add another gateway (XOR)

Click on Peer Review node and use mini-icons to add gateway:
  • click on mini-icon to Create Parallel to add task node
  • drag and reposition the gateway and transition arrow as shown
  • hover on mini-icon under gateway to Convert into Exclusive
  • we want our process to follow only one path (XOR logic)

DevOps Testing - add a sequence flow

Based on results of Peer Review, a gateway routes our process. If it passes peer review, then route back to AND gateway:
  • use gateway mini-icons, select Create Sequence Flow
  • reposition the arrow to the AND gateway and click to attach
  • click on sequence line to add blue joint dot, this can be used to reposition as shown

DevOps Testing - add another script task

If it fails peer review, then route to logging results and sending results back to main DevOps process:
  • use gateway mini-icons, select Create Task
  • reposition the task below the gateway and adjust arrow attachments

DevOps Testing - name log failed review

If it fails peer review, then route to logging results and sending results back to main DevOps process:
  • hover on mini-icon under Task to Convert into Script
  • label task as Log Failed Review

Save the process

  • Be sure to regularly SAVE your work, located left top of designer
  • You can (and should!) comment your work, so click on that link
  • Add a comment and click on Save button
  • After saving, should see a green bar showing save succeeded

DevOps Testing - add failed end node

Add and label end node: Send back to Developer:

Save the process

  • Be sure to regularly SAVE your work, located left top of designer
  • You can (and should!) comment your work, so click on that link
  • Add a comment and click on Save button
  • After saving, should see a green bar showing save succeeded

DevOps Testing - those validation errors

  • Note there are validation errors as the process format BPMN2 is automatically validated
  • Trying to building process and saving generates errors (validation)
  • Your process design is incomplete at this stage, in next lab you'll fix all errors

DevOps Testing - finished process design

Your finished process design should look like this (tip: use zoom function, hover in bottom right corner, to fit screen):

Lab completed - results

Click on devops-testing project (use bread crumb menu at the top) and view the domain model assets, this ends lab 5:
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 6 - Completing process details