Discussing BPMN in NWDS

Objective

After completing this lesson, you will be able to develop business processes

Modeling Approaches

Introduction

Modeling a process involves various stages and requires particular elements.

In particular, these stages and elements are:

  • A process definition.

  • An understanding of processes in BPM.

  • The process Development steps.

  • A knowledge about the modeling approaches.

Process Definition

The definition of the process must meet the following parameters:

  • Specific order of events and activities that aim for a certain goal
  • The events and activities have strictly defined inputs and outputs
  • The events and activities are connected in a process and eventually produce a value

The following elements are essential to process modeling:

  • An event that makes the process start.
  • Activities to be performed.
  • Decisions to be taken.
  • A final result of the process flow.
  • Exceptions that may occur during the process.

In the SAP NetWeaver Developer Studio (NWDS), the Process Modeling perspective is used to sketch processes (the business view). The is used to make the process executable (the developer view).

Processes in BPM

The Process Composer adopts the Business Process Modeling Notation (BPMN) to enable easy and intuitive modeling of end-to-end business process. You use the defined in the BPMN specification flow objects, connecting objects, artifacts and swimlanes to create a business process model.

Modeling in the Process Composer allows you to create more than just a descriptive model of a standard business process, but also provides capabilities for you to foresee and model possible exceptions. You can also model exceptions handling to visualize how the process branches after an exception has occurred.

Apart from creating a process model, the Process Composer allows you to define the business logic behind it, which makes the process model executable. To do that, the process composer integrates the SAP specific development and standard project development allowing the consumption of Web services, the usage of Web Dynpro (WD) and Visual Composer (VC) user interfaces (UI), the usage of Adobe offline forms, and the usage of rules and functions in process modeling. Web services assigned to process model automated activities allow a step in the process modeled using an automated activity to be executed through starting a Web service. WD, VC UIs and Adobe offline forms assigned to tasks that are modeled as human activities, enable a human to interact with the process and execute tasks. Rules and functions provide strong capabilities regarding decision making and transformation of data required in the process model.

Another key feature of the Process Composer is that all Web services, UIs, tasks and rules, and functions are reusable units. You can use all of them in different projects and models, which enhances flexible process modeling. Also, you can develop custom reusable units corresponding to your business needs.

Using the Process Composer, you model different processes based on different scenarios. For example, you can model a business trip approval scenario, a leave request approval scenario, a goods delivery scenario, and so on.

Process Development Steps

The following steps are involved in process development:

  1. Defining the business process.
  2. Modeling the process (that is, the sequence of process steps).

    This step includes modeling flow objects, artifacts, and swimlanes.

  3. Defining the business logic and data flow.

    Defining the business logic includes importing and assigning service interface definitions, creating and assigning tasks, and importing and assigning data types.

    Defining the data flow includes creating sequence flow connections and data flow connections.
  4. Compiling and deploying the business process model.

    This step involves installing the process definition and runtime engine.

Modeling Approaches

The figure shows the three different modeling approaches.

Top-down Modeling Approach

The top-down approach focuses on the overall process. It starts with defining the overall business requirements that give the framework of the business process model. After that the model that describes how a requirement is fulfilled is split to separate business processes. Each of these processes has its specific activities and the activities include, on their side-specific services and tasks. The goal of the model, is to depict a broader view of a business process fulfilling a given requirement but not to show how a specific activity is performed. This broader view helps business analysts and managers to see how the overall process goes, where it needs improvements, and whether any elements are missing in the general process. On the other side, a top-down process model that does not focus on the subprocesses’ characteristics and activities does not allow you to see how the subprocesses and their activities behave in reality.

In the Process Composer, you can use the top-down approach to model a process according to the requirements of a specific business case. The starting point is defining a general overview of the process and the process steps.

With this approach, the process modeling includes the following steps:

  • Creating a process.
  • Creating the process steps, represented by activities.
  • Creating an importing the business logic of the process steps (tasks, Web services, rules).

Top-down Approach Guidelines are:

  • Vertical approach.
  • Depicts a broader view of a business process fulfilling a given requirement, but not to show how a specific activity is performed.
  • Focuses on the overall process-starts with defining the overall business requirements as a framework for the business process model.
  • Support business analysts and managers in process improvement efforts and functionality gap analysis.

Bottom-up Modeling Approach

In contrast to the top-down approach, the bottom-up approach starts with defining the activities that stand at the base of the process model. Using them, many different and detailed business processes are created, describing how low level business requirements are fulfilled. The goal of the model is to show how a specific activity is performed to produce a value at the end of the process. In other words, this approach focuses on the subprocesses first. This detailed view of them helps developers and system architects to make the process work. However, a problem occurs when this abundance of details has to be combined to form the overall model picture or when it comes to defining the key requirements the general model should fulfill.

In the Process Composer, you can use the bottom-up approach to model a process focusing on the details of the process steps. After defining the process steps details, that is to say the business logic of the steps, you can combine them to create the process model.

With this approach, the process modeling includes the following steps:

  • Creating and importing the business logic of the process steps (tasks, web services, rules).
  • Creating a process.
  • Creating the process steps, represented by activities.

Bottom-up Approach Guidelines are:

  • Vertical approach.
  • Shows how a specific activity is performed to produce a value at the end of the process.
  • Starts with defining the activities that stand as the base of the process model.
  • Uses many different business processes, describing how low level business requirements are fulfilled.
  • Supports developers and system architects who make the process work.

Inside-out Modeling Approach

Unlike the top-down and bottom-up approaches, which are a rather vertical type of modeling, the inside-out one is a horizontal approach. It consists of defining key processes in the overall process and then complementing them with other processes. This approach may be helpful to modelers in different areas in case none of the vertical approaches is appropriate. Like both other approaches, this one has its downsides as well. One of them is that when using this approach, there might be difficulties in defining what the key processes are.

In the Process Composer, you can use the inside-out approach and represent the key processes in the overall process as subprocesses. You can represent a complex task as a subprocess if you want to focus on the task as one of the key processes in the model. You can later add to the subprocess some human and automated activities, which could act like additional small processes whose details are not important.

Inside-out Approach Guidelines are:

  • Horizontal approach to define key processes in the overall process and then complementing them with other processes.
  • Support modelers in different areas, in case none of the vertical approaches is appropriate.
  • Key processes represented in the overall process as subprocesses.
  • Complex tasks represented as subprocesses, if the tasks are key processes in the model.
  • Human and automated activities added to the subprocess, which act like additional small processes whose details are not important.

Process Modeling Perspective

SAP NWDS enables you to create a process model and the business logic behind it in detail.

The Process Composer consists of two perspectives: the Process Development Perspective and the Process Modeling perspective. These perspectives offer different views of your process model and enable different process modeling roles to be assigned to specific steps within the process.​

Process Development Perspective

The Process Development Perspective offers a full set of capabilities for designing, implementing, building, and deploying a process. A developer can open a process, which is designed by a business analyst in the Process Development Perspective, perform the required changes to make the process executable, and change the status of the process.

A developer can also design and implement a process using the Process Development Perspective as a starting point. Process models created in the Process Development Perspective have a Released for Build status and are checked for errors and constraint violations.

Process Modeling Perspective

The Process Modeling perspective is a subset of the Process Development Perspective. It offers the option of designing a draft process. This perspective can serve as a starting point for process modeling. Business analyst design the process in this perspective and then hand it over to a developer to add the necessary technical details.

The Process Modeling perspective has a subset of views that are available in the Process Development Perspective. These views can be filtered to show only information relevant to the user. Process models created in the Process Modeling perspective have a draft status. These process models are not checked for errors and constraint violations and do not contain error markers. The status of draft process models can be changed to Released to Build when development is complete, which enables the process to be built and deployed.

Abstract Flow Objects

Abstract flow objects are objects with no specific type and are used when the object type is not important, for example, the abstract gateway shows where the sequence flow branches or merges. They can be converted to a specific object type later in the process model development.

SAP NWDS Development Infrastructure

SAP NWDS provides tool kits for various requirements of Java development. These tool kits are based on the corresponding type of project being developed. SAP NWDS also provides integration with a robust SAP infrastructure development environment. The combination of these features produce a highly productive tool that covers the entire development cycle of Java-based projects, including the integration of a source management system and configuration of transport management.

The figure illustrates the development infrastructure of SAP NWDS.

SAP NWDS Services

For large projects, SAP NWDS provides the following services:

  • The Design Time Repository (DTR) – a central repository for storing and versioning Java source code and other design time objects.
  • The Central Build Service (CBS) – a central archive pool based on the SAP component model that holds the build results and the time required to build the environment (libraries, required to compile, generators, build scripts). The CBS is a J2EE application.
  • The Change Management Service (CMS) – manages the transport of software changes within a Java development landscape.

Note

In order to transport packaged software, a description is required in the system landscape. All descriptions for system and transport landscapes are stored in the System Landscape Directory (SLD).

The Design Time Repository is not required for local development because development takes place on the local development PC. The archives required for local development (needed for compiling libraries, generators, and build scripts) must be downloaded to the local environment. This download occurs automatically when a local development configuration in the development infrastructure is created from scratch.

SAP NWDS Perspectives and Views

The NWDS is the ONE tool for performing all required steps in creating integration scenarios. To be able to fulfill all different requirements in one tool, the NWDS works with different perspectives.

The different perspectives offer access to different "places" in the system and offer different tools.

Because SAP NWDS has been built on top of Eclipse (a well-known Java IDE), it has the same main functionalities and general features. To perform SAP BPM related activities, you will need to be in the right perspective in SAP NWDS.

A perspective is a visual container for a set of views and editors, generally put together to help the developer easily implement a specific type of development component. In other words, with a perspective the developer has access to all the functionalities required for his development activities. To perform SAP BPM related activities, three perspectives can be used for specific situations.

When developing SAP PO integration content, you will be working mainly with the following perspectives in SAP NWDS:

  • Design Time Repository

  • Development Infrastructure

  • Process Development

  • Process Modeling

  • Rules Composer (for building business rules)

  • SAP Process Integration Administration

  • SAP Process Integration Designer

  • SAP Process Integration Runtime

If you are developing an application which also contains SAP GUI components such as forms, dashboards, or other type of views, then you will have to choose the relevant perspective (for example, Web Dynpro, Visual Composer, etc.) for that technology in NWDS.

There are three ways to open a perspective, these are as follows:

  1. By using the menu

  2. By using the perspective icon

  3. By using the last used icon

To open a perspective in SAP NWDS, from the Studio screen, choose WindowOpen PerspectiveOther and select the correct perspective as shown in the figure, Open Perspective Menu.

Alternatively you can use the Open Perspective icon, as shown in the figure, Open Perspective Icon.

Additionally, the system stores the recently used perspectives and offers a quick, direct access by a last used icon.

Process Creation

The Process Composer to is used to create processes.

Projects contain all the reusable elements and source files needed to model a process.

Reusable Elements and Source files are:

  • Data types

  • Rules and functions

  • Service interfaces

  • Tasks

  • Processes

Processes contain all the graphical elements and connections needed to form one process model.

Graphical Elements and Connections are:

  • Flow objects

  • Connection objects

  • Artifacts

  • Swimlanes

The palette Modeling Items contains:

  • Activities

  • Events

  • Gateways

  • Connections

  • Artifacts

  • Swimlanes

  • Abstract flow objects

Projects

Before you start modeling a process in one of the modeling perspectives, you must create a project of type process composer and a process. Both of them act as a container in which you store the different elements you use in process modeling.

A Process Composer project contains all reusable elements and source files that you use to model a process.

You make the reusable elements available by creating and importing them. You can use them to represent different steps in the process models. For example, you can use a task to create a human activity. It represents a step in the process where a human action is needed for the process to continue.

Processes

A process in the Process Composer contains all graphical elements and connections between them that together form one process model. The elements are specified by BPMN.

You place the necessary objects representing the process steps and connect them in the sequence in which they are executed in the process. The process can contain another referenced subprocess, which allows you to model processes with different granularity.

Pool and Lanes Process Creation

Pools and lanes let you assign tasks and activities to specific users. A pool is the business process and the lanes specify and structure roles and activities.

The figure shows an example with three pools, and each pool consists of four lanes.

Pool

Business processes are created in pools. A pool represents one participant within a process. A participant can be a business entity or a business role, such as a buyer, seller, or manufacturer. A business process can contain multiple pools.

The procedure for creating pools and lanes is shown in the figure, Using the Composite Designer to Create a Process — Pools and Lanes:

  1. Create a new process (using the wizard).

  2. Define a pool and the necessary lanes.

  3. Call the Process Development Perspective to model your process.

A pool acts as a container for the sequence flow between activities. A sequence flow can cross lanes within its pool, but cannot go outside the boundaries of the pool. The interaction between pools, for example in a business–to–business context, is managed through messaging.

Even if a business process contains multiple pools, only one pool can be active at a time. A business process can only be modeled in the active pool.

Speed Buttons

In addition to the palette, the Process Development Perspective provides speed buttons for quick and easy modeling. The speed buttons appear around pools and flow objects.

In addition to the explained speed buttons there is a waste bin speed button that deletes the corresponding flow object or artifact with its connections.

Note

Choosing the waste bin speed button causes the corresponding flow object or artifact to be deleted without a request for confirmation.

The figure shows the Speed Buttons as a screenshot.

Speed buttons

The speed buttons allow the following:

  • Creates an activity (human, automated, mapping) or a sub-process.

  • Creates a gateway (exclusive choice, parallel split, uncontrolled merge, parallel join).

  • Create an event (start, intermediate timer, end, end error, termination).

  • Creates a connection.

  • Creates an artifact (data object, annotation).

You can use the speed buttons around a flow object in two different ways:

  • Click the speed button to open the menu.

  • Drag and drop the speed button to the area in the pool where you want to place the new flow object.

There is no menu for the connection and the waste bin. The correct connection between objects is automatically created.

While you are creating an activity, a gateway, an event or an artifact the correct connection is automatically added. For example, you create a connection between a start event and a data object, then a data flow connection is automatically created. If you create a connection between a start event and a human activity, a sequence flow connection is created and between the start event and an annotation an association connection is created.

You cannot create activities, gateways, events, connections, and data objects outside of the pool. Annotations can also be placed outside of the pool.

When you model your process, you may want to copy a single flow object, artifact, or a group of flow objects, and use them elsewhere in the process model or in another process model.

Hint

You can also copy a whole pool and its contents. You can copy and paste objects between processes created in the same project.

Log in to track your progress & complete quizzes