BAW - Leverage No-Code Workflow Tooling To Build Quick End To End Applications

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

Session Title

Leverage no-code workflow tooling to build quick end-to-end


applications

Stuart Jones
Business Automation Technical Sales Specialist
Stuartjones@us.ibm.com

Zach Silverstein
Americas Business Automation Tech Sales Leader - RPA/Workflow/PM & IBM Master InventorAuthor
Zachary.Silverstein@ibm.com

Paul Pacholski
pacholsk@ca.ibm.com
Contents

1 LAB INTRODUCTION ....................................................................................................................................3

2 IMPORTING AND USING BPMN FILES ...........................................................................................................4

2.1 LET’S EXPLORE THE SOURCE BUSINESS MODEL .....................................................................................................4


2.2 IMPORT THE BPMN PROCESS INTO BAW ..........................................................................................................6

3 .................................................................................................................................................................. 18

4 CONNECTING WITH EXTERNAL SERVICES.................................................................................................... 19

4.1 INTRODUCTION .......................................................................................................................................... 19


4.2 CREATING THE OPENAPI SPECIFICATION FILE ...................................................................................................... 19
4.3 CREATING A SERVICE IN BAW ........................................................................................................................ 22
4.4 USING THE EXTERNAL SERVICE ....................................................................................................................... 27
4.5 USE THE LOAN SERVICE FLOW IN A SIMPLE COACH .............................................................................................. 30

5 NOTICES AND DISCLAIMERS....................................................................................................................... 41

IBM TechXchange 2023 / © 2023 IBM Corporation 2


1 Lab Introduction
Time is of the essence in today's business world. The quicker you can create workflows and user interfaces, the
faster your business can adapt to critical scenarios. Join our guided lab, where a team of technical experts will
demonstrate how to build a full end-to-end application in just minutes using no-code workflow tools. Experience
the power of rapid development and learn how to extend your business capabilities to new frontiers.

IBM TechXchange 2023 / © 2023 IBM Corporation 3


2 Importing and Using BPMN Files
BPMN is Business Process Model and Notation. This is the Definition of BPMN from the Object Management
group:

“Business Process Model and Notation has become the de-facto standard for business processes diagrams. It is
intended to be used directly by the stakeholders who design, manage and realize business processes, but at the
same time be precise enough to allow BPMN diagrams to be translated into software process components. BPMN
has an easy-to-use flowchart-like notation that is independent of any particular implementation environment.”

As well as being a specification for modeling process, it also provides and interchange format so you can export
your process from one tool and import it into another. This lab shows how to take a BPMN export file from
another system and then import that file into BAW and run the contained process without writing any code.

The BPMN file we will use for this example is exported from IBM Blueworks Live (BWL) but there should be no
difference with an export from some other environment.

2.1 Let’s Explore the Source Business Model


We will not be signing on to Blueworks Live in this lab but we will describe the process and its characteristics so
that you can see where this all comes from. This is the simple process that we will be working with:

• Each activity is properly classified. In this process, we have User Tasks, Service Tasks and a Decision
Task. This is done, in BWL, by setting the Type:

IBM TechXchange 2023 / © 2023 IBM Corporation 4


• There is a set of swim lanes, that enables BAW to establish Teams
• There is a defined set of Inputs and Outputs for each Activity, for example:

The Inputs and Outputs are defined in the BWL Glossary:

The process is exported in BPMN format:

The output from the export is a zip file and is imported as a zip file. The zip file does contain a readable BPMN
XML format file that describes the process.

IBM TechXchange 2023 / © 2023 IBM Corporation 5


2.2 Import the BPMN Process into BAW
We will now import the BPMN zip file into the BAW environment:

• Open a Chrome browser, there is a short cut at the foot of the desktop:

• Open the BAW folder at the top of the page and click on “Workflow Center – Solutions”

IBM TechXchange 2023 / © 2023 IBM Corporation 6


• Log into the Workflow Center using admin/admin as credentials. You will see the following page:

• Click on the Process apps tile and the following page will show:

Each tile on the page represents a Process Application. Note that you may see a different set of tiles.
• Click on the black Import button in the top right of the page. This will open an import dialog:

IBM TechXchange 2023 / © 2023 IBM Corporation 7


Note that this dialog enables the import of BPMN 2.0 format .zip files.
o Click on Browse and Navigate to C:\BPMN Assets. There should be a single zip file in this folder:

o Select the zip file and click on Open. (Or just double click the file)
o The Import dialog box will change to show the filename to be imported

Click on OK.
• You will see a new Process App tile in the Workflow Center:

Click on the title in the new tile to open the process App. Let’s explore what was imported.
• Click on the Purchase Order Planning folder to see a view of all of the artifacts in the Process
Application:

IBM TechXchange 2023 / © 2023 IBM Corporation 8


o Several business objects have been created based on the Inputs and Outputs in BWL
▪ EmployeePurchaseOrder corresponds to the EmployeePurchase Order in BWL
• Employee_Address corresponds to Employee Address (BAW BO names cannot
have spaces)
▪ Approved corresponds to Approved in BWL. BWL shows this as a Yes/No Type and this is
translated to Boolean in BAW. The same applies to the underbudget variable.
o There is a business Process:

IBM TechXchange 2023 / © 2023 IBM Corporation 9


This model is a fairly exact representation of the BWL Process Model. The diagram is not exactly
the same but this is easily fixed by small movements of the activities/connectors (if that sort of
thing bothers you):

o For the Decision Task, there is a service task created – Purchase Order Planning_Check amount
o Note that there is no Human Service implementation for the three User Tasks in BWL. This is
because BAW provides a default Inline User Task and each of the Human Tasks is mapped to
this default implementation:

IBM TechXchange 2023 / © 2023 IBM Corporation 10


o For each of the swim lanes, BAW also creates a Team and so we see 3 Teams:

Each team has the tw_allusers team pre-assigned allowing any user to execute the activities.
• Though we have made no significant changes to the process, BAW ensures that it is executable. Open
the Process by selecting the process from the list of artifacts:

Then open the Process inspector by clicking on the play button in the top right corner of the browser:

This will open the Inspector View on the right side of the page and place a halo around the current
activity:

IBM TechXchange 2023 / © 2023 IBM Corporation 11


The Process Inspector enables singles step execution of the steps in a process and enables a developer
to inspect the process state and to see the variables for the process.
• When started. The Inspector pauses at the first human task – “Enter purchase request” in this scenario -
we can begin execution of the first task by clicking the play button for the task:

A new browser window will open:

IBM TechXchange 2023 / © 2023 IBM Corporation 12


(you may have to enable blocked pop-ups in the browser so if this view does not show up, enable pop-
ups.)
This UI is generated automatically by the default Inline User Task that was mentioned above. The view
has 2 tabs:
o The Task Data shows the variables associated with this human service.
o The Task details tabs show information about the process that is running:

• Enter some data into the Purchase request UI, for example:

IBM TechXchange 2023 / © 2023 IBM Corporation 13


Then click on the Done button in the bottom left corner. The process will progress to the next step,
Check amount, shown by the orange halo:

Click on the Refresh button in the Inspector and the process will move on to the next human task,
Approve purchase request:

IBM TechXchange 2023 / © 2023 IBM Corporation 14


As you did for the first human task, click the play button for the task:

A new browser window will open:

This time, all of the data that you entered in the previous UI is shown as Input. The single Output
variable is Approved. Click on Approved (to set it to true) and then click on the Done button. The process
instance is now completed:

IBM TechXchange 2023 / © 2023 IBM Corporation 15


Congratulations!! You have successfully imported a BPMN process definition and were able to run the process
without and coding!

IBM TechXchange 2023 / © 2023 IBM Corporation 16


IBM TechXchange 2023 / © 2023 IBM Corporation 17
3

IBM TechXchange 2023 / © 2023 IBM Corporation 18


4 Connecting with External Services
4.1 Introduction
Rather than providing specific connectors to applications, BAW takes the approach of making it simple to
establish connection to any external application. It does this by providing simple mechanisms to import and use
REST and WDSL based services. This lab shows the procedure to import an openAPI specification for a REST
service and then to use that service in BAW. The target application that we will use of IBM ODM, but it could be
any application. BAW is not aware that it is connecting to another IBM application, just that it is connecting to a
RESTful service.

4.2 Creating the openAPI specification file


So that you can understand the end to end mechanism here, we will also show how to build the OpenAPI
specification file, as well as how to use that file.

1. Open a Firefox browser window. There is a link at the foot of the page:

2. Open a browser window for the ODM Rule Execution Server. There are links provided at the top of the
page:

Log in using the credentials odmAdmin / odmAdmin and the following page will load:

IBM TechXchange 2023 / © 2023 IBM Corporation 19


3. Click on the explorer tab to show a list of the deployed rule applications:

Click on the my_deployment link and then the my_operation link that follows this page
4. Select the Retrieve HTDS Description File link near the top of the page

IBM TechXchange 2023 / © 2023 IBM Corporation 20


This is the page where we will generate the openAPI specification file:

5. Ensure that the following values are set


a. The Format should be set to openAPI – JSON
b. Select Latest ruleset version
c. Select Latest RuleApp version

This will look as follows:

IBM TechXchange 2023 / © 2023 IBM Corporation 21


Note that the original path, /my_deployment/1.0/my_operation/1.0 has changed to
/my_deployment/my_operation. This means that this API will be suitable for any version of this ruleset,
so long as the inputs/outputs remain constant.
6. Select C:\ODM Assets as the download folder.

This completes the section of creating the openAPI specification File

4.3 Creating a service in BAW


Now we’re going to import the openAPI specification that we created above into BAW and use it to create a
service.

IBM TechXchange 2023 / © 2023 IBM Corporation 22


7. Open a Chrome browser and then open the BAW Process Designer. There is a link for the Chrome
browser right next to the one that you used for Firefox, above. Use the shortcuts menu to open the IBM
Workflow Center, the Workflow Center – Solutions shortcut:

Log in using the credentials admin / admin and the following page will load:

There is a tile for CMMN based, case oriented workflows and a second tile for BPMN based, process
oriented workflows. We are going to create a new process oriented workflow. Click on the blue Create
icon:

You can provide any name that you like for this new Process Application. Ours is called REST Import.

IBM TechXchange 2023 / © 2023 IBM Corporation 23


Click on Create. The Process Application will open automatically in Process Designer.
8. Hover over the Services folder on the left side of the page. The folder will turn blue and a plus sign will
appear. Click on the plus sign to add a new Service:

Select External Service:

9. The dialog for a new service import will now appear. There are several choices, but we are importing a
REST service, which is the default.

IBM TechXchange 2023 / © 2023 IBM Corporation 24


Click Next.
We are importing the openAPI specification that was created in the previous step and so we need to
navigate to that service and select it. Click on the folder icon:

10. Navigate to C:\ODM Assets and select the file that we saved earlier:

Click on Open.
11. Once the filename field is completed, the Next button will be enabled. Click on Next. The importer will
analyze the openAPI specification file and list all of the available operations. You can choose which

IBM TechXchange 2023 / © 2023 IBM Corporation 25


operations to import. In our case, there is just one operation. Click on Next.
If the target server is already defined to our Process Application then we can select an existing server. In
our case, our target server is new and so a new Server artifact will be created. This is the default action.
Click on Finish.

12. The External service import completes and the designer opens the new definition. Let’s see what was
created.
a. External Service
Input and Output business objects for the service. In this instance, the openAPI specification
has a Request object, a Response object and an Error object. These can be viewed in the Data
section of the left hand menu:

IBM TechXchange 2023 / © 2023 IBM Corporation 26


The other 2 objects shown, Loan and Borrower are contained within Request and Response.
Note that all of these BOs are classified as ‘Discovered’ – as they were discovered in the
openAPI specification.
b. Details
information about the service
c. Binding
This provides a link to the Server definition that was created for the service
d. Source
This tab shows the source openAPI specification that was imported
Our service is available and we didn’t need to write any code so far. Now we need to see how to use it!

4.4 Using the External Service


The common way to use an External Service is to create a Service Flow:

13. As we did for the External Service definition, click on the plus sign in the services folder but, this time,
select Service Flow:

IBM TechXchange 2023 / © 2023 IBM Corporation 27


14. Give your service flow a suitable name, we picked Loan Service, and click on Finish

15. The service flow editor opens and provides a Start node connected to an End node. Click on the twistie
of the Activities pallete (on the right). This will open up the set of available activities.

Hover over the first activity in the list. Drag the activity onto the palette and drop it on the connector
between the Start and End nodes. The connector will ‘glow’ pink when the cursor is correctly positioned.
There Service is now a part of the flow:

Double-click on the Activity name and rename the Service, for example Call Loan Rules

16. At the bottom of the editor is the configuration section, it opens, by default, to the Implementation tab.
In the Implementation Section, on the right, click on Select… and click on my_operation API in the list of
available External Services:

IBM TechXchange 2023 / © 2023 IBM Corporation 28


Then click on the Operation pull-down and select the operation. In this case, there is a single operation
but a REST service many have many.

17. Now select the Data Mapping tab. Here we get to specify which of our Service Flow variables will be used
in the service:

But … we haven’t defined any variables for our service up to this point! For the Input Mapping, click on
the ‘magic wand’ icon:

BAW will automatically create a variable of the appropriate type, based on the requirements of the
Service that is being called:

IBM TechXchange 2023 / © 2023 IBM Corporation 29


Be sure to select Input as body needs to be an Input Variable. Then click on Finish. Repeat this for the
Output Mapping. Note that 2 variables are created for the output. This time select Output, to create
Output Variables. Select the Variables tab for this Service Flow to see the result:

Note that it is still possible to create the variables manually and assign them manually to the input and
output mappings.

The definition of the service is now completed. In the next section we will build a simple coach showing how the
service might be used. Some items to note:

• The Service Flow that was built is quite simple. We did not implement capabilities to handle non-
availability of the Loan service.
• There are many circumstances where we do not wish to expose the ODM specific nature of the Business
Objects used in the External Service. In this instance, it is common to provide marshalling/de-
marshalling capabilities before and after calling the service.

4.5 Use the Loan Service Flow in a Simple Coach


We will now build a simple Human Service to exercise the Loan service that we created above.

18. Hover on the User interface folder and click on the plus sign. Then select Client-Side Human Service

IBM TechXchange 2023 / © 2023 IBM Corporation 30


Give your human service a name, select “intended for use on multiple devices” and click on Finish

this will open the Human Service editor where you will see a Start node, an End node and a Coach
activity.
19. From the right hand palette, hover over the Service activity and drag it onto the editor. Drop it above the
Coach (not connected to the flow):

20. Click on the name (Service) of the Service that you just added and give it a suitable name:

Press enter when you’re done and keep the Service activity ‘in focus’ (It will have an orange ‘halo’).
21. On the Implementation tab, at the bottom of the page, select Loan Service as the Implementation:

IBM TechXchange 2023 / © 2023 IBM Corporation 31


22. As we did previously, we will now create variables for this service
a. Click on the Data Mapping tab.
b. Select the ‘magic wand’ for the input:

c. We will create a Private variable so leave Input and Output unchecked:

Click on Finish.
d. Repeat this for the Output Mapping. Click on the Variables tab and you should see the following:

While we are in the Variables section, we need to initialize the input variable. Highlight body (on
the left hand side) and select the Has Default option on the right:

IBM TechXchange 2023 / © 2023 IBM Corporation 32


e. Note that this also populates the data mappings:

23. Click on the Coach tab to open the coach editor. When presented with the Starting Point dialog, click on
OK

Click on the view selector to the right and select Variable:

This will show a list of all of the variables that we just defined:

IBM TechXchange 2023 / © 2023 IBM Corporation 33


Hover over body – it will turn to blue – and drag it onto the page above the OK button. As you do so, a
yellow line will appear above the button to show when the variable will be dropped. Release the cursor
and the elements that make up the borrow will be displayed on the page:

There are now lots of data fields on the page and we don’t need them all so let’s do some cleanup:

IBM TechXchange 2023 / © 2023 IBM Corporation 34


a. Right-click on __Decision I D __ and select Delete:

b. In the same way, delete Messages. Once deleted, you may also need to delete the remaining
blue content box
c. Click on the selector and select All views:

Type Horizontal into the coach view search box:

Drag the Horizontal layout coach view and drop it above the Name field at the top of the page:

Click on Name and then drag it onto the layout that you just created, inside the blue box. Do the
same with the Credit Score field. Drop it to the right of the Name field – look for a horizontal
orange bar to appear when you have the right position. Repeat this for the Yearly Income field.

IBM TechXchange 2023 / © 2023 IBM Corporation 35


This makes the page more compact and easier to work with. Repeat this procedure with a
second Horizontal layout for the Amount, Duration, Yearly Interest Rate and Yearly Repayment
fields. Here is how your view should look:

d. Now drop the loan variable (note: not loanOutput) onto the page. Drop it below the OK button.
Use a third Horizontal section to collect the Amount 2, Duration 2, Yearly Interest Rate 2 and
Yearly Repayment 2 fields. Here is how your view should look:

21. The last thing to do is to integrate our loan service with the UI.

IBM TechXchange 2023 / © 2023 IBM Corporation 36


a. Type Button in the coach view search:

b. Drag the Button view onto the editor, place it just above the OK Button. Click on the button and
an edit selector will appear. Click on the pencil:

Change the name of the button to Call Rules. Click on the button again and this time select the
paint can. Pick a new color for the button:

c. Switch to the Diagram view. From the right hand palette, hover over the Service activity and drag
it onto the editor. Drop it above the Coach (not connected to the flow):

d. Hover over the Coach. A connector will appear:

IBM TechXchange 2023 / © 2023 IBM Corporation 37


Position the cursor on the end of the arrow and connect the Coach to the Call Loan Rules service:

Note that the new connector is tagged with Call Rules – the name of our Button. The editor has
associated this connector with the most likely boundary event in the Coach. (You can change
this if the editor doesn’t get it right)
This means that when the Call Rules button is pressed in the Coach, processing will pass to the
Call Loan Rules service, just what we need.
e. We need to tell the Human Service what to do when the service completes. We want to pass
control back to the Coach and so we connect the Call Loan Rules service back to the Coach:

The human service is complete.


22. Let’s test this to see how it works. Click on the play button in the top right corner of the page:

IBM TechXchange 2023 / © 2023 IBM Corporation 38


The human service will execute, opening a new browser window:

23. There is a validation rule in Loan Rules that the Loan Amount cannot exceed $1m. Put a value greater
than 1,000,000 in the Amount field and click on Call Rules. You should see the following:

24. Let’s now exercise the rules a bit more. Enter the following:
a. Name=John Doe ; Credit Score=690 ; Yearly Income=145000 ; Amount=30000 ; duration=120 ;
Yearly Interest Rate=0.055 ; click on Approved
(If Yearly Repayment is 0, the rules will calculate the payment)
Click on Call Rules. You should see the following:

IBM TechXchange 2023 / © 2023 IBM Corporation 39


b. Name=John Doe ; Credit Score=590 ; Yearly Income=85000 ; Amount=200000 ; duration=120 ;
Yearly Interest Rate=0.055 ; click on Approved

c. Feel free to experiment with other values. As a guide, the credit score minimum is 200, the loan
maximum is 1,000,000 and the required debt to income ratio is 0.3.

Congratulations you have implemented an external service and a user interface to use that service without
writing a single line of code!

IBM TechXchange 2023 / © 2023 IBM Corporation 40


5 Notices and disclaimers
© 2023 International Business Machines Corporation. No part of this document may be reproduced or
transmitted in any form without written permission from IBM.
U.S. Government Users Restricted Rights — use, duplication or disclosure restricted by GSA ADP Schedule
Contract with IBM.
This document is current as of the initial date of publication and may be changed by IBM at any time. Not all
offerings are available in every country in which IBM operates.
Information in these presentations (including information relating to products that have not yet been announced
by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional
technical or typographical errors. IBM shall have no responsibility to update this information.
This document is distributed “as is” without any warranty, either express or implied. In no event, shall IBM
be liable for any damage arising from the use of this information, including but not limited to, loss of data,
business interruption, loss of profit or loss of opportunity. IBM products and services are warranted per the
terms and conditions of the agreements under which they are provided. The performance data and client
examples cited are presented for illustrative purposes only. Actual performance results may vary depending on
specific configurations and operating conditions.
IBM products are manufactured from new parts or new and used parts.
In some cases, a product may not be new and may have been previously installed. Regardless, our warranty
terms apply.”
Any statements regarding IBM's future direction, intent or product plans are subject to change or
withdrawal without notice.
Performance data contained herein was generally obtained in a controlled,
isolated environments. Customer examples are presented as illustrations of how those customers have used
IBM products and the results they may have achieved. Actual performance, cost, savings or other results in
other operating environments may vary.
References in this document to IBM products, programs, or services does not imply that IBM intends to
make such products, programs or services available in all countries in which IBM operates or does business.
Workshops, sessions and associated materials may have been prepared by independent session speakers, and
do not necessarily reflect the views of IBM. All materials and discussions are provided for informational
purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any
individual participant or their specific situation.
It is the customer’s responsibility to ensure its own compliance with legal requirements and to obtain advice of
competent legal counsel as to the identification and interpretation of any relevant laws and regulatory
requirements that may affect the customer’s business and any actions the customer may need to take to comply
with such laws. IBM does not provide legal advice or represent or warrant that its services or products will
ensure that the customer follows any law.
Notices and disclaimers (Continued)
Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to
interoperate with IBM’s products. IBM expressly disclaims all warranties, expressed or implied, including but
not limited to, the implied warranties of merchantability and fitness for a purpose.
The provision of the information contained herein is not intended to, and does not, grant any right or
license under any IBM patents, copyrights, trademarks or other intellectual property right.
IBM, the IBM logo, and ibm.com are trademarks of International Business Machines Corporation, registered in
many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other
companies. A current list of IBM trademarks is available on the Web at “Copyright and trademark information”
at: www.ibm.com/legal/copytrade.shtml.

IBM TechXchange 2023 / © 2023 IBM Corporation 41


IBM TechXchange 2023 / © 2023 IBM Corporation 42

You might also like