Sie sind auf Seite 1von 26

Peter Schimmel, IBM Sterling B2B Integrator Support

29 October 2014

Developing Business Processes


BPML Best Practices

This session will be recorded and a replay will be available on IBM.COM sites and possibly social media sites such as YouTube. When
speaking, do not state any confidential information, your name, company name or any information that you do not want shared publicly
in the replay. By speaking during this presentation, you assume liability for your comments.
2009, 2014 IBM Corporation

Agenda

In this session we will have a look at

BPML Basics
Simple and complex activities as they relate to building business processes.

Process Messages
Creating a business process more intelligent using the message input and output
options.
BPML additions
Sterling Integrator specific additions to standard BPML structures
In each section dos and dont s will be discussed

2009, 2014 IBM Corporation

Building the foundation

BPML BASICS

2009, 2014 IBM Corporation

What is BPML

BPML is short for Business Process Modeling Language.


Its a standard not specific to IBM. See www.bpml.org as a reference point.
It is an XML-based language to describe processes.

In the end a Business Process (BP) is a sequence of technical steps resulting in the
technical requirement being fulfilled.

Example
Read a file from disc
Translate the file into a different format
Send the file to a Tradingpartner

2009, 2014 IBM Corporation

Components of a Business Process

Simple activites
Process Name
<process name=myProcess">
Sequence
<sequence name=Start">
BPML - structures
<assign name=Hello to=Test from World/>
Complex Activities
Operations (complex activity)
<operation name="SMTP Send Adapter">

2009, 2014 IBM Corporation

Typical issue with Simple activities

Help! My SI is randomly jumping in the BP!


The Process (dont copy!)

2009, 2014 IBM Corporation

Typical issue with Simple activities

ALWAYS choose unique names for your sequences.


Look at it as a good habbit. The Workflow engine will reward you with actual sequences.

2009, 2014 IBM Corporation

Complex Activies

Services and adapters are software components that do the work.


Typically a BP consists of calls to these services and adapters.
The operation is the main point of contact between the BPML-driven workflow engine and
the various services and adapters. It is called a complex activity.
<operation name=this is the name>
<participant name=Name of the service configuration/>
<output message=what to send to the service>
<assign />
</output>
<input message=what comes from the service>
<assign />
</input>
</operation>

2009, 2014 IBM Corporation

Process Modeler's Message Editor

PROCESS MESSAGES

2009, 2014 IBM Corporation

Process Messages - Preface

Services and Adapters do the work in a BP.


As they are programs as any other they operate on the classic paradigm:
INPUT
Transformation
OUTPUT

Input

Transformation

Output

Input and output are the messages well have a look at!

10

2009, 2014 IBM Corporation

Process Messages explained

A Service (or Adapter) can get its input messages from several sources:
The Service Configuration

Fixed Process Messages we create in the BP using fixed values


<assign to=directory>c:\extraction</assign>
Dynamic Process Messages from ProcessData using XPath
<assign to=directory from=/ProcessData/myExtractDir/text()/>
Hard coded values in the service code such as PrimaryDocument

11

2009, 2014 IBM Corporation

Process Messages
My BP is looping and calling itself

Obtain Message first, then Process Data


This will send your parameters to the service but will overlay them with whatever is in
ProcessData at that time.

Obtain Process Data first, then Messages (default nowadays)


First all the parameters/ variables from ProcessData will be sent, then your variables on
top of it overlaying the values in Process data
Messages Only
Only the messages you explicitly specify in the messages will be sent. Please note that
you might be missing such important Parameters as the PrimaryDocument etc.
You have to care for everything yourself!
12

2009, 2014 IBM Corporation

Handy extensions to the standard

BPML ADDITIONS

13

2009, 2014 IBM Corporation

BPML extensions
sci-get-property()

sci-set-property()
Returns a value from a name-value pair stored in a property
Syntax: sci-get-property(filename-without.properties", myVariableNameInFile")

Content of /si-dir/properties/myprops.properties:

Resulting ProcessData after the step has run:

14

2009, 2014 IBM Corporation

BPML extensions
sci-set-property()

sci-set-property()
Sets a non-persistent GLOBAL property. This can be set during startup and changed
during runtime.
1st set the property. It has to be sciGlobalProcess but a name of your choice.

2nd access the property. It will retrieve the in-memory variable set above.

Remember: This is a non-persistent value. No files will be modified. It wont survive a restart.
15

2009, 2014 IBM Corporation

BPML extensions
StatusRpt()

Status_Rpt()
Maps the advanced status of a service and adapter to a node in ProcessData
This addition put the Status Report as non-parsed CData to the XML-Node set as parameter

16

2009, 2014 IBM Corporation

BPML extensions
getUniqueID()

getUniqueID()
Returns a unique id
Used to be built into the this service this function provides this functionality much faster.

Usually helpful when you have to insert values into database tables.
The BPML source code:

will result in the following ProcessData:

17

2009, 2014 IBM Corporation

BPML extensions
DocToDOM()

DocToDOM
Parses a given, xml only, input file.
The result can be put the result into ProcessData

This process

with this inputfile

results in this ProcessData

18

2009, 2014 IBM Corporation

BPML extensions
DocToDOM() with XPath

DocToDOM with XPath


Xpath can be applied to the result before putting it into the ProcessData
Please ommit the root node in the xpath or else...

This process

with this inputfile

results in this ProcessData

19

2009, 2014 IBM Corporation

BPML extensions
DocToDOM() - Important Note

When working with DocToDOM you will notice excessive log entries in the stdout noapp.log

As DocToDOM tries to validate the document against a non-existing DTD, this will result in the
error above. It is non-critical but annoying. Simply add ,false to the call.

This will cause the same result in ProcessData but no Error entry in the logfile.

20

2009, 2014 IBM Corporation

BPML extensions
DOMToDoc()

DOMToDoc()
Executes an Xpath against the ProcessData and wraps the result in a given root tag
The result is added to ProcessData as document.
Example BP with same input file as in the slides before.

Results in this Processdata:

21

and new PrimaryDocument:

2009, 2014 IBM Corporation

Summary a word at the end


Generic tips for developing business processes
Please develop incrementally
Debugging, Overview, Values in variables
Keep sub processes small, they are just views in the Modeller tool
Inline Invoke
Duing development use sync invokes as they can be seen as invidiual calls in process
monitor / current processes.
Once finished switch to inlike invoke for performance reasons.
Generic Service and Adapters
Discussion of principles of individual adapter configuration vs. generic adapter

Dont use old adapters and services


Examples: FTP Send Adapter vs. FTP Adapter Suite, EDIDeenvelopeUnified etc.
Use message_to_child and message_to_parent when using invokes
PLEASE use a test system.

22

2009, 2014 IBM Corporation

Survey

23

2009, 2014 IBM Corporation

Additional References

Learn about upcoming Support Technical Exchange webcasts, and access previously
recorded presentations at:
https://www304.ibm.com/connections/communities/service/html/communityview?communityUuid=d586
14c7-a87a-4bea-a0d3-572710d530db

IBM Electronic Support Introduction


http://www.ibm.com/support/electronicsupport/about.html

Sign up to receive weekly technical My Notifications emails:


http://www.ibm.com/software/support/einfo.html

developerWorks Forums, Communities and Technical Topics


http://www.ibm.com/developerworks/

Quick Reference Guide for Using Service Request Tool


http://www.ibm.com/support/docview.wss?uid=swg21207945

IBM Support Assistant


http://www.ibm.com/software/support/isa/

Access product show-me demos and tutorials by visiting IBM Education Assistant:
http://www.ibm.com/software/info/education/assistant
24

2009, 2014 IBM Corporation

Questions and Answers

This Support Technical Exchange session will be recorded and a replay will be available on IBM.COM sites and possibly social media
sites such as YouTube. When speaking, do not state any confidential information, your name, company name or any information you do
not want shared publicly in the replay. By speaking in during this presentation, you assume liability for your comments.
25

2009, 2014 IBM Corporation

THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR


INFORMATIONAL PURPOSES ONLY. WHILE EFFORTS WERE MADE TO VERIFY THE
COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS
PRESENTATION, IT IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED. IN ADDITION, THIS INFORMATION IS BASED ON IBMS
CURRENT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM
WITHOUT NOTICE. IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING
OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY
OTHER DOCUMENTATION, NOTHING CONTAINED IN THIS PRESENTATION IS
INTENDED TO NOR SHALL HAVE THE EFFECT OF CREATING ANY WARRANTIES OR
REPRESENTATIONS FROM IBM (OR ITS SUPPLIERS OR LICENSORS), OR ALTERING
THE TERMS AND CONDITIONS OF ANY AGREEMENT OR LICENSE GOVERNING THE
USE OF IBM PRODUCT OR SOFTWARE.

Copyright and Trademark Information


IBM, The IBM Logo and IBM.COM are trademarks of International Business Machines Corp.,
registered in many jurisdictions worldwide. Other product and service names might be
trademarks of IBM or other companies. A current list of IBM trademarks and others are
available on the web under Copyright and Trademark Information located at
www.ibm.com/legal/copytrade.shtml.

26

2009, 2014 IBM Corporation

Das könnte Ihnen auch gefallen