How to Create Business Logic Transactions in SAP MII
Summary
TLDRThe script introduces Business Logic Services (BLS) in SAP Mii, which are the engines for executing business logic in various tasks such as data processing and system integration. BLS transactions, modeled graphically in the SAP Mii workbench and stored as XML, can be executed through different interfaces like SAP UI5 or as web services. The script details creating transactions, defining input/output parameters, utilizing local and transaction properties, and constructing sequences with action blocks for logic execution. It also covers configuring action blocks with object and link configurations, using expressions for dynamic value assignments, and testing transactions within the workbench. BLS serves as a foundational component in composite applications on SAP Mii, enabling complex business logic to be modeled and executed efficiently.
Takeaways
- 📘 Business Logic Services (BLS) are the core logic execution engines in SAP Mii, used for developing executable business logic for various tasks.
- 🛠️ BLS transactions are graphically modeled programs developed in the SAP Mii workbench and are stored as XML, interpreted, and executed by the BLS engine at runtime.
- 🔍 BLS transactions can be executed with various display templates or data models in SAP UI5, such as XML, JSON, or OData, through web pages or HTTP services.
- 🔗 BLS can be integrated with external systems, allowing for the execution of transactions as SOAP web services.
- 🛑 The last option for executing BLS transactions is from the SAP Mii workbench, which is mainly used for unit testing and debugging.
- 📝 Creating a new BLS transaction involves defining multiple input and output parameters with specific data types in the transaction editor.
- 🔑 Input and output parameters are defined through transaction properties, which can be accessed via the workbench's menu path or configuration tab.
- 📑 The data type of transaction parameters can include standard W3C data types, with an XML data type specifying an XML document structure.
- 🔄 BLS transactions consist of sequences and action blocks, which are logical units performing specific actions within the transaction.
- 🔄♻️ The order of execution in a BLS transaction is from left to right and top to bottom, with conditional logic determining the flow to child sequences.
- 🛠️ Action blocks are categorized and provide built-in functionality for tasks like data queries, web services, and XML manipulation.
- 🔄 Object and link configurations allow for setting property values with fixed values or dynamic mappings at runtime.
- 🔍 The link editor is used for creating mappings between action block attributes, with options for simple to complex expressions and conditional logic.
- 📊 BLS transactions are essential for composite applications on SAP Mii, enabling data processing, system integration, and visualization components.
- 🔧 BLS can be tested from the workbench, providing trace and debug information to ensure successful execution and logic flow.
Q & A
What are Business Logic Services (BLS) in SAP MII?
-Business Logic Services (BLS) are the logic execution engines of SAP MII, used to develop executable business logic for various tasks such as data processing, system integration, graphical analytics, chart generation, file I/O, alert generation, and key performance indicator updates.
How are BLS transactions created and stored in SAP MII?
-BLS transactions are created using the SAP MII workbench and are stored as XML. They are graphically modeled executable programs that can be interpreted and executed by the BLS engine at runtime.
How can BLS transactions be executed in SAP UI5?
-BLS transactions can be executed in SAP UI5 with a display template or as XML, JSON, or OData models via the 'execute query' function from a web page.
What are the different ways to execute BLS transactions?
-BLS transactions can be executed from the SAP MII workbench, as an HTTP service or SOAP web service from an external system, and also from web pages such as transaction dashboards or analysis dashboards.
How can a new BLS transaction be created in the SAP MII workbench?
-A new BLS transaction can be created from the SAP MII workbench via a specific menu path, where input and output parameters can be defined with their data types.
What is the difference between input and output parameters in a BLS transaction?
-In a BLS transaction, input parameters are used to provide data to the transaction, while output parameters are used to receive data from the transaction. The distinction is made by checking the 'output parameter' checkbox during the property definition.
What are the various data types that can be assigned to BLS transaction parameters?
-The data types that can be assigned to BLS transaction parameters include standard W3C data types, and specifically for XML data types, an XML document structure can be defined either directly in the value field or by using reference documents.
What is the purpose of sequences in BLS transactions?
-Sequences in BLS transactions are containers or logical groupings of action blocks. They define the order of execution within a BLS transaction, which is always from left to right and then top to bottom.
How are action blocks used within BLS transactions?
-Action blocks are the core building blocks of BLS transactions, representing predefined reusable functionalities for different logic, data processing, and connectivity features. They are added to sequences within a BLS transaction to perform specific actions such as executing queries, parsing XML documents, or assigning variable values.
What are the two configuration modes of action blocks in BLS transactions?
-The two configuration modes of action blocks are object configuration and link configuration. Object configuration sets properties with fixed values at design time, while link configuration defines data mapping and can use dynamic values or variables that are evaluated at runtime.
How can the success of an action block execution be determined in BLS transactions?
-Most action blocks have a Boolean output property called 'success', which indicates whether the action has been successfully executed. This can be used to determine the outcome of the action block's execution.
What is the role of the link editor in configuring action blocks?
-The link editor is used for link configuration, allowing the mapping of attributes from one action block to another, or from transaction and local properties to the attributes of the current action block. It also allows for the creation of conditional or complex mappings using expressions.
How can BLS transactions be tested from the SAP MII workbench?
-BLS transactions can be executed for testing purposes from the workbench using a specific menu path. During execution, the default trace and debug output information is displayed in a pop-up window, which can be used to evaluate the transaction's performance.
Outlines
🛠️ Business Logic Services (BLS) Overview
Business Logic Services (BLS) in SAP Mii are the core engines for executing business logic. They are used to develop executable logic for various tasks such as data processing, system integration, chart generation, file I/O, alert generation, and KPI updates. BLS transactions are graphically modeled programs stored as XML and executed by the BLS engine at runtime. They can be executed with display templates or as XML, JSON, or OData models via SAP UI5, as HTTP or SOAP web services from external systems, or from the SAP Mii workbench for unit testing and debugging. BLS transactions can have multiple input and output parameters with various data types, including XML, which can be defined at design time. Local properties, similar to local variables, are used within the transaction and are not visible externally. BLS transactions consist of sequences and action blocks that perform specific actions and are arranged in a logical order of execution.
🔄 Action Blocks and Their Configuration in BLS
Action blocks are the fundamental building blocks of BLS transactions, offering predefined and reusable functionalities for logic, data processing, and connectivity. They include executing queries, web services, sending messages, and performing XML operations. Action blocks are categorized and configurable via object and link configurations. Object configuration sets fixed values at design time, while link configuration maps dynamic values at runtime. The link editor facilitates the mapping of attributes between action blocks, allowing for conditional or complex mappings using expressions. The editor also supports different link types for XML attributes, ensuring flexibility in how data is transferred and manipulated within a BLS transaction.
🔧 Advanced Configuration and Execution of BLS Transactions
The configuration of BLS transactions can be further refined using object and link configurations, which allow for setting property values with fixed or dynamic values. Link configuration takes precedence over object configuration and is essential for mapping variables to action block properties that provide runtime values. A Boolean output property called 'success' indicates the execution status of an action block. BLS transactions can be tested from the workbench, with trace and debug information displayed in a pop-up window. They serve as the core logic components in composite applications on SAP Mii, enabling complex data processing, system integration, and visualization generation. BLS transactions can be executed from web pages, background jobs, or schedulers, providing flexibility in their application.
Mindmap
Keywords
💡Business Logic Services (BLS)
💡SAP Mii
💡Transactions
💡XML
💡SAP UI5
💡HTTP Service
💡Action Blocks
💡Sequences
💡Object Configuration
💡Link Configuration
💡Expression Editor
Highlights
Business Logic Services (BLS) are the logic execution engines of SAP Mii, used for developing executable business logic.
BLS can be used for various purposes including data processing, system integration, chart generation, file I/O, and more.
BLS transactions are graphically modeled executable programs developed in the SAP Mii workbench.
BLS transactions are stored as XML in SAP Mii and are interpreted by the BLS engine at runtime.
BLS transactions can be executed with display templates or as XML, JSON, or OData models in SAP UI5.
Transactions can be executed as HTTP services or SOAP web services from external systems.
BLS transactions can be executed from the SAP Mii workbench for unit testing and debugging.
New BLS transactions can be created via a menu path in the SAP Mii workbench.
BLS transactions can have multiple input and output parameters with assigned data types.
Input and output parameters are defined through transaction properties in the workbench.
Parameters can be specified as output by checking an 'output parameter' checkbox during property definition.
Data types for transaction parameters include standard W3C data types and XML data types.
Local properties in BLS transactions are analogous to local variables in common programming languages.
BLS transactions consist of sequences which are logical groupings of action blocks.
Action blocks are logical units that perform specific actions within a BLS transaction.
Sequences and action blocks are arranged graphically to define the program structure of a BLS transaction.
Action blocks have object and link configuration modes for setting property values and data mappings.
Link configuration allows for dynamic values or variables to be used at runtime.
The link editor is used for creating mappings between attributes of action blocks.
Expressions in the link editor can involve string operations, numeric calculations, and more.
BLS transactions can be executed for testing from the workbench with trace and debug options.
BLS transactions serve as core logic components in composite applications developed on SAP Mii.
BLS transactions can be executed from web pages or as background jobs using schedulers.
Transcripts
business logic Services also known as
BLS are the logic execution engines of
sap Mii which you can use to develop
executable business Logic for data
processing system integration graphical
analytics chart generation file i o
alert generation key performance
indicator update and more
BLS are provided by transactions which
are graphically modeled executable
programs developed in the sap Mii
workbench
BLS transactions are stored as XML in
sap Mii and are interpreted and executed
by the BLS engine at runtime
you can execute any BLS transaction with
a display template or as XML Json odata
models in sap ui5 via execute query from
a web page
you can also execute BLS transactions as
an HTTP service or soap web service from
an external system
finally you can execute the BLS
transactions from the sap Mii workbench
and display the output in a pop-up
window there
this last option is mainly used for unit
testing and debugging purposes
you can create a new BLS transaction
from the sap Mii workbench via this menu
path
any BLS transaction can have multiple
input and output parameters as defined
in the BLS transaction editor in the sap
Mii workbench
you need to assign each output and input
with a data type from the list that is
supported by BLS you can Define the
input and output parameters of a BLS
transaction by the Transaction
properties which you can access via this
menu path or in the transaction
configuration tab in the bottom left
pane of the workbench as shown here
opening the Transaction properties menu
displays the input and output parameters
defined for that transaction in a pop-up
window
you can add a new transaction property
by clicking the add button which opens
another pop-up window to specify the
property name optional description data
type and optional minimum maximum and
default values to specify a parameter as
an output parameter of the transaction
you need to check the output parameter
checkbox while defining the property
if the Box isn't checked the parameter
is considered to be an input parameter
for the transaction the data type of any
transaction parameter can be any one of
the following
although the other data types are
standard w3c data types an XML data type
in an sap Mii BLS transaction specifies
an XML document
you can Define the XML structure at
design Time by specifying the XML in the
value field
otherwise you can Define the structure
of the XML data type parameter by using
reference documents
the Transaction properties already
defined are displayed in the main
property detail pop-up window with the
name description input output flag and a
graphical icon to signify the
corresponding data type as shown in this
figure
you can Define and use local properties
of BLS transaction in the same way as
Transaction properties
the only difference between the two is
those local properties can only be
accessed and used inside the BLS
transaction and are not visible from the
calling application
these are analogous to local variables
in common programming languages
you can Define the local properties in
the same transaction configuration tab
in the bottom left corner of the
workbench or in the toolbar menu via
this path
any BLS transaction is made up of one or
more sequences which are the containers
or logical groupings of action blocks
an action block is a logical unit in the
BLS transaction that performs a
particular action such as creating or
parsing an XML document looping through
a repeating node of an XML document
assigning a variable value executing a
remote function call or web service
executing a query and so on each BLS
transaction must have at least one
sequence created by default that is
called the root sequence which cannot be
deleted
BLS transactions are modeled graphically
in the transaction editor using the
action blocks which you can drag and
drop into the main window inside a
sequence
you can add sequences below or above one
another you can add any number of
sequences below a sequence at the same
level but only a single sequence at the
same level above a sequence you can add
a sequence above another sequence by
selecting a sequence and selecting the
insert sequence option from the context
menu and below a sequence by selecting
the add sequence menu option
the sequences you add below get added
from left to right
the order of execution in a BLS
transaction is always from left to right
and then top to bottom a sample BLS
transaction is shown in design time
where the outer rectangles are the
sequences
the action blocks which are the inner
rectangles with a name and an icon on
them are placed inside the sequences
you can add multiple action blocks in a
single sequence with the exception of a
few actions blocks such as conditional
or repeater
action blocks that are present in the
same sequence get executed from left to
right
the numbers are added beside the
sequences to explain the sequence of
flow in a BLS transaction some sequences
are marked with the same numbers because
those sequences are present below a
sequence containing a conditional logic
action block that decides at runtime to
which child sequence the control will
flow
each sequence must have a name a
description is optional
the name is generated by default and can
be changed in the sequence properties
configuration
[Music]
the core building blocks of BLS
transactions are predefined reusable
action blocks that provide built-in
functionality for different logic data
processing connectivity features and
more they can be used to define a
program structure and are provided for a
number of functions
these include executing data queries
rfcs or boppies from SAP systems running
web services and odata services sending
soap and HTTP messages to Sapp Pi or
external systems sending and reading
emails performing statistical quality
control and statistical process control
analysis defining flow logic and XML
parsing and manipulation
the action blocks are categorized
according to the functionality they
offer and are present in the actions
configuration tab in the bottom left
corner of the workbench which you can
add to sequences via drag and drop or
double-clicking
each action block added in a sequence
must have a name a description is
optional which you can change from the
action block configurations
action blocks have two configuration
modes object configuration and Link
configuration
you can invoke these two configuration
modes by double-clicking an action block
added to a sequence or by selecting the
corresponding menu option from the
context menu on that action block
each action block has different sets of
properties or attributes based on the
functionality they provide to which you
can assign or read values
using object configuration you can
configure most of the properties of the
action blocks with fixed values at
design time
using link configuration you can Define
the data mapping of the action blocks
attributes
you must perform the link configuration
in the link editor where you can read or
manipulate the values of the attributes
of the action blocks
you can also set the configuration
properties of the action blocks with
Dynamic values or variables which will
be replaced by the actual values at
runtime using the link configuration
you can access the object configuration
or link configuration of an action block
by double-clicking it or by
right-clicking when placed inside a
sequence in the BLS transaction
the link editor screen has two tabs
incoming and outgoing
the configuration in the incoming tab is
evaluated before the action block is
executed and the configuration in the
outgoing tab is evaluated after the
execution of the action block
in other words the incoming
configuration tab provides the input
parameters of the action block whose
values can be configured there whereas
the outgoing configuration tab provides
the output parameters of the action
block which can be read from other
subsequent action blocks
in the incoming tab the selected action
block appears at the right side of the
window as the target all the action
blocks that are present before the
selected one appear on the left as the
source in the outgoing tab all action
blocks present before the selected
action block along with that one appear
on both sides of the editor but only the
writable or configurable properties
appear under their corresponding action
blocks on the right both read-only and
configurable properties appear under
their corresponding actions on the left
note that he links defined in the
outgoing tab of an action block are
skipped in the case of action block
execution failure therefore you should
not use the outgoing links section to
map properties of action blocks other
than the current one
to map the attributes from a previous
action block or transaction and local
properties to the attributes of the
current action block you can drag and
drop the attribute from the left to the
right or you can select the source
action blocks attribute on the left and
double-click the target attribute on the
right to create a simple mapping or link
you can also Define conditional or
complex mapping by using the expression
editor at the bottom of the link editor
any expression can be written in the
expression editor using the functions
available in the functions drop-down
list
complex Expressions can involve string
operations concat substring Etc or
numeric calculations addition
subtraction log square root Etc
formatting date functions hexadecimal
color codes and so on
clicking the evaluate button opens a
screen with the result of the expression
you defined or an error if the
expression is incorrect
to add a new mapping click the add
button and to update an existing mapping
click the update button
you can delete an existing mapping by
clicking the delete button
always select the target action blocks
property at the right to add update or
delete its link
you can maintain the runtime sequence of
the mapping by moving a selected mapping
Row in the grid up or down to add nested
Expressions I.E Expressions within other
expressions or variables within an
expression use the dynamic link option
to select a source attribute
this adds that a tribute name enclosed
within pound signs which signifies that
at runtime the attribute value is a
variable name or an XPath expression
that has to be evaluated
clicking the property value button to
select a source attribute adds the
current value of the attribute to the
expression editor
after writing an expression in the
expression editor always remember to
click the add or update button to add
the new or changed mapping expression to
the Target attribute
the link editor is shown in this figure
different link types are available as
radio buttons in the link editor these
specify the different types of mappings
as follows simple mapping between
non-xml attributes such as string
integer and so on where the target
attribute gets the same value as the
source
mapping between two XML type attributes
where the target attribute gets the
source XML document assigned to it
overriding the current XML if any
mapping between two XML type elements
where the target attribute gets the
source attributes XML document assigned
to it as a child element under the
existing root element of the existing
XML
mapping between two XML attributes were
the source XML documents get added to
the Target XML document as a sibling
this should be added by selecting a node
below the root node of the target XML
mapping between two XML attributes where
the target XML element and its children
are replaced with the source node and
its children this should be added by
selecting an element of the target XML
mapping to remove the target node and
its children
this should be done when an XML
attribute value has to be set to null
for many action blocks object
configuration and Link configuration
allow the same properties to be
configured in general you should use
object configuration to set the property
values of the action block with fixed
values at design time you should use the
link configuration to map variables to
the action blocks properties that can
provide Dynamic values at runtime
link configuration always overrides the
object configuration for a property of
the action block
remember you must use the link
configuration to read any property value
of an action block or transaction from
its subsequent action block
note that most of the action blocks have
a Boolean output property called success
which you can use to determine whether
or not the action is successfully
executed
you can execute a BLS transaction for
testing purposes from the workbench via
this menu path when you are executing
the default trace and debug output
information is displayed in a pop-up
window
the execute without Trace option does
not display the default Trace
you need to use the BLS transactions as
the core logic components of the
composite applications developed on sap
Mii you can model all necessary data
processing logic system integration by
data queries and RFC or web service
calls you also can read or update
buffered messages or files from file
systems generate visualization
components as animated graphics or chart
images and so on
BLS transactions are executed from web
pages such as transaction dashboards or
provide the necessary data to the charts
for analysis dashboards and even can be
executed as background jobs using
schedulers to execute business logic
[Music]
5.0 / 5 (0 votes)