KEMBAR78
WB835 Unit06 Script | PDF | Variable (Computer Science) | Page Layout
0% found this document useful (0 votes)
22 views41 pages

WB835 Unit06 Script

The document outlines the objectives and key concepts of Playback 1, focusing on business data, services, and coaches within a process. It emphasizes the importance of data flow between coaches and tasks, the creation of business objects, and the initialization of complex objects and lists. Additionally, it discusses variable mapping, the sharing of business objects across applications, and the management of nested processes.

Uploaded by

ahmedhany1992
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views41 pages

WB835 Unit06 Script

The document outlines the objectives and key concepts of Playback 1, focusing on business data, services, and coaches within a process. It emphasizes the importance of data flow between coaches and tasks, the creation of business objects, and the initialization of complex objects and lists. Additionally, it discusses variable mapping, the sharing of business objects across applications, and the management of nested processes.

Uploaded by

ahmedhany1992
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

WB835 Unit 6 Transcript

Slide 1

Playback 1: Business data,


services, and coaches

© Copyright IBM Corporation 2020


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

Playback 1: Business data, services, and coaches


This unit explains the goal of Playback 1: to demonstrate that data flows from one coach to
another and from one task to another inside the process. All data is bound on the coaches, and if
the same data is shared across multiple tasks, playback participants can track the data when it
moves through the various activities.

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 2

Unit objectives
• Build a business object
• Initialize a complex object and a list
• Build a service
• Use coaches to define and implement guided user interactions
• Implement a service for an activity in a process
• Map variables between a nested service and an activity in the overlying
process
• Describe the object methods

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

After completing this unit, you should be able to:


• Build a business object
• Initialize a complex object and a list
• Build a service
• Use coaches to define and implement guided user interactions
• Implement a service for an activity in a process
• Map variables between a nested service and an activity in the overlying process
• Describe the object methods

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 3

Playback 1: Business data and services


• The goal is to
demonstrate data flows
from one coach to
another, and from one
task to another inside
the process
• All data is bound on the

1
coaches, and if the
same data is shared
across multiple tasks,
Playback participants
can see the data move
through the different
activities

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Playback 1: Business data and services


The goal of Playback 1 is to demonstrate data flows from one coach to another, and from one
task to another inside of the process. All data is bound on the coaches, and if the same data is
shared across multiple tasks, playback participants can track the data when it moves through the
different activities.

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 4

Topics
• Creating a data model
• Building services
• Building coaches
• Implementing services in a process

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

This unit is broken down into the following topics


• Creating a data model
• Building services
• Building coaches
• And Implementing services in a process

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 5

Key concepts in this unit


• Playback 1: Business data and services: To demonstrate data flows
from one coach to another, and from one task to another inside of the
process
• Business objects: Are used to represent the business data that is
relevant in the context of your business process
• Coach: The user interfaces for human services
• Services: Made up of steps that define what happens when service
(task) activities are triggered in a process
• Data mapping: Is used to map the input and output variables of the
service to variables in the process so that runtime variable values can
be passed to and from the service

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Key concepts discussed in this unit are presented on this slide.

• Playback 1 involves demonstrating the process can move from one coach to another inside
the process.
• Business objects are used to represent business data that is relevant to the context of the
process.
• A coach is a user interface for human services.
• Services are made up of activities that are triggered in a process.
• And Data mapping is used to transfer data to and from services in the process.

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 6

Creating a data model

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Creating a data model

Until now, simple variables have been implemented to drive process flow. Process flow data is
only part of the data necessary for the process to function correctly though. Much of the process
flow data is derived from or dependent upon business data. In this Playback, the project
development team defines the business data model for the process.

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 7

Defining the business object data model


• Business objects are used to represent the business data that is
relevant in the context of your business process
• Create a data model that accurately reflects the business data and its
structure
▪ Do not be influenced by existing logical or physical data models

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Business objects are used to represent the business data that is relevant in the context of your
business process. You want to create a data model that accurately reflects the business data and
its structure. Do not allow existing web pages, existing systems, coaches, web services, database
tables, or other influences to affect the development of your process business objects that belong
in your data model.

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 8

Building a complex business object

• When the system data


toolkit or other
business objects do
not match the
specifications, create
a custom business
object
• Create rules about
complex data that is
nested or hierarchical

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

When the System Data toolkit types or the other business objects do not match the project
specifications, you can create custom business object types. In IBM Business Automation
Workflow, you can use a base business object type or define a new complex structure to create a
custom business object type. You can create rules about complex data that is nested, or
hierarchical. Data that is referenced within the text of a rule is not limited to simple object types
such as String, Integer, or Date. You can also create complicated rules with nested object
structures.

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 9

Building the data model


After you define the data, organize your data into different logical units:
• Some organization is obvious, but other data is more difficult to organize
• Look to existing data models in your company for ideas
• Example of a business object: A structure that contains multiple elements, all
pertaining to the same “subject,” which is what the structure represents

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

After you define the data, organize your data into different logical units. An example might be a
street address, city, and state that becomes a unit that is called address. Some organization is
obvious, but other data is more difficult to organize. Look to existing data models in your company
to help you create the object.

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 10

Standardizing the variable naming convention


• Business objects begin
with an uppercase letter
• If the business object
consists of more than one
word, capitalize the first
letter of each word
• Variables and business
objects are case-sensitive
• In this example, the
position variable uses
the business object type
Position

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Business objects begin with an uppercase letter. Adopt this convention to differentiate variables
from business object types. If the business object consists of more than one word, capitalize the
first letter of each word. In the example that is provided in the slide, the position variable uses the
business object type Position. Keep in mind, variables and business objects are case-sensitive.

10

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 11

Refactoring
• Limited refactoring support for the following cases:
▪ Business object rename in processes and services
▪ Business object attribute rename in processes and services
▪ Local variable rename in the specific process and related services

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

• Over time, applications change and business objects, their attributes, and variables might be
renamed. However, many parts of a business process might reference or have a dependency
on a business object, an attribute, or a variable. Therefore, renaming any object can produce
unexpected results.
• For instance, suppose you created an object type address that contains city, state, and postal
code elements. Later on, your company goes international and wants to specify the current
object as a US address and add other addresses that belong to other countries. If you
change the object name, anything that references the original address object throws an error,
and you must manually parse through all the objects in your process application to correct the
errors.
• Refactoring offers a one-step process to update references to the changed variable name.
When you use the combination Alt + Shift + R to rename an object, a rename window opens
and guides you through targeting all the things in the library that use the old object’s name.
• Refactoring is available to those objects referenced under the Variables tabs in the processes
and services in your Process Application.
• Unfortunately, one limitation is that any JavaScript code found in coaches are not updated.

11

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 12

Complex objects and lists


• You can declare any variable to be a list, or an array, of a business
object type
▪ Instead of containing only one instance of the type declared (String,
Date, or Integer), your variable holds many of the same business object
types
• All complex business objects and all lists (arrays) must be
initialized before you use them in a process or service
▪ If your business object type includes elements that are themselves
complex business object types other than the simple types, then you
must initialize them before you use them
▪ You must also initialize lists before you use them, by using .listOf

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

When declaring lists, developers can declare any variable to be a list, or an array, of a business
object type. This statement means that instead of containing only one of the types declared
(String, Date, Integer), the business object holds many of the same business object types.
Therefore, if developers want to create a business object that contains multiple integers, they
create a private list variable of type Integer.
To create a variable list, select the Is List: checkbox, and the list object adds the (List) designator
after the variable type in the variable name.

12

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 13

Initializing complex objects and lists


• All complex business objects and all lists (arrays) must be initialized
before you use them in a process or service

• Before using a complex business object, initialize it by using a script like


the following script:
tw.local.requisition=new tw.object.Requisition();

• You must also initialize lists before you use them, by using .listOf
tw.local.yourStringList = new tw.object.listOf.String();

• Then, you add elements to the list:


tw.local.yourStringList[0] = "First Element";
or
tw.local.yourStringList.insertIntoList(
tw.local.yourStringList.listLength, "First Element");

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

In IBM Business Automation Workflow, all complex business objects and all lists must be
initialized before they are used in a process or service. If the complex business object or list is not
initialized, the process receives runtime errors, or notices that the coach controls to which the
business objects are bound do not behave as expected.

If a business object includes nested complex business objects, then you must initialize the nested
business objects before they are used. You also initialize lists before you use them with the
method .listOf. This command works for simple and complex business object types.

13

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 14

Nested processes and variables


• A subprocess has access to the data of the parent process
▪ Data mapping is not required to pass data into or out of the subprocess
▪ You can also declare private variables within the subprocess that are not
visible to the parent process

• Linked processes require input and


output variables in the nested
process and variable mapping from
the parent process
▪ The variables must be of the same
variable type when mapping

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Carefully consider how variables are passed from the parent process to other processes when
using nested processes. Subprocesses and linked processes handle variables differently.
• A subprocess has access to the data of the parent process, and data mapping is not
required to pass data into or out of the subprocess. However, you can also declare private
variables within the subprocess that are not visible to the parent process.
• Linked processes require developers to create input and output variables in the nested
process and to map variables from the parent process to the linked process. The variables
must be of the same variable type when mapping. This input and output variable declaration
allows the data values to pass successfully from one process to another.

14

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 15

Sharing a complex business object


• Custom business objects in a process application are available for all
processes and services that are included in the process application
• Share custom business objects across process applications through
toolkits
• If the business object and its values must be accessible to other
instances at run time, check the shared object checkbox in the
Behavior section of the Business Object interface
▪ Shared business objects apply only to a complex type
▪ The data within a shared business object is shared between business
processes and tasks

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

When a custom business object is created in a process application, that object is available for all
processes and services included in the process application. To share a custom business object
across process applications, create or store the custom object in a toolkit. Then, create a
dependency on that toolkit from the process applications that require the variable.
The Shared Object checkbox of the business object and its values must be accessible to other
instances at run time. Shared business objects apply only to a complex structure type. The data
within the shared business object is shared between business processes and tasks.
A shared business object uses database resources. The data within a shared object is persisted
to the database when the shared object is created. The business process or task is persisted to
the database when the JavaScript method save() is applied to the shared business object.

15

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 16

Building services

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Building services
• After modeling the business process, it is time to think about these processes as sets of
interactions.
• These interactions represent a critical piece of Business Process Management (BPM).
Instead of focusing solely on the chains of activities with their sets of inputs and outputs, think
about the protocols and agreements that are made between the users.
• Services provide a strategy for choreographing these protocols and agreements.

16

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 17

What are services?

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Services are made up of steps that define what happens when the service activities are triggered
in a process. Each step enables the service to do a different job, from integrating with an external
data source to generating HTML forms known as coaches.

17

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 18

Creating services

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

You use IBM Process Designer to build reusable services that implement the activities in your
processes. Services differ from processes in that they have no lanes. The service palette is
customized with what items you can use to build the service. For example, in this Playback, you
are examining human services. A coach can be added only to a human service. For a web
service, a service modeler and palette are not required.
When creating a service, developers give them human-readable names. They use spaces
between the words so other developers can understand what this service does. Name the service
after the activity that the service does so developers can identify its function without having to
open the service.
Services use business objects and variables just as processes use business objects and
variables. Remember, these objects can be declared as private, input, or output. Private variables
are values that are seen only within the service; they are also available to any nested services.
Input variables are mapped to values that you can pass into the current service. Output variables
are mapped to values that you can pass out from this service to a parent process or service.

18

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 19

Building coaches

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Building Coaches
A human service presents a web form for a process participant to interact with. This web form in
IBM Business Automation Workflow is an HTML page that is called a coach. This topic covers the
fundamentals of building coaches.
During this part of the Playback, developers do not look to alter the appearance or add any extra
functions to their coaches. Developers concentrate on creating forms that can be filled out and
ensuring that data is posted back to the server. The process gathers all the necessary data from
the users in the process to complete the overall process.

19

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 20

Coach overview
• Coaches are the web-based user interfaces that provide process-
related data to Process Portal users and collect input from those users
• Coaches are implemented in the client-side human services, which
manage the flow from one coach to another
• Two types of user interface are available for human services:
▪ Task completion
▪ Stand-alone services (dashboard, a startable service, or a URL service)
• Coaches provide a way for team members to input business and
process data into the process in a dashboard or task completion
• Coaches provide a wizard-like approach for team members to complete
their tasks
• The coach is rendered in a browser for the business user when the
coach service (the process activity of the participant) is run
• Similar to building processes and services, developers use a
WYSIWYG interface to build coaches by dragging objects from a widget
palette onto the coach designer canvas

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

• Coaches are the user interfaces for human services. You have two types of user interfaces
for human services: task completion and stand-alone services.
• A task completion user interface implements a specific activity within a process instance. It
also has access to the details of that process instance.
• A stand-alone service can be a dashboard, a service, or a URL service. A dashboard is a
stand-alone user interface that users can run at any time. Users can access dashboards
through the Process Portal.

20

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 21

Build user interface for human services by using coaches


• To build the user interface for human services in the Process Designer, you
use coaches
• Coaches can contain coach views, also known as views
▪ A view is a reusable unit that you use in coaches and other coach views
• A view generally defines the user interface for a particular type of data,
giving you the potential to customize the user interface by specifying the
configuration options

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

• The UI toolkit contains a set of views for designing applications that can run on multiple
device types, such as mobile and desktop devices. Each view points to a specific set of files:
o A JavaScript file that provides the behavior of the view
o Image files to represent the view on the palette and on the canvas
o And a preview JavaScript file that shows a preliminary image of the view when it is
dropped on the coach editor palette
• The view can also have other files such as CSS and LESS files for styling, localization files,
and other control-specific resource files, but these additional files are optional.
• Views are covered in more detail in the next Unit.

21

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 22

Laying out a coach by using the grid layout


• You can lay out a coach by using cells in a grid
• A grid is a container that is 12 units wide
▪ The actual width of each unit is variable and depends on the screen size
• Within a grid, you can have containers and cells
▪ A container groups related cells
▪ Cells are placeholders for content

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

• You can lay out a coach by using cells in a grid


• A grid is a container that is 12 units wide
o The actual width of each unit is variable and depends on the screen size
• Within a grid, you can have containers and cells
The grid layout feature is useful when building your coach.

22

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 23

The coach designer interface


Coaches are web-based forms or dashboards that a developer builds for
business users to complete tasks that are assigned to them at run time.

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Coaches are web-based forms or dashboards that a developer builds for business users to
complete the tasks or follow process or task performance metrics that are assigned to them at run
time. All development occurs inside a web browser, so developers have a “what you see is what
you get” or WYSIWYG view of the rendering of the coach.
Coaches are made of up of views and controls. The view provides the user interface elements
and layout for the coach through sections and controls. Each view can contain one or more
views, which creates a parent-child relationship between these views. At run time, the parent view
is rendered as a <div> tag that contains a nested <div> tag for each child view. Each view also
has a binding function to use data values from a business object, CSS code to control its visual
layout, and JavaScript to define its behavior.

23

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 24

Panels
• Views contain a group of views or controls, or both (other views).
• Views that are panels contain a group of panels or controls or both.
• Panels control the layout of your controls after they are rendered in the
browser.

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Panels are views that contain a group of other panels or controls or both. Panels control the
layout of your controls after they are rendered in the browser. The controls are made of HTML div
and span sections. To add a panel, select Layout in the Building blocks section and drag the
Panel to a spot on the canvas. When the mouse cursor turns to a green plus (+) sign, you can
drop the panel. Gold highlights of other objects on the canvas highlight where the object can be
placed. A tabs control is also used to group similar sections. All the panels can be nested within
each other.

24

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 25

Controls
Controls are Views that include buttons and other standard HTML objects.

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Alternatively, you can click the plus sign (+) in a grid to add Controls or objects to the canvas.
Controls are Views that include buttons, check boxes, input boxes, date/time pickers, select
controls, and other standard HTML objects. Although the standard objects cover most of a
developer’s needs, IBM Business Automation Workflow allows developers to customize the
controls. Controls are customized by using a custom HTML block on the coach designer that
includes JavaScript, CSS, or custom HTML elements. When the controls are laid out, it is easy to
copy and paste them into a view to share with other coaches across your process application or
other installations.

25

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 26

View object settings


View property settings are separated into five categories

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Views, whether sections or controls, contain settings for use in the coach. The property settings
are separated into five categories:
• General: This section describes the common properties of the object, such as the control ID,
and the behavior, such as binding and label visibility
• Positioning: Sets the padding, margins, height, width, and overflow of the objects on the
canvas
• Configuration: Allows developers to modify the configuration attributes of an object
• Events: Define logic to be called based on events such as on load, on change, on focus, and
on blur.
• Visibility: Sets the visibility of the object through a variable value, a rule, or a script
• The HTML Attributes section allows developers to add classes and attributes to the HTML
objects that are rendered in the browser

26

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 27

Adding controls from server-side variables

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

• A quick and easy way to add controls to a coach is to drag the variable directly to the coach
canvas. IBM BAW binds the variable to an appropriate control such as an input box for a
string variable.
• Before you can do this, you first need to define the simple and complex variables for the
service.
• You add variables in the same manner as adding views. A developer can drag the individual
elements of a complex variable or the entire variable.
• If the output of the coach controls the process flow, add the process flow variables necessary
to control the process directly on the coach. They look like input boxes when running the
coach, and when doing a Playback, developers enter the process flow data into that input box
to control the gateways.

27

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 28

Buttons and sequence flow

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

When designing a client-side human service, you can layout the interactions using a flow
diagram. The editor leverages the same BPMN elements as used in process modeling for
convenience sake.
Following the logic of the diagram displayed on the slide, you can see the first thing completed is
a service task that retrieves department names. If an error occurs in that service, the user is
presented the Show Error Message coach. If the service is successful, the Hiring Form coach is
next displayed.
When the Hiring Form is submitted, a script task labeled Map Vars is executed.
Buttons allow the form to post the data back to the server from the client. On the slide, the
sequence flows for the buttons include the Submit button and the Retry button for when there is
an error.
This slide represents the completed Hiring Request client-side human service.

28

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 29

Setting screen size

Size Resolution
Small 640 pixels or less
• The controls can respond dynamically Medium 641 - 1024 pixels
to three different screen sizes.
Large More than 1024 pixels
Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Process Designer supports three size layouts for user interfaces.


Use the Positioning tab in the properties for the control to set the size of the control. The settings
resize the coach to match three different formats: small, medium, and large. These resolutions
approximate the resolutions for mobile devices, tablets, and desktop displays.

29

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 30

Implementing services in a
process

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Implementing services in a process

30

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 31

Implementing services

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

When developers first add an activity to a lane in a process, it has default functions. To specify
what happens when an activity is triggered at run time, you must attach a service. Services are
attached in the Implementation section of the Properties tab of an activity. Services can be run
from the process, from a coach, or from other services.

31

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 32

Business objects, variables, and data mapping


• Business objects
▪ In the Process Designer, business objects are complex objects that are
created from simple business objects or other complex business objects
▪ Define the business data
• Variables
▪ Instantiate business objects that activities use in a process or by steps in
services, such as service flows or human services
▪ Capture and store the business data
▪ Each has its own type and scope
▪ Must be declared before you can start to use them
• Data mapping
▪ In the Process Designer, you set the input and output data map to pass
variables to an activity or a step
▪ You must set the input and output mapping for each activity in a process
▪ Map variables in the parent process to the variables received and generated
by nested processes and services

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

All Services share the same business objects and instantiate business objects using variables.
You must set the input and output mapping for each activity in the process. If you are using a
linked process, you will also need to map variables between the parent process and the linked
process.

32

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 33

Data mapping
• Data mapping is used to pass the values of variables between an activity
(task) in a process and a service.
• When you attach a service to an activity, the Data Mapping section must be
populated with the input and output variables of that service.

You can use auto-


mapping when
variables names are
the same.

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Data mapping is used to pass the values of variables between an activity in a process and a
service. When you attach a service to an activity, the Data Mapping section must be populated
with the input and output variables of that service. The Data Mapping section is used to map the
input and output variables of the service to variables in the process so that runtime variable
values can be passed to and from the service.
If data is not showing up on a coach when it should be, many times it is a data mapping issue.

33

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 34

Mapping input and output data for an activity or step


• Data mapping sets the input and output map to pass variables to an
activity or a step
• Requires a set of declared variables and an activity, or a service that
contains a set of declared variables and a step
• The activity or step must implement a service or linked process,
which also contains a set of declared variables
• Set the input and output mapping for each activity in a process
• The subprocesses and services that implement the activities
generate variable values
▪ These variable values map to the variables from the main process
• Auto-mapping works only when variable names and types match
exactly
• Always use an identical name and data type for a set of input and
output variables that are passed in, processed, and then passed back

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Mapping input and output data is applicable only if the client-side human service is used within a
process. If the client-side human service is used for a dashboard, data mapping is not
necessary.\

If the variables defined in the process use the same names as those contained in the activity, you
can use the auto-mapping feature.

34

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 35

Understanding object methods

tw.local.myString.toLowerCase();
Namespace Object Method

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

All objects in IBM Business Automation Workflow have methods that are associated with them. If
you are familiar with object-oriented programming, then you are familiar with using methods on
objects. To access the object methods, you must first use the object namespace followed by the
object, and the method you would like to access.
JavaScript methods corresponding to the object type are available with the standard syntax.
For example, the JavaScript method toLowerCase can be called on an object of type String. In
this example, the results of the call are used to convert the value of tw.local.myString variable to
all lowercase.

35

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 36

Unit summary
• Build a business object
• Initialize a complex object and a list
• Build a service
• Use coaches to define and implement guided user interactions
• Implement a service for an activity in a process
• Map variables between a nested service and an activity in the overlying
process
• Describe the object methods

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

You have completed this unit.


This unit discussed the goal of Playback 1 and demonstrating the process with data. Having
completed this unit, you should be able to:
• Build a business object
• Initialize a complex object and a list
• Build a service
• Use coaches to define and implement guided user interactions
• Implement a service for an activity in a process
• Map variables between a nested service and an activity in the overlying process
• Describe the object methods

36

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 37

Review questions
1. True or false:
Capitalize the first letter of business objects. Use a camel case data
type for a variable when creating an instance of the object (for
example, employeeId).
2. Coaches are made up of what two types of components?
3. How do you define what should occur in order for a participant to
complete an activity?
A. Services
B. Gateways
C. Lanes

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

Notes:
Write your answers here:

37

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 38

Review answers
1. True. This naming convention makes it easier to identify whether a
business object is the object type or an instance of the object.
2. Sections and controls. Sections control the layout of your controls
after they are rendered in the browser. Controls include buttons,
check boxes, input boxes, date time pickers, select controls, and
other standard HTML objects.
3. A. Services define what happens when users try to complete their
activity or when the system must run an activity in a process.
Services are attached to an activity from the Implementation section
in the Properties view.

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2020

38

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 39

Exercise: Playback 1:
Business data, services, and
coaches

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2019

Exercise: Playback 1: Business data, services, and coaches


In this exercise, by using the core requirements, you determine and create all of the necessary
assets to support a coach in the Hiring Request Process. You use complex business objects to
organize your data and pass data into and out of a linked process. You build a service and define
guided user interactions with a coach by using views, controls, and grids. You also implement a
service for an activity, and map variables between a nested service and an activity.

39

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

Slide 40

Exercise introduction
• Determine and organize data when provided with a written
process
• Add business objects and object types
• Create a client-side human service
• Add variables and business objects to a process application
• Create and configure a coach to obtain process participant
input
• Model a coach by using the concept of grids
• Add coach controls to control process flow
• Create a client-side human service and coach for the General
Manager review activity
• Implement an activity by attaching a service and mapping data

Playback 1: Business data, services, and coaches © Copyright IBM Corporation 2019

After completing this exercise, you should be able to:


• Determine and organize data when provided with a written process
• Add business objects and object types
• Create a client-side human service
• Add variables and business objects to a process application
• Create and configure a coach to obtain process participant input
• Model a coach by using the concept of grids
• Add coach controls to control process flow
• Create a client-side human service and coach for the General Manager review activity
• Implement an activity by attaching a service and mapping data

40

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
WB835 Unit 6 Transcript

41

© Copyright IBM Corporation 2021


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

You might also like