Home > BPM, Intalio > Implementing your first process in 6.0 (Beginner)

Implementing your first process in 6.0 (Beginner)

Written by Derek Closson on Jul 22 2009

Introduction

The aim of this document is to explain in simple steps how to design your first process with Intalio|BPMS. In this guide, you will be introduced to the following concepts:

  • BPMN design
  • Web services integration
  • Data mapping

The process that we will create in this document retrieves the current UTC time, and the current time for a particular city in the world. The process will invoke two web service operations to retrieve the UTC time and the time of the city, and the desired city will be passed as an input parameter to the web service call. Pre-requisitesYou’ll need to have Intalio|Designer installed before starting this tutorial. If you haven’t already downloaded it, you can find the latest version at http://community.intalio.com/downloads.html.

You should also download the finished Business Process Project (available here) for reference, and because it contains two files you’ll need to complete the tutorial.

Tutorial: Designing your first process in Intalio|BPMS Designer

Intalio|BPMS Designer models processes with Business Process Modeling Notation (Business Process Modeling Notation), and uses graphical tools to manage the data of the process and integrate external systems (such as web services or forms) without having to write code. Such productivity tools include the Data Mapper, WSDL Visual Connector, and Form Editors featuring either XForm or Intalio|AJAX interfaces.

Reference guides: Intalio|BPMS Designer – Getting Started.

The process itself will consist of 4 BPMN elements:

  • one start event which will trigger the process,
  • two tasks to invoke the two web service operations, and
  • one end event which will return the computed result.

Step 1: Create a Business Process ProjectEvery business process you create with Intalio|Designer must be part of a Business Process Project, which will contain all the local files related to your project, such as:

  • Business process diagrams,
  • XML schemas,
  • WSDL files,
  • Web-based forms,
  • Documentation,
  • And more…

To create a Business Process Project, start Intalio|Designer. If this is your first time running the program, it will ask you for two things:

  1. Your login information for http://community.intalio.com/.
  2. A place to store your business process projects on your computer, called a “workspace”. This can be anywhere convenient for you.

Now, from the menu bar, please choose New > Intalio|Designer Business Process Project. A wizard dialog will open as shown below:

Input the project’s name in the “Project name” field. For this tutorial, we’ll call the project “GetTime”. Click the “Finish” button, and now you have a project container to create and store all your process files in. The mostly-empty project folder will appear in the upper left pane of Designer, called the Process Explorer.

Step 2: Create a BPMN DiagramOnce the project has been created in your workspace, you should add a new Business Process Diagram. From the menu bar, choose New > Business Process Diagram.

Name your diagram “GetTime”, the same as the project itself (but this is not required, this tutorial uses the same name only for simplicity). Click Finish and the diagram will automatically open in Designer. It contains one pool, containing one task.

Double-click on the name of the pool, along the left-hand side, to enter the name of your process. By default it is called simply “Pool”, but we’d rather give it a descriptive name like “GetTime Process”. The pool name also determines the endpoint name, which you’ll learn about later (not in this tutorial).

Step 3: Model the executable processProcesses are modeled in a standard way called Business Process Modeling Notation, or BPMN for short. BPMN is a common language for business analysts to define the semantics in their processes. Intalio|Designer’s main feature is this complete BPMN Modeler to allow the visual modeling of processes.

To add new task or event shapes in your diagram, you can select them from the Palette tab. The Palette tab is in the very left of Designer’s window, but it’s probably hidden under your Process Explorer tab. Just click the Palette tab to display all the shapes you can use in your process diagrams.

Click on any shape to select it, and then click on your diagram to add that shape to it. If you double-click a shape in the Palette, it will display a black border, and then you can click in your diagram multiple times to add multiple copies of the same shape.

The Palette is a good way to learn about all the existing BPMN shapes. However, it’s not always convenient to go back to the Palette each time you want to select a new BPMN shape. There are several other ways you can quickly add new shapes to your diagram, and you can learn about them with our reference guides.

Reference guides: Process Modeling with Intalio|BPMS 5.0.

In BPMN, executable processes should always start with a Start Event, and furthermore executable processes always start by receiving an external message. (We’ll explain the difference between executable and non-executable processes later in this tutorial).

Let’s start modeling our process by adding a Message Start Event shape in the process pool, to the left of the existing Task. You can drag any shape around to move it if there’s not enough room. Now double-click on the Message Start Event shape you just added to rename it, to “Receive Request”. Do the same to the existing task, and name it “Invoke UTC Time”.

Now let’s connect our first two shapes with a Flow Connector, located in the Basic BPMN Shapes sectino of the Palette. Click the Flow Connector, then drag the connection from the Message Start Event (“Receive Request”) to the Task (“Invoke UTC Time”).

You now have one Event and one Task connected in your diagram, and we’ll need two more shapes. The first is a simply a second Task, and the second is a Message End Event. Rename, move, and connect them to look like the screenshot below.

We can now start connecting our process with some external systems, like the TimeService web service.

Step 4: Implement the processImplementing the process refers to binding the process model to existing systems and defining the flow and manipulation of data. During this phase we can also assign tasks to roles or individuals, define exception handlers in case of a failure, and implement advanced concepts such as transactions.

In this tutorial, implementing the process will involve three things:

  1. Define how our process will be exposed to the external world
  2. Define the XML schemas for the message data
  3. Integrating two operations from an existing web service

Step 5: Create the interfaceLet’s begin by defining how our process is started, meaning the interface to the process. An interface is represented by a participant that is calling the process. One process can have multiple interfaces, but in this tutorial we’ll only use one: the BPMS Console, a standard basic interface used to manage all your processes.

To define an interface, add a new Pool in the diagram (from the Palette, in the Basic BPMN Shapes section) and name it “Client”. However, the new pool we have just created will not represent a process that will execute. It is used to represent how the process will be called by the outside world, from other processes, external web service calls, or in our case a human user via the BPMS Console. So, once the pool is created, you will set it to non-executable. Right-click on the new pool, and in the popup menu choose “Set pool non executable”.

In the non-executable Client pool, add a new Task named “Console Invocation”. Use the Message Connection shape (similar to the Flow Connector shape) to connect the “Console Invocation” task to the “Receive Request” shape in your other pool. Use a second Message Connection to connect the “Send Response” shape back to the “Console Invocation” task. Compare your diagram to the picture below (please note that we’ve organized the pools and tasks differently for simplicity as we continue building the process).

Step 6: Define the message schemasDefining an interface includes defining the messages, to answer the questions “what data does my process need to begin?” and “what data is my process going to send back?”. We will answer those questions by using XML Schema elements to define our message content.

It’s time to include our first file in the project, an XML schema named GetTime.xsd. This is available in the completed GetTime example which you should have downloaded already. Simply unzip the GetTime example, and drag-and-drop the GetTime.xsd file from there into the Process Explorer in Designer. Make sure it lands in the GetTime folder itself, and not the “build” folder within.

Now in your Process Explorer, you can unfold GetTime.xsd like a folder, to see all the XML elements that can be used to define the structure of each message. Drag the “ns:TimeRequest” node and drop it on the first process message as illustrated below:

Choose Set schema element ‘TimeRequest’ as the content of the message from the popup menu, and you’ll see a new icon on the message link illustrating that the schema is defining the message contents. Do the same thing with “ns:TimeResponse” and the second process message.

Tip: If you have lots of messages and have forgotten which schemas define them, you can right-click the message connection and choose Navigate > Show attached Schema element and it will be selected in your Process Explorer.

Step 7: Integrate the web service operationsIntalio|Designer features a full WSDL Visual Browser that displays the structure and operations of a WSDL document graphically. Double-click any WSDL in the Process Explorer to see this view. In addition, you can expand each WSDL from your Process Explorer to access its services and operations. You can also access the messages included in the operations and even the schema that defines the data structure of the operations. You don’t need to know any technical details about WSDLs to easily include them in your processes.

Let’s add the second (and last) file to our project, TimeService.wsdl. Like GetTime.xsd earlier, drag-and-drop the file from your unzipped example to the Process Explorer. The WSDL can be unfolded like the XML schema to display various operations and services.

Web service integration is another sort of interface for our process, so let’s make a second non-executable pool named “TimeService” for it. Unfold TimeService.wsdl in the Process Explorer as shown above, and drag the getUTCTime operation to your new TimeService pool. A popup menu will ask you how you want to use the operation, and we want to choose Provide operation ‘getUTCTime’ bound to port ‘TimeServiceSoap’ inside service ‘TimeService’. (single task). Once you’ve done so, a single Task will appear with a generated name and several icons indicating various aspects of its configuration. You can learn more about those from other reference guides and tutorials. Follow the same steps to add the getCityTime operation to the same pool.

Reference guides: Integrating WSDL operations in a process in 5.0

The last step is to connect the process tasks to the web service operations with Message Connections. The order in which you create the links is important because it defines the order in which messages are sent or received. For both our operations, we want the first message to go from the executable task (“Invoke UTCTime” or “Invoke City Time”) to the corresponding web service operation (“getUTCTime” or “getCityTime”), and the second message to go the opposite way. You can think of it this way: your process has to tell the web service which operation is wants to run (and any data the web service needs) before the web service can give your process the results. Connect both tasks to their operations, and it should look like the screenshot below.

Notice that the messages each have their own icons already. This is because the WSDL contains the schema for these messages already, and Designer automatically adds them for you.

Step 8: Create the data flowAll the data involved in a process is contained in variables. Variables are automatically created for you when you integrate an external WSDL or when you create a message connection, including any XML Schemas you specify. We can manipulate those variables and their data through Designer’s Mapper tab. The Mapper is a graphical tool that allows you to define various data manipulations, how the data is then passed through your process, and other process function such as evaluating conditions in process flow or looping.

In our process, variables are going to be used for two different things:

  • invoking the getCityTime operation, and
  • returning the result to the user via the BPMS Console.

Make sure the Mapper tab is the front-most tab along the bottom of Designer’s window, and then select the “Invoke City Time” task in your diagram to make that the active shape in the Mapper. We need to tell the getCityTime operation which city we want information about. More accurately, we want the USER to be able to tell the web service which city they want, and so that data will get passed through our process up until this point. In the Mapper, the source variable with that data is listed on the left as $thisReceive_RequestRequestMsg.body. The destination variable that we’re sending the data to is the only entry on the right side, tnsGetCityRequestMsg.parameters$. Unfold both the source and destination variables, and you’ll see a city element underneath each one. This element was defined in the schemas that we assigned earlier, or by the WSDL’s internal schema. In the Mapper’s mini-toolbar right above the destination variables, find the Connection tool which simply looks like a right-facing arrow. Click it, then the source city element, and finally the destination city element. You should see a line connecting the two, and that’s all it takes!

Now the web service will receive whatever city the user enters when they start the process. Note that mappings are not always this simple, but there are certainly times when you simply want to pass data from one pool to another like this. For more complex mappings including arithmetic, string, XML, or other manipulations, the Mapper supports dozens of functions designed to make these transformations easy. More information on complex mapping is available in advanced tutorials.Reference guides: Intalio|Designer – Data Mapper

There is one last mapping to perform in this process: we need to return the result from the web service operations to the user. You should be able to do this mapping alone, but make sure you select the Send Response event in your diagram first to do it. See the screenshot below for the expected mapping.

Deployment and ExecutionOur process is now fully implemented! Now for deploying, testing, and executing it, please continue to the next article: Deploying and Testing Your First Process.

Advertisements
Categories: BPM, Intalio
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: