Вы находитесь на странице: 1из 29

SAP Business Workflow

Architecture

SAP Workflow Architecture


Organisational
Organisational
Level
Level

Job

Person

Org Unit

Role
Task

reference

Process
Process Level
Level
WF Definition
Trigger

Business
Business
Object
Object
Level
Level

Attributes

WF StepCall & result


Trigger

Events

Object Definition

Methods

Tasks of a Workflow Management


System

Workflow Definition
Architecture

Explanation A > B = A uses B


Example:
Step definition uses attributes (container operation), events (wait steps), methods (secondary methods).
Task uses workflow definition (in multistep tasks) or methods (in single-step tasks).

Business Object Definition


and Implementation

Business Object usage in Workflow


SAP Business Workflow has been developed on an
object-oriented basis.
Workflow is a combination of events and methods
Events will be linked to the actions performed to trigger
workflow during the business processes
Methods are designed to perform a specific task to
execute the workflow

Object Types
Object types are defined and implemented by specifying their
components in the Business Object Repository(BOR)
Basic data
Key fields
Methods (operations on objects) with parameters, result
Attributes (object properties) and exceptions
Events with parameters

Examples of Object Types


SAP application
Invoice
P
s
SA ent
Requisition ocum
d
Delivery note
Master
Material
data
Customer master
Non-SAP application
Archived documents
EDI messages (IDOCS)
PC documents
Word processing
documents

Spreadsheets

Objects
Objects are the specific instances of an object type,
which have been assigned values.
An appropriate object type must be defined before an
object is first used.
Objects refer to actual things.
Object types are the abstract and general descriptions
(definitions) of the components of objects.

Object Types & Objects


I am
what I
am..

KUNNR
(Key)
123

Customer Object

NAME
Unique Customer

KNA1 : Customer Master

An object is any type of related information


which can be accessed uniquely under an identifying key.

Business Objects
Application Area 2
SAP Object 1
Customer Object 2
SAP Object 3 (supertype)
SAP Object 3a (subtype)
Customer Object 3a1 (subtype)

Navigating to the Business


Object Builder &
Repository

Object Type Components


Object type (supertype/parent)
Basic data

Interfaces
Key fields
Attributes

Synchronous Method

Methods
Event
s

Asynchronous Method

Key Fields

In order to define an object in SAP, it must have a key.


Normally, this is done with reference to some database
table via SAP's data dictionary (DDIC). The key may be
comprised of one or more fields. If more than one field,
the object key is then a concatenation of the fields.

Attributes
The attributes of the object are any other
non-key data related to the object. Again, this
is defined via the data dictionary. If so, SAP
will generate the code necessary to retrieve
the data.
Attributes can also be freely defined by
using the Virtual option. In this case, the
developer must write the code in order to
retrieve the attribute's value.

Object Type Component Interfaces

Interfaces
Interfaces are predefined components inherited by
the object. This is SAP's mechanism by which
Virtual functions may be implemented.
The 'Interface' object has a number of methods.
These methods are then inherited by the Object.
In order to use the methods, the Interface object
must be extended and code added to the method
in order to handle the particular object.

Object Type Component Events

Event = Colour Changed


Event
Parameter
GO

Events
Events generally occur within a particular
context. In this case, related to the Object under
which it is defined. An event must be defined in
order to be published (External event). In order
to publish the event, the object's key must be
specified in order to define the context. The
event may also carry with it other data
components. This is done by defining the event's
parameters.

Triggering Mechanisms
Events (publish and subscribe mechanism)
Majority of workflow are triggered by events. A developer will
register a workflow for a particular event. When this event occurs (ie.
Sales Order.Created, Parked Document Deleted) the subscribed
workflow will be triggered (ignoring Check FMs and starting
conditions)

Status Management

Change Documents

User Exits and others

Manual Triggering
Various Function Modules

Object Type Component Methods


Implementation Program
ABAP/4 code

Select X .

Transaction

Call transaction
XYZ

Function
module
API Function

Call function
Call API function

Report

Submit report

Dialog module

Call dialog
ABC

Ac
ti
on

pe
r
ob for
je me
ct d
o

an

Methods
Methods define which functions an object can
do. Methods are coded. They may call any
existing functionality in SAP. It has Import, Export,
Table, Exception and Results parameters.
A method can be viewed as a Remote Function
Module (RFC), although it actually is executed as
a tRFC (Transactional RFC) or aRFC
(Asynchronous RFC).

Method Parameters,
Results
and Exceptions
R

Import
Parameters

METHOD

lt
u
es

Export
Parameters

io
pt
ce s
Ex n

Implementing Synchronous Methods

Implementing Asynchronous Methods

Synchronous/Asynchronous
Methods
Asynchronous Method
Does not automatically
return back to workflow
when processed

Workflow needs at least one


terminating event to report
back
that method has executed
with in the transaction

Synchronous
Method

Returns back to the


workflow
when processed

Object Type / Object Type Component Status Levels

Modeled
Not accessible at
runtime.
Implemented
Only in test or
internal use, possibly unstable.
Released
Released for use by
the customer.
Obsolete
The functionality has been replaced. The old
functionality is still supported for two releases.

Business Object Repository (BOR)

Delegation
Customers use their own object extensions with the tasks,
events, etc. supplied by SAP
Without having to redefine existing tasks, you can use standard
objects with customer extensions

Вам также может понравиться