0% found this document useful (0 votes)
80 views114 pages

7-1 Getting Started With Business Process Management

BPM

Uploaded by

dops_2004
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)
80 views114 pages

7-1 Getting Started With Business Process Management

BPM

Uploaded by

dops_2004
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/ 114

TitlePage

webMethods Product Suite

Version 7.1

Getting Started with Business


Process Management

Copyright
& Docu
mentID

Cerebra,Glue,InfravioXBroker,InfravioXRegistry,Infravio,MywebMethodsServer,MywebMethods,webMethodsAccess,webMethodsAdministrator,
webMethodsBroker,webMethodsCentralConfiguration,webMethodsDashboard,webMethodsDesigner,webMethodsDeveloper,webMethodsFabric,
webMethodsGlue,webMethodsInfrastructureDataCollector,webMethodsInfravioXBroker,webMethodsInfravioXRegistry,webMethodsInstaller,
webMethodsIntegrationServer,webMethodslogo,webMethodsMainframe,webMethodsManager,webMethodsModeler,webMethodsMonitor,
webMethodsOptimizeforInfrastructure,webMethodsOptimizeforProcess,webMethodsOptimize,webMethodsPortal,webMethodsProcessEngine,
webMethodsServicenet,webMethodsTaskEngine,webMethodsTradingNetworks,webMethodsWorkflow,andwebMethodsareeitherregistered
trademarksortrademarksofwebMethods,Inc.
Acrobat,Acrobat,andReaderareregisteredtrademarksofAdobeSystemsIncorporated.AmdocsandClarifyCRMareregisteredtrademarksofAmdocs.
AribaisaregisteredtrademarkofAriba,Inc.BEA,BEAWebLogicServer,Jolt,andTuxedoareregisteredtrademarks,andBEAWebLogicPlatformisa
trademarkofBEASystems,Inc.ActionRequestSystem,BMCSoftware,PATROL,andRemedyareregisteredtrademarksofBMCSoftware,Inc.BroadVision
isaregisteredtrademarkofBroadVision,Inc.ChemeStandardsandCIDXaretrademarksofCIDX,TheChemicalIndustryDataExchange.SiteMinderand
UnicenterareregisteredtrademarksofCA,Inc.PopChartisaregisteredtrademarkofCORDATechnologies,Inc.KenanandArborareregisteredtrademarks
ofAlcatelLucent.DataConnectionandSNAPIXareregisteredtrademarksofDataConnectionCorporation.D&BandDUNSareregisteredtrademarksof
Dun&BradstreetCorporation.EclipseisatrademarkofEclipseFoundation,Inc.EntrustisaregisteredtrademarkofEntrust,Inc.papiNetisaregistered
trademarkoftheEuropeanUnionandtheUnitedStates.FinancialInformationeXchange,F.I.X,andF.I.XProtocolaretrademarksofFIXProtocolLtd.
UCCnetandeBusinessReadyareregisteredtrademarks,and1SYNCandTransoraaretrademarksofGS1US.HewlettPackard,HP,HPUX,OpenView,PA
RISC,andSNAplus2aretrademarksofHewlettPackardCompany.i2isaregisteredtrademarkofi2Technologies,Inc.AIX,AS/400,CICS,ClearCase,DB2,
Domino,IBM,Informix,Infoprint,Lotus,LotusNotes,MQSeries,OS/390,OS/400,RACF,RS/6000,SQL/400,S/390,System/390,VTAM,andWebSphere,and
z/OSareregisteredtrademarks;andCommunicationsSystemforWindowsNT,DB2UniversalDatabase,IMS,MVS,andSQL/DSaretrademarksofIBM
Corporation.InnoDBisatrademarkofInnobaseOy.ItaniumisaregisteredtrademarkofIntelCorporation.LinuxisaregisteredtrademarkofLinus
Torvalds.W3Cisaregisteredtrademark,andXWindowSystemisatrademarkoftheMassachusettsInstituteofTechnology.MetaSolvisaregistered
trademarkofMetasolvSoftware,Inc.ActiveX,Microsoft,Outlook,VisualBasic,VisualSourceSafe,Windows,WindowsNT,andWindowsServerare
registeredtrademarksofMicrosoftCorporation.SixSigmaisaregisteredtrademarkofMotorola,Inc.FirefoxandMozillaareregisteredtrademarksofthe
MozillaFoundation.MySQLisaregisteredtrademarkofMySQLAB.nCipherisatrademarkofnCipherCorporationLtd.EclipseisatrademarkofEclipse
Foundation,Inc.EntrustisaregisteredtrademarkofEntrust,Inc.papiNetisaregisteredtrademarkoftheEuropeanUnionandtheUnitedStates.Financial
InformationeXchange,F.I.X,andF.I.XProtocolaretrademarksofFIXProtocolLtd.UCCnetandeBusinessReadyareregisteredtrademarks,and1SYNCand
TransoraaretrademarksofGS1US.HewlettPackard,HP,HPUX,OpenView,PARISC,andSNAplus2aretrademarksofHewlettPackardCompany.i2isa
registeredtrademarkofi2Technologies,Inc.AIX,AS/400,CICS,ClearCase,DB2,Domino,IBM,Informix,Infoprint,Lotus,LotusNotes,MQSeries,OS/390,
OS/400,RACF,RS/6000,SQL/400,S/390,System/390,VTAM,andWebSphere,andz/OSareregisteredtrademarks;andCommunicationsSystemforWindows
NT,DB2UniversalDatabase,IMS,MVS,andSQL/DSaretrademarksofIBMCorporation.InnoDBisatrademarkofInnobaseOy.Itaniumisaregistered
trademarkofIntelCorporation.TeradataisaregisteredtrademarkofNCRCorporation.NetscapeisaregisteredtrademarkofNetscapeCommunications
Corporation.ServletExecisaregisteredtrademark,andNewAtlantaisatrademarkofNewAtlantaCommunications,LLC.SUSEisaregisteredtrademark
ofNovell,Inc.AppiaisaregisteredtrademarkandJavelinTechnologiesisatrademarkofNYFIX,Inc.CORBAisaregisteredtrademarkofObject
ManagementGroup,Inc.JDEdwards,OneWorld,Oracle,PeopleSoft,Siebel,andVantiveareregisteredtrademarks;andInfranet,PeopleSoftPureInternet
Architecture,Portal,andWorldSoftwarearetrademarksofOracleCorporation.PerforceisatrademarkofPerforceSoftware.JBossandRedHatare
registeredtrademarksofRedHat,Inc.PIPandRosettaNetaretrademarksofRosettaNet,anonprofitorganization.SAPandR/3areregisteredtrademarks
ofSAPAG.PVCSisaregisteredtrademarkofSerenaSoftware,Inc.SWIFTandSWIFTNetareregisteredtrademarksofSocietyforWorldwideInterbank
FinancialTelecommunicationSCRL.SPARCandSPARCStationareregisteredtrademarksofSPARCInternational,Inc.BAANandSSAareregistered
trademarks;andSSAGlobalisatrademarkofSSAGlobalTechnologies,Inc.EJB,EnterpriseJavaBeans,Java,JavaServer,JDBC,JSP,J2EE,Solaris,Sun,and
SunMicrosystemsareregisteredtrademarks;andJavaNamingandDirectoryInterface,JavaServerPages,SOAPwithAttachmentsAPIforJava,andSunSoft
aretrademarksofSunMicrosystems,Inc.SybaseisaregisteredtrademarkofSybase,Inc.VERITASisaregisteredtrademark,andVERITASClusterServeris
atrademarkofSymantecCorporation.UNIXisaregisteredtrademarkofTheOpenGroup.UnicodeisatrademarkofUnicode,Inc.VeriSignisaregistered
trademarkofVerisign,Inc.
SoftwareAGandallSoftwareAGproductnamesareeithertrademarksorregisteredtrademarksofSoftwareAG.
Otherproductandcompanynamesmentionedhereinmaybethetrademarksoftheirrespectiveowners.
Copyright2007webMethods,Inc.Allrightsreserved.
Copyright2007SoftwareAGand/oritssuppliers,Uhlandstrasse12,64297Darmstadt,Germany.Allrightsreserved.

Document ID: BPM-GS-71-20070831

Contents

Contents
About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
webMethods Components and Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 1. Introduction to Business Process Management . . . . . . . . . . . . . . . . . . . . . . .


What is Business Process Management? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Benefits of Business Process Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Steps to Using Business Process Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Monitoring and Managing Business Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 2. Understand the Business Process to Model the Flow . . . . . . . . . . . . . . . . . . .


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Business ProcessNew Employee Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Human Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Facilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Information Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modeling the Flow of the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Documenting the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 3. Add Technical Detail to the Process Model . . . . . . . . . . . . . . . . . . . . . . . . . . .


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analyzing What Is Required to Perform the Tasks in the Process . . . . . . . . . . . . . . . . . . . . . . . . . . .
Business Tasks that Involve Interaction with Internal Systems . . . . . . . . . . . . . . . . . . . . . . . . . .
Business Tasks that Involve Human Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Business Tasks that Involve Interaction with External Partners . . . . . . . . . . . . . . . . . . . . . . . . .
Business Tasks for Which There are Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Error and Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Updating the Step Types in the Process Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding Technical Detail to Steps and Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining Steps for HR Business Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding the Facilities Business Tasks to the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding the IT Business Tasks to the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding Error and Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding Logic that Executes the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Getting Started with Business Process Management Version 7.1

7
7
8
8

9
10
11
12
13

15
16
16
16
17
17
17
18

21
22
22
23
23
24
24
24
25
26
26
29
30
33
35

Contents

Chapter 4. Use Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a Web Service Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Activity Step for the Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modifying the Web Service Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Wrapper Service to Make the Inputs Available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Specifying Authentication for the Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Receiving Data Back Into the Business Process Synchronously . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Processing the Web Service Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 5. Handle Interactions with Internal Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending Data from the Business Process to the Internal System . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a Service that Sends Data to the Internal System . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using webMethods Adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Updating the Process Model to Reference the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Receiving Data Back Into the Business Process Asynchronously . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining an IS Document Type for the Document from the Internal System . . . . . . . . . . . . . . . .
Updating the Process Model to Receive the IS Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Correlating Incoming Documents with the Correct Process Instance . . . . . . . . . . . . . . . . . . . . .
Determining the Data to Use for a Correlation ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mapping the Correlation ID to the Process Instance ID . . . . . . . . . . . . . . . . . . . . . . . . . . .
Updating the Process Model to Reference the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extracting the Correlation ID from an Incoming Document . . . . . . . . . . . . . . . . . . . . . . . . .
How the Process Engine Processes the Incoming Document . . . . . . . . . . . . . . . . . . .
Creating the Correlation Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Updating the Process Model to Reference the Correlation Service . . . . . . . . . . . . . . . . . .
Creating a Service to Process the Document from the Internal System . . . . . . . . . . . . . . . . . . .
Updating the Process Model to Reference the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 6. Handle Interactions with Internal People . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Before You Can Use Steps that Involve People . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating the IS Document Types for Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Guidelines for Creating the IS Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Task Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using an Existing Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Implementing a New Task from a Task Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting the Task Step Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Implementing the Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Getting Information To and From the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Getting Started with Business Process Management Version 7.1

37
38
39
39
40
40
41
42
42

45
46
47
47
47
48
49
49
49
51
52
53
54
55
55
56
57
58
59

61
62
63
63
64
64
64
66
66
66
67

Contents

Chapter 7. Handle Interactions with External Partners . . . . . . . . . . . . . . . . . . . . . . . . . . .


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining Information about External Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending Documents from the Business Process to External Partners . . . . . . . . . . . . . . . . . . . . . . . .
Creating a Service to Send a Document to Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . .
Forming an XML Document to Send to Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . .
Forming a Flat File Document to Send to Trading Networks . . . . . . . . . . . . . . . . . . . . . . . .
Updating the Process Model to Reference the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining a TN Document Type for the Document from the Process . . . . . . . . . . . . . . . . . . . . . .
Defining a Processing Rule for the Document from the Process . . . . . . . . . . . . . . . . . . . . . . . .
Getting Documents from External Partners to the Business Process . . . . . . . . . . . . . . . . . . . . . . . . .
Defining a TN Document Type for the Document from the External Partner . . . . . . . . . . . . . . .
Updating the Process Model to Receive the TN Document . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining a Processing Rule for Document from the External Partner . . . . . . . . . . . . . . . . . . . . .
Creating a Service to Process the Document from the External Partner . . . . . . . . . . . . . . . . . .
Obtaining XML Document Content and Converting It to an IData Object . . . . . . . . . . . . . .
Obtaining Flat File Document Content and Converting it to an IData Object . . . . . . . . . . .
Updating the Process Model to Reference the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Correlating Incoming Documents with the Correct Process Instance . . . . . . . . . . . . . . . . . . . . . . . . .
How the Incoming Documents are Sent to the Correct Process Instances . . . . . . . . . . . . . . . . .
Mapping the Conversation ID to the Process Instance ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Invoking the Service from a Step in the Business Process . . . . . . . . . . . . . . . . . . . . . . . . .
Updating the Process Model to Reference the Service . . . . . . . . . . . . . . . . . . . . . . . .
Invoking the Service from a Trading Networks Processing Rule . . . . . . . . . . . . . . . . . . . . .

Chapter 8. Perform Error and Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transitioning Based on Process Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transitioning when a Service Throws an Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transitioning When There is an Unexpected Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Implementing an Exception or Error Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 9. Execute, Monitor, and Manage Business Processes . . . . . . . . . . . . . . . . . . . .


Executing the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Before You Can Execute the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Starting an Instance of the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Monitoring the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Managing a Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

69
70
71
72
72
72
73
74
75
76
76
77
77
80
80
80
81
82
83
84
84
85
86
87

91
92
92
93
94
95

97
98
98
98
99
100

Appendix A. Quick Reference for Modeling Business Processes . . . . . . . . . . . . . . . . . . . 101


Business Tasks Using Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Business Tasks that Involve Internal Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Getting Started with Business Process Management Version 7.1

Contents

Business Tasks that Involve People . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105


Business Tasks that Involve External Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

Getting Started with Business Process Management Version 7.1

About This Book

About This Book

ThisguideintroducesyoutoBusinessProcessManagement(BPM)andusesasample
businessscenariotoillustratetheuseofBPM.TheguidealsodescribesthewebMethods
softwareyoucanusetoimplementaBPMsolutionandprovidesinformationaboutthe
typesoftasksyouneedtocompleteusingwebMethodscomponentstoimplementaBPM
solution.
Thisguidehastwoaudiences.Chapters1through3oftheguideareforabusinessanalyst
whoisresponsiblefordefiningthebusinessprocessesforacompany.Theentireguide,
andspecificallychapters4through9andtheappendix,areaimedforadeveloperwhois
responsibleforimplementingthebusinessprocess.

webMethods Components and Versions


ThisguidereferencesseveralwebMethodscomponents.Thefollowingtableliststhe
versionofeachwebMethodscomponentthatthisguidedescribes.
webMethods component

Version

webMethodsBroker

7.1

webMethodsDeveloper

7.1

webMethodsIntegrationServer

7.1

webMethodsDesigner

7.1

webMethodsMonitor

7.1

webMethodsProcessEngine

7.1

webMethodsTaskEngine

7.1

webMethodsTradingNetworks

7.1

Getting Started with Business Process Management Version 7.1

About This Book

Document Conventions
Convention

Description

Bold

Identifieselementsonascreen.

Italic

Identifiesvariableinformationthatyoumustsupplyorchange
basedonyourspecificsituationorenvironment.Identifiestermsthe
firsttimetheyaredefinedintext.Alsoidentifiesserviceinputand
outputvariables.

Narrow font

IdentifiesstoragelocationsforservicesonthewebMethods
IntegrationServerusingtheconventionfolder.subfolder:service.

Typewriter
font

Identifiescharactersandvaluesthatyoumusttypeexactlyor
messagesthatthesystemdisplaysontheconsole.

UPPERCASE

Identifieskeyboardkeys.Keysthatyoumustpresssimultaneously
arejoinedwiththe+symbol.

Directorypathsusethe\directorydelimiterunlessthesubjectis
UNIXspecific.

[]

Optionalkeywordsorvaluesareenclosedin[].Donottypethe[]
symbolsinyourowncode.

Additional Information
ThewebMethodsAdvantageWebsiteathttp://advantage.webmethods.comprovidesyou
withimportantsourcesofinformationaboutwebMethodsproducts:
Troubleshooting Information.ThewebMethodsKnowledgeBaseprovides
troubleshootinginformationformanywebMethodsproducts.
Documentation Feedback.ToprovidefeedbackonwebMethodsdocumentation,goto
theDocumentationFeedbackFormonthewebMethodsBookshelf.
Additional Documentation.Startingwith7.0,youhavetheoptionofdownloadingthe
documentationduringproductinstallationtoasingledirectorycalled
_documentation,locatedbydefaultunderwebMethodsinstallationdirectory.In
addition,youcanfinddocumentationforallwebMethodsproductsonthe
webMethodsBookshelf.

Getting Started with Business Process Management Version 7.1

Chapter 1. Introduction to Business Process Management

What is Business Process Management? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10


Benefits of Business Process Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Steps to Using Business Process Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Monitoring and Managing Business Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Getting Started with Business Process Management Version 7.1

1. Introduction to Business Process Management

What is Business Process Management?


Businessprocessmanagementistheabilitytodefine,implement,manage,analyze,and
optimizeinteractionsbetween:
Systemswithinyourcorporation,forexample,applicationsandinformationstores
Peopleinyourcorporation
Externalbusinesspartners
Businessprocessmanagementensuresthattherightinformationgetstotherightplaceat
therighttime.Thismeansthatthecorrectinternalsystem,person,orexternalpartner
receivestheinformationtheyneedtocompletetheirbusinesstasksattheappropriate
times.
Inotherwords,businessprocessmanagementismanagingthebusinessprocesseswithin
yourcorporation.Abusinessprocessisaseriesofinterrelatedbusinesstasksthatare
performed:
Inaspecificorder
Usinganassociatedsetofbusinessrules
Bymultiplesystems,people,andpartners
Examplesofbusinessprocesseswithinacorporationmightincludepreparingforanew
employee,handlingapurchaseorder,bringingaproductfrominceptiontomarket,
deliveringatimelyandaccurateinvoice,enablingVendorManagedInventory,or
synchronizingitemregistrieswithUCCNET.
Expandingonthefirstexampletoprepareforanewemployee,thisbusinessprocess
mightincludebusinesstaskssuchasassigningofficespaceforthenewemployee,
enrollingtheemployeeintheinternalHumanResources(HR)system,notifyingthe
externalpartnerthathandlespayroll,andobtainingthenecessaryofficeequipment(e.g.,
computer,phone).
Withoutadefinedbusinessprocessandwithoutusingbusinessprocessmanagement,
someofthebusinesstasksmightbeforgottenornotcompletedinatimelymanner.If
errorsorexceptionsoccur,clearlydefinedactionsmightnotexisttoresolvetheissue.For
example,inthecaseofthenewemployee,thislackofaclearbusinessprocesscouldresult
inthenotificationbeingsenttoolatetotheInformationTechnology(IT)departmentto
ensurethenewhirehasacomputeronthefirstdayofwork.Ifaproblemsuchasno
availableofficespaceoccurs,actionsregardingwhoshouldbenotifiedandwhatactions
shouldbetakenmightnotbedefined.
However,withbusinessprocessmanagementinplace,theefforttoprepareforanew
employeecanbeautomated,includingtherequiredhumaninteraction.Forexample,the
HRdepartmentcouldinitiatethebusinessprocessbyfillingoutanonlineform.By
submittingthatform,thebusinessprocesswouldinitiateandautomaticallyupdatethe
internalHRsystem,aswellassendanotificationtotheexternalpartnerthathandles

Getting Started with Business Process Management Version 7.1

10

1. Introduction to Business Process Management

payroll.Additionally,thatsamesingleactionbyHRcouldresultintheappropriatepeople
anddepartmentsbeingnotifiedaboutthenewemployeesothattheycanensurethat
officespaceisassignedandthenecessaryofficeequipmentisavailablebytheemployees
startdate.
Partofdefiningabusinessprocessisalsoincludingtheactionstotakeshouldanerroror
exceptionoccurintheprocess.Forexample,ifthereisnoofficespaceavailable,the
FacilitiesManagercouldbenotifiedtodeterminehowtohandlethatsituation.
Afteryouhavedefinedabusinessprocess,youcanusebusinessprocessmanagementto
monitorandmanageeachinstanceofthebusinessprocess.Continuingwiththenew
employeeexample,ifyouhavethreenewemployeesstarting,youcanviewdetailsabout
thebusinesstasksthathavebeencompletedforeachofthenewemployees;thatis,you
candeterminewhetherofficeequipmenthasbeenorderedorwhetherthepayroll
provideracknowledgednotificationforallthreeemployees.
Subsequentchaptersofthisguidewillusethissamplenewemployeesetupscenarioto
furtherillustratetheuseofbusinessprocessmanagement.

Benefits of Business Process Management


Byimplementingbusinessprocessmanagement,yourcorporationcanachievethe
followingbenefits:
Betterunderstandingandvisibilityoftheentirebusinessprocess.Modelingabusiness
processhelpsyoutounderstandtheentireprocessbetter,andletsyouaccountforall
theresourcesinvolvedtoachievethebusinessprocess.
Bettererrorandexceptionhandling.Theerrorandexceptionhandlingisplannedin
advanceanddesignedintothebusinessprocess.Whenanexceptionoccurs,theright
personorsystemreceivestheinformationtohandletheexception.
Savestime.Businessprocessesarethoughtoutinadvanceanddecisionmaking
designedintotheprocess.Thissavestime.Ifahumanhastomakeadecision,the
rightpersonwiththerightskillsmakesthedecisionattherighttimeintheprocess.If
thedecisioncanbeautomated,theactionoccursautomatically,savingevenmore
time.
Reducescosts.Automatingtasksandcreatingmoreefficientprocessessavestimeand
thereforealsosavesmoney.Employeetrainingcostsareloweredbecauseyou
understandyourbusinessprocessesandtheskillsthatyouremployeesneedto
accomplishthehumantasksinvolved.Youcanfocusyourtrainingmoneyonthe
necessaryskills.Italsoallowsyoutobringnewemployeesuptospeedfaster.
Improvesemployeeefficiency.Allowsyoutorecognizetasksthatcanbeautomated,
allowingyouremployeestoworkonthetasksthatreallyrequiretheirattention.
Ensuresthatyouremployeesarefocusingonthemostimportantissues.

Getting Started with Business Process Management Version 7.1

11

1. Introduction to Business Process Management

Increasestheeffectivenessofyourbusiness.Helpsdriverevenueastimetomarketis
decreasedduetoatighter,moreefficientbusinessprocess.Yourcustomersatisfaction
isincreasedasyouimproveresponsivenessthroughautomatedinformationflowto
theappropriatepeople.
Allowsyoutoimproveyourbusinessprocesses.Withaccesstorealtimeauditdatafor
reportgenerationandstatisticaldata,youcanviewtheeffectivenessofyourbusiness
processesandmakeimprovementsasneeded.

Steps to Using Business Process Management


Thefollowingstepsoutlineageneralapproachtoimplementingbusinessprocess
management:
1

Abusinessanalystresearchesyourbusinessprocesstoidentify:
Thebusinesstasksinvolvedintheprocess.
Thebusinessrulesthatdictatetheorderofthebusinesstasksandthe
circumstancesunderwhicheachbusinesstaskisperformed.
Afterperformingthisresearch,thebusinessanalystthendraws(ormodels)the
businessprocesstogiveavisualoverviewdiagramofthebusinessprocess.The
businessanalystcanadddocumentationtothebusinessprocesstoprovide
participantsandtheirroles,timing,etc.Foranillustrationofasamplebusiness
processandhowtomodeltheflowofabusinessprocess,seeChapter2,Understand
theBusinessProcesstoModeltheFlowinthisguide.

Thetechnicalstaffcontinuestoresearchthebusinessprocessinformationprovidedby
theanalyst.Thetechnicalstaffresearchesthebusinessprocesstoidentify:
Theinternalsystems,people,andexternalpartnersthatparticipateinthe
businessprocess.
Theinformationflowingbetweenthesetasks.
Whereerrorsandexceptionscanoccurandhowbesttohandlethem.
Afterthisresearch,thetechnicalstaffcontinuestoupdatetheprocessmodelprovided
bythebusinessanalyst.Formoreinformation,seeChapter3,AddTechnicalDetailto
theProcessModelinthisguide.

Thetechnicalstaffimplementsthemodel(thatis,makesthebusinessprocess
operational).Atthistime,yourtechnicalstaffprovidestheadditionalbusinesslogic
toperformthetasksidentifiedintheprocessthatthebusinessanalysthasmodeled.
ThiscanbeassimpleasidentifyingWebservicestoexecuteforabusinesstaskorit
mightrequireyourtechnicalstafftodevelopnewlogic.

Getting Started with Business Process Management Version 7.1

12

1. Introduction to Business Process Management

Seethefollowingchaptersinthisguideforinformationabouthowtoimplementthe
processmodel:
Chapter4,UseWebServices
Chapter5,HandleInteractionswithInternalSystems
Chapter6,HandleInteractionswithInternalPeople
Chapter7,HandleInteractionswithExternalPartners
Chapter8,PerformErrorandExceptionHandling

Monitoring and Managing Business Processes


Afteryourbusinessprocessisoperational,youcanhaveseveralinstancesofabusiness
processrunningatthesametime.Forexample,ifyouhavesixnewemployeesstarting,
youwouldhavesixinstancesofthenewemployeesetupprocessrunning.Youwillwant
tomonitortheprogressofeachinstanceofeachbusinessprocessandmanageeach
instance.
To monitor,youshouldbeabletodetermineinformationaboutthebusinesstasksinthe
process,suchas,determiningthetaskthatiscurrentlyrunning,thetasksthathave
completed,thetaskswaitingforinformationtoarrive,andthetasksthathavefailed.
To manageyoushouldbeabletosuspend,resume,orpermanentlystopaninstanceof
abusinessprocess.
Formoreinformation,seeChapter9,Execute,Monitor,andManageBusiness
Processes.

Getting Started with Business Process Management Version 7.1

13

1. Introduction to Business Process Management

Getting Started with Business Process Management Version 7.1

14

Chapter 2. Understand the Business Process to Model the


Flow

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Sample Business ProcessNew Employee Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Modeling the Flow of the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Documenting the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Getting Started with Business Process Management Version 7.1

15

2. Understand the Business Process to Model the Flow

Introduction
Thischapterdescribesanewemployeesetupbusinessprocesstoillustratehowabusiness
analystcanmodeltheflowofabusinessprocess.Modelingthebusinessprocessgivesyou
anoverallvisualoftheentirebusinessprocess.
Abusinessanalystresearchesthebusinessprocesstodeterminethebusinesstasks
performedbythedifferentdepartments,people,orfunctionalareasthatareinvolvedin
theprocess.Forexample,abusinessanalystmightlistthetasksthatHumanResources
(HR)performsorthetasksthatInformationTechnologies(IT)performs.
Thebusinessanalystcanusethisinformationtodraw(ormodel)theflowofabusiness
process.TomodelabusinessprocessusingwebMethodssoftware,youusewebMethods
Designer.Designerisadesigntimetool.Asseenbytheillustrationsofprocessmodelsin
thisguide,withDesigneryoucancreateeasytounderstand,visuallybasedprocess
models.FormoreinformationaboutDesigner,seewebMethodsDesigneronlinehelp.
Thischapterdescribesthenewemployeesetupbusinessprocessbylistingthevarious
tasksperformedbythedepartmentsinvolvedinthebusinessprocess.Itthenshowsa
processmodelthatabusinessanalystmightcreatetodescribetheflowofthebusiness
process.Thatis,thebusinessanalystmodelsthebusinesstasksintheorderinwhichthe
tasksaretobeperformed.
Thenextchapter,Chapter3,AddTechnicalDetailtotheProcessModel,showshowthe
technicalstaffcantaketheprocessmodelthatthebusinessanalystcreatesandcontinues
toworkwiththemodeltoaddthelogicnecessarytomakethebusinessprocess
executable.

Sample Business ProcessNew Employee Setup


Forthenewemployeesetupbusinessprocess,thehiringmanagerinitiatesthebusiness
processbyfillingoutanonlineformthatcontainsinformationaboutanewemployeeto
behired.Duringthenewemployeesetupbusinessprocess,otherdepartmentsuseand
augmenttheinformationthatthehiringmanagersuppliestoperformtheirbusinesstasks.
ThefollowingsectionsdescribethetasksperformedbyHR,Facilities,andIT.

Human Resources
HRisresponsibleforthefollowingbusinesstasks:
Reviewandapprovethenewemployeescompensationpackageandjobtitle.
EnrollthenewemployeeintotheHRsystem(forexample,PeopleSoft).
Submitinformationtotheoutsourcedpayrolladministrator(forexample,ADP)to
enrollthenewemployeeintothepayrollsystem.
NotifytheFacilitiesandITdepartmentaboutthenewemployee.

Getting Started with Business Process Management Version 7.1

16

2. Understand the Business Process to Model the Flow

Facilities
Facilitiesisresponsibleforthefollowingbusinesstasks:
Assignofficespaceforthenewemployee.
NotifytheHRcoordinatorandhiringmanagerabouttheofficespaceforthenew
employee.

Information Technologies
ITisresponsibleforthefollowingbusinesstasks:
Reviewthenewemployeeinformationandassignthenewemployeeausernameand
passwordthatwillbeusedforinternalsystems.
Enrollthenewemployeeintointernalsystems(forexample,problemtracking,
intranet).
Enrollthenewemployeeintosalesmanagementsystemifthenewemployeewillbe
intheSalesdepartment.
Acquireanappropriatecomputer(laptopordesktop)forthenewemployee.
NotifytheHRcoordinatorandhiringmanagerafterthecomputerarrivesandthe
newemployeeisenrolledinappropriateinternalsystems.

Modeling the Flow of the Business Process


Afterthebusinessanalystunderstandsthetasksinvolvedinabusinessprocess,the
processcanbemodeled.Thefollowingshowsamodelforthenewemployeesetup
businessprocess.

Getting Started with Business Process Management Version 7.1

17

2. Understand the Business Process to Model the Flow

ThebusinessanalystpreparesthemodelintheBusinessAnalystperspectiveofDesigner.
UsingDesigner,thebusinessanalystcanaddaprocessstepforeachtask,showtheflow
bydrawinglines(ortransitions)betweenthesteps,anduseswimlanestoidentifythe
department(HumanResources,Facilities,IT)thatisresponsibleforperformingeachstep.

Documenting the Business Process


WithDesigner,inadditiontosimplymodelingtheprocess,thebusinessanalystcanalso
providedocumentationabouttheprocessasawholeandtheindividualstepswithinthe
process.Aftermodelingtheprocessflow,thebusinessanalystpassesthemodeltothe

Getting Started with Business Process Management Version 7.1

18

2. Understand the Business Process to Model the Flow

technicalstaff,whocanreviewthisdocumentationwhenaddingthelogicthatisrequired
tomaketheprocessexecutable.
Examplesofthetypeofdocumentationthebusinessanalystcanprovideare:
Information about what the step is supposed to accomplish.FortheAddnewemployeeto
payrollsystemtask,thebusinessanalystmightprovideinformationaboutthe
payrollsystem,includingtheinformationthatthepayrollsystemrequires.
Input that is needed for a step to be accomplished. FortheReviewnewemployeestep,
thebusinessanalystcandescribetheinformationthatthehiringmanagermust
supplytostartthenewemployeesetupbusinessprocess.
Output that is the result of the step.FortheReviewemployeeaccountinfostep,the
businessanalystmightdescribethattheITpersonmustprovideaninitialpassword
fortheusernamethatwillbeusedforsubsequentsteps.
Data Transformation Information.ForpassingdatabetweenthestepsEnrollinHR
systemandAddnewemployeetopayrollsystem,thebusinessanalystdescribes
howtheEmployeeIDintheHRsystemrelatestotheemployeeIDusedbythepayroll
system.
Roles and individuals involved in the process.FortheReviewnewemployeestepthe
businessanalystmightlistthemanagerswhocanapprovecertaincompensation
packages.
Complex Business Rules.Thebusinessanalystcanspecifycircumstancesthatrequire
specialprocessingorhumanreview.
Error handling information.FortheReviewnewemployeestep,thebusinessanalyst
mightspecifythatwhenthejobtitleorcompensationpackageforthenewemployee
arenotappropriate,amessageshouldbesentbacktothehiringmanagertocorrect
theseissuesandrestarttheprocess.
KPI Information.Thekeypiecesofinformationthatwillneedtobetracked(suchas,
waittimeforapproval)tomeasuretheeffectivenessoftheautomatedprocessandthe
business/departmentsinvolvedintheprocess.
Reference documentation. ThebusinessanalystcanprovideHTMLhyperlinksto
requirementsdocumentsordetaileddatadefinitions.
Inadditiontothedocumentationbeingusefultothetechnicalstaffwhoareresponsible
forimplementingthebusinessprocesstomakeitexecutable,fromDesigneryoucanalso
generateprocessdocumentationthatincludesapictureoftheprocessmodelandthe
processdocumentationthatthebusinessanalystprovides.

Getting Started with Business Process Management Version 7.1

19

2. Understand the Business Process to Model the Flow

Getting Started with Business Process Management Version 7.1

20

Chapter 3. Add Technical Detail to the Process Model

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Analyzing What Is Required to Perform the Tasks in the Process . . . . . . . . . . . . . . . . . . . . . . . 22
Updating the Step Types in the Process Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Adding Technical Detail to Steps and Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Adding Error and Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Adding Logic that Executes the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Getting Started with Business Process Management Version 7.1

21

3. Add Technical Detail to the Process Model

Introduction
Afterthebusinessanalystmodelstheflowofthebusinessprocess,themodelispassedto
thetechnicalstaff,whoaddtechnicaldetailtothemodel.Thetechnicalstaffusesthe
ProcessDeveloperperspectiveofwebMethodsDesignertobuilduptheprocessmodelto
makeitexecutable.
First,thetechnicalstaffresearchesthebusinessprocesstodeterminewhatisrequiredto
completeeachtask.TheydeterminetheWebservices,internalsystems,orexternal
partnersthatarerequiredtocompleteatask,andwhattasksrequirehumaninteraction.
Toillustratehowthisisdone,thischaptercontinueswiththesamplenewemployeesetup
businessprocess.TheprocessmodelillustratedinChapter2,UnderstandtheBusiness
ProcesstoModeltheFlowisfurtheranalyzedtolisttheinternalsystems,people,and
externalpartnersrequiredtocompleteeachtask;thechapteralsoliststhetasksforwhich
Webservicesareavailable.
Note: Tofullyimplementthebusinessprocess,thetechnicalstaffwouldalsoneedto
determinethedataneededtocompletethetask.Thischapterdoesnotcoverdetermining
thedatarequiredbyeachtask.
Aftertheanalysistodeterminewhatisrequiredtocompleteeachtask,thetechnicalstaff
buildsupthesamemodelthatthebusinessanalystcreated.Inthischapter,thebusiness
tasksaredefinedinphases.Businesstasksforeachfunctionalarea(HumanResources,
Facilities,andInformationTechnologies)aredefinedoneatatime.Finally,errorand
exceptionhandlingisaddedtotheprocessmodel.Itisnotnecessarythatyoubuildupthe
modelinthisway.Youcanuseanymethodthatworksbestforyourbusinessprocess.

Analyzing What Is Required to Perform the Tasks in the Process


Topreparetoimplementthebusinessprocess(thatis,tomakethebusinessprocess
executable),analyzethebusinessprocesstoidentifythebusinesstasksthatinvolve
interactionswith:
Internalsystems
People
Externalpartners
Forsomeofthetasks,youmighthaveWebservicesavailabletoperformtheaction.You
canusetheseWebservicesinthebusinessprocess.
Atthistime,youshouldalsodeterminetheerrorsandexceptionsthatcanoccurandhow
youwanttohandlethem.Thebusinessanalystmighthaveprovidedsomeinformation
abouterrorsandexceptionswhendocumentingtheprocessmodel.Youwillalsowantto
identifyadditionalerrorhandlingforlogicerrorsorexecutionerrorsthatmightoccur
duringtheexecutionofthebusinessprocess.

Getting Started with Business Process Management Version 7.1

22

3. Add Technical Detail to the Process Model

TheremainderofthissectionbreaksdownthebusinessprocessdescribedinChapter2,
UnderstandtheBusinessProcesstoModeltheFlowintothecategorieslistedabove.

Business Tasks that Involve Interaction with Internal


Systems
Inthesamplenewemployeesetupbusinessprocess,thebusinesstasksthatinvolve
internalsystemsare:
HumanResources(HR)enrollingthenewemployeeintotheHRsystem.
ITenrollingthenewemployeeintointernalsystems.
ITenrollingthenewemployeeintothesalesmanagementsystemifthenewemployee
willbeintheSalesdepartment.
Beforeimplementingbusinessprocessmanagement,manyofthesetasksareperformed
byapersonwhoupdatesthesystemswithappropriateinformation.Whenmovingthese
taskstoanautomatedbusinessprocess,eachofthesetaskscanbeautomatedsoaperson
isnotrequiredtophysicallyupdateeachsystem.Whenautomated,theinformationabout
thenewemployeethataninternalsystemrequirescanbeprogrammaticallydeliveredto
enrollthenewemployee.
Forthenewemployeesetupsamplethatisdescribedinthisguide,thetasktoenrollthe
newemployeeintointernalITsystemsisperformedbyaWebservice.ThisWebservice
canbeusedinthebusinessprocess.
Thebusinessprocesswillalsoprogrammaticallymakethedecisionastowhethertoenroll
thenewemployeeintothesalesmanagementsystembasedonwhetherthenewemployee
willbeintheSalesdepartment.

Business Tasks that Involve Human Interaction


Inthesamplenewemployeesetupbusinessprocess,thebusinesstasksthatinvolve
humaninteractionare:
HRreviewtoapprovethenewemployeescompensationpackageandjobtitle.
Facilitiesassigningofficespaceforthenewemployee.
ITreviewofthenewemployeesaccountinformation.
Withanautomatedbusinessprocessinplace,thepeopleresponsibleforthesetaskswill
receiveinformationaboutthenewemployeeattherighttimeinthebusinessprocess.
FortheHRreview,thebusinessprocesspausespendingtheapprovalofthenew
employee.Thebusinessprocesscontinuesonlyafterapprovalisgranted.
ITcanreviewthenewemployeesaccountinformationandFacilitiescanassignoffice
spaceanytimeaftertheHRapproval.

Getting Started with Business Process Management Version 7.1

23

3. Add Technical Detail to the Process Model

Business Tasks that Involve Interaction with External


Partners
Inthesamplenewemployeesetupbusinessprocess,thebusinesstasksthatinvolve
externalpartnersare:
HRsubmitsinformationtotheexternalpayrolladministratortoenrollthenew
employeeintothepayrollsystem.
ITacquirestheappropriatecomputerforthenewemployee.
Beforeimplementingbusinessprocessmanagement,thetasktoenrollthenewemployee
intothepayrollsystemrequiredapersontocontacttheexternalpartner.Whenmoving
thistasktoanautomatedbusinessprocess,thistaskcanbeautomatedsoinformationto
enrollthenewemployeeisprogrammaticallydeliveredtotheexternalpartner.
Forthenewemployeesetupsamplethatisdescribedinthisguide,thetasktoordera
computerforthenewemployeeisperformedbyaWebservicethatisprovidedbythe
computersupplier.ThisWebservicecanbeusedinthebusinessprocess.

Business Tasks for Which There are Web Services


Asmentionedintheabovesections,forillustrationpurposesinthesamplenewemployee
setupbusinessprocess,thebusinesstasksforwhichtherearealreadyWebservicesare:
ITusesaWebservicetoenrollthenewemployeeintoitsinternalsystems(e.g.,
problemtracking,intranet).
ITusesaWebservicetoorderacomputerforthenewemployee.

Error and Exception Handling


Althoughyoucouldaddmoreerrorandexceptionhandling,forpurposesofillustration
thefollowingerrorsandexceptionhandlingaredescribedforthesamplenewemployee
setupbusinessprocess:
InresponsetotheHRreviewoftheemployeeinformation,ifHRrejectsthe
compensationpackageand/orthejobtitleofthenewemployee,thehiringmanageris
sentanemailmessagetoresolvetheissue.
IfanerroroccurswhenenrollingtheemployeeintotheHRsystem,informationabout
theerrorisdeliveredtotheHRcoordinatorandITtoresolvetheissue.
Ifagenerallogicorsystemerroroccursduringthebusinessprocess,forexample,ifa
systemisnotavailablewhenattemptingtoenrollthenewemployee,anemail
messagethatdescribestheerrorissenttoIT.

Getting Started with Business Process Management Version 7.1

24

3. Add Technical Detail to the Process Model

Note: Inadditiontosendinganemailinresponsetoanerror,youcantakeotheractions,
forexample,havetheprocessgobacktoanearlierstepintheprocessorgotoanother
stepthatwillexecutelogictoundopartsofabusinessaction.

Updating the Step Types in the Process Model


IntheprocessmodelillustratedinChapter2,UnderstandtheBusinessProcesstoModel
theFlow,theprocessmodelcontainedonlyactivitystepswiththeimplementationtype
ofISService.However,theactualtypeofsteptobeusedisbasedonwhetherabusiness
taskinvolvesaWebservice,aninternalsystem,aperson,oranexternalpartner.
Ifthebusinessanalystknowsthetypeofstepthatisrequired,thebusinessanalystcanuse
theappropriatesteptype.However,thetechnicalstaffcanchangethesteppropertiesto
usetheappropriatetypeforbusinesstask.Formoreinformationaboutstepproperties,
seethewebMethodsDesigneronlinehelp.
If the task involves...

Use this kind of step...

Set the step to this type...

aninternalsystem

activity

IS Service

anexternalpartner

activity

IS Service

aWebservice

activity

Web Service

aperson

task

Task

Default icon

Whenyouchangethetypeofstep,Designerupdatesthestepicontothedefaulticonfor
thetypeofstep.Ifyouwant,youcanselectanothericontouseforthestep.Designer
providesawiderangeofalternativeicons.

Getting Started with Business Process Management Version 7.1

25

3. Add Technical Detail to the Process Model

Adding Technical Detail to Steps and Transitions


Asstatedabove,thisguidedescribesthebusinessprocessbeingbuiltupinphasesby
functionalarea.

Defining Steps for HR Business Tasks


FirstHRbusinesstasksarebuiltup.Becausethebusinessprocesswasanalyzed,the
informationneededtofurtherrefinetheHRbusinesstasksisunderstood.Thefollowing
tablelistsinformationcollectedabouttheHRbusinesstasks;thatis,whetheraninternal
system,person,orexternalpartnerisinvolvedwhenperformingthebusinesstask.To
viewtheHRbusinesstasksintheprocessmodel,seethediagrambelowthetable.

Task
1

Performed
by

Description

person

Reviewandapprovethecompensationpackageandjobtitle.
Anapprovalisrequiredtocontinue.Foradescriptionoftheactions
totakeifthereviewisrejected,seeAddingErrorandException
Handlingonpage33.

internal
system

Afterthecompensationpackageandjobtitleareapproved,enroll
thenewemployeeintotheinternalHRsystem.

n/a

AfterenrollingthenewemployeeintheHRsystem,notifyFacilities
andITaboutthenewemployee.
ThetasksperformedbyFacilitiesandITwillbeaddedtothe
processmodelinlaterphases.SeeAddingtheFacilitiesBusiness
TaskstotheModelonpage29andAddingtheITBusinessTasks
totheModelonpage30.

external
partner

Submitinformationtotheoutsourcedpayrolladministratorto
enrollthenewemployeeintothepayrollsystem.Thepayroll
administratoristheexternalpartner.

n/a

NotifytheHRcoordinatorandthehiringmanagerthattheHRtasks
arecomplete.

ThePerformed bycolumninthetablesinthischapterusen/awhenthetaskbeing

describeddoesnotinvolveaWebservice,internalsystem,person,orexternalpartner.

Getting Started with Business Process Management Version 7.1

26

3. Add Technical Detail to the Process Model

Model of the HR tasks in the business process


(in this model, the user has selected some custom images for certain steps)

ThefollowingDesignerfeaturesareusedinthemodelingoftheHRbusinesstasks:
ThefollowingstepsareinaninternalpoollabeledInternalDepartmentsandina
swimlanelabeledHumanResources:
Receivenewemployeeinfo
Reviewnewemployee
GetHRreviewoutcome
EnrollinHRsystem
Getoutcomeofenroll
Processresultsoftheenroll
Makepayrollrequest
ReceivepayrollACK(acknowledgement)
ProcesspayrollACK

Getting Started with Business Process Management Version 7.1

27

3. Add Technical Detail to the Process Model

Placestepsexecutedbyyoursystemswithinaninternalpool.Youcanaddswimlanesto
thepooltoidentifydifferentfunctionalgroups(forexample.,Humanresources)
withinyourcompany.Youcanthenplacethestepsthatafunctionalgroupisto
performwithintheirswimlane.Aninternalpoolsandswimlanesarerepresented
usingboxeswithsolidborders.Useofpoolsandswimlanesisoptional.
Thelabel,approved,wasaddedtothetransition(line)connectingstepsGetHRreview
outcomeandEnrollinHRsystemtomaketheprocessmodelmore
understandable.Later,anothertransitionwillbeaddedfromtheGetHRreview
outcomestepforthecasewhenthereviewisrejected;formoreinformation,see
AddingErrorandExceptionHandlingonpage33.Duringimplementation,
conditionswillalsobeaddedtothetransitionssothatcontrolispassedtothecorrect
stepsbasedonwhetherthereviewisapprovedorrejected.
Forthebusinesstaskthatinvolveshumaninteraction(Reviewnewemployee),a
taskstepisused.Youdesigntheinterfaceforhumaninteractionwhenyoucreatethe
taskusingtheTaskeditorinDesigner.Formoreinformationabouttasksteps,see
Chapter6,HandleInteractionswithInternalPeople.
Forthebusinesstaskthatinteractswithaninternalsystem(EnrollinHRsystem),
anactivitystepisused.TheactivitysteptypeissettoIS Servicebecausethestep
invokesanISservicetointeractwiththeinternalsystem.Formoreinformation,see
Chapter5,HandleInteractionswithInternalSystems.Also,areceivestepwasadded
totheprocess(Getoutcomeofenroll)because,inthissamplebusinessprocess,the
internalsystemsendsitsresponsedataasynchronously.Theprocesswillwaitforthe
responsedatatoarrivebeforeexecutingtheProcessresultsoftheenrollstep.
Forthebusinesstaskthatinteractswithanexternalpartnertoenrollthenew
employeeinthepayrollsystem,activitystepswithasteptypeofIS Serviceareused.
Forasinglebusinesstaskforinteractingwithanexternalpartner,severalstepsare
addedtotheprocessmodel:
Astepintheinternalpooltomakethepayrollrequest.
Stepsinanexternalpooltohandlethepayrollrequestandrecordthepayroll.
Anexternalpoolisrepresentedbyaboxwithadottedlineborder.Alsothe
transitionsconnectingstepsfromaninternalsteptoastepinanexternalpooluse
adottedline.Theexternalpoolandthestepswithintheexternalpoolareonlyfor
visualpurposestomakethebusinessprocessmoreunderstandable;stepsin
externalpoolsarenotexecutedonyoursystem.
Finally,aninternalsteptoreceivethepayrollacknowledgment(ACK).
Formoreinformation,seeChapter7,HandleInteractionswithExternalPartners.
Imageswereupdatedforthefollowingstepstohelpvisuallydepictthestepfunction.
Forthebusinesstasktoreviewtheoutcomeofprocessing(GetHRreview
outcomestep),theimagewaschangedtoadiamondtodepictadecisionistobe
made.

Getting Started with Business Process Management Version 7.1

28

3. Add Technical Detail to the Process Model

ForthebusinesstaskthatnotifiestheHRcoordinatorandhiringmanager,an
activitystepisused.Theimagewaschangedtoonethatcontainsanenvelope,
visuallydepictingthatamessageistobesent.
ForthestepsintheexternalpoolPayrollAdministrator,theimagewas
changedtoaboxtoindicateprocessingoutsidetheenterpriseisbeingperformed.

Adding the Facilities Business Tasks to the Model


Again,becausethebusinessprocesswasanalyzed,theinformationneededtofurther
refinetheFacilitiesbusinesstasksisunderstood.Thefollowingtablelistsinformation
collectedabouttheFacilitiesbusinesstasks.ToviewtheupdatedFacilitiesbusinesstasks
intheprocessmodel,seethediagrambelowthetable.

Task

Performed
by

Description

person

Assigntheofficespaceforthenewemployee.Ahumanreviewsthe
availableofficespaceandassignsthenewemployeealocation.

n/a

NotifytheHRcoordinatorandthehiringmanagerabouttheoffice
space.

Getting Started with Business Process Management Version 7.1

29

3. Add Technical Detail to the Process Model

Model with the Facilities business tasks added to the model with the HR business tasks

Changing the background colors of swimlanes helps to


visually distinguish between functional areas (e.g.,
Human Resources and Facilities).

Adding the IT Business Tasks to the Model


ThefollowingtablelistsinformationcollectedabouttheITbusinesstasks;thatis,the
internalsystem,person,orWebserviceinvolvedwhenperformingthebusinesstask.To
viewtheupdatedITbusinesstasksintheprocessmodel,seethediagrambelowthetable.

Getting Started with Business Process Management Version 7.1

30

3. Add Technical Detail to the Process Model

Task

Performed
by

Description

person

Reviewthenewemployeeinformationandassignthenew
employeeausernameandpassword.Thisistheusernameand
passwordthatthenextstepuseswhencreatinguseraccountsfor
theuserininternalsystems.Additionally,ITensuresthecomputer
specificationsforthenewemployeearecorrect.

Web
service

Enrollthenewemployeeintointernalsystems(e.g.,problem
tracking,intranet).

internal
system

Enrollthenewemployeeintosalesmanagementsystemifthenew
employeewillbeintheSalesdepartment.Thebusinessprocess
conditionallyperformsthisbusinesstaskbasedonwhetherthe
newemployeeisintheSalesdepartment.

Web
service

Acquireanappropriatecomputer(e.g.,laptopordesktop)forthe
newemployee.TheITdepartmentusesaWebserviceforthis
businesstask.

n/a

NotifytheHRcoordinatorandhiringmanagerafteracomputer
hasbeenorderedandthenewemployeeisenrolledinthe
appropriateinternalsystems.

Note: Notethatsteps2,3,and4donotoccursequentially.Rather,theyeachproceedas
soonasstep1(theITreviewstep)iscomplete.

Getting Started with Business Process Management Version 7.1

31

3. Add Technical Detail to the Process Model

Model with the IT business tasks added to the model with the HR and Facilities business tasks

ThefollowingDesignerfeaturesareusedintheprocessmodelabove:

Getting Started with Business Process Management Version 7.1

32

3. Add Technical Detail to the Process Model

Thestepstocreateinternalaccountsandtoordertheemployeescomputerareforthe
businesstasksthatinvolveWebservices.Thestepsuseactivitystepswiththestep
typesettoWeb Service.FormoreinformationaboutWebServicesteps,seeChapter4,
UseWebServices.
Thethreetransitions(lines)fromtheProcessresultsoftheenrollstepindicatea
splitinprocessingwheremultiplestepsexecutesimultaneously.Thatis,afterthe
Processresultsoftheenrollstep,thefollowingstepsbegintoexecuteinparallel:
MakepayrollrequestintheHumanResourcesswimlane.
AssignofficespaceintheFacilitiesswimlane.
ReviewemployeeaccountinfointheITswimlane.
Later,whenerrorandexceptionhandlingisaddedtotheprocessmodel,anexample
ofusingtransitionconditionsisusedtoindicatehowtotransitiontoonlyonestep
whentherearemultipletransitionsavailable.Formoreinformation,seeChapter8,
PerformErrorandExceptionHandling.

Adding Error and Exception Handling


Afterallthebusinesstasksaremodeled,errorandexceptionhandlingisaddedtothe
processmodel.Thefollowingtabledescribestheerrorandexceptionhandlingtoaddto
theprocessmodelasdescribedinErrorandExceptionHandlingonpage24.The
diagramthatfollowsthetableillustrateswheretheerrorandexceptionhandlingfitsinto
theprocessmodel.
Item

Description

InresponsetotheHRreviewoftheemployeeinformation,ifHRrejectsthe
compensationpackageand/orthejobtitleofthenewemployee,thehiring
managerissentanemailmessagetoresolvetheissue.

IfanerroroccurswhenenrollingtheemployeeintotheHRsystem,information
abouttheerrorisdeliveredtotheHRcoordinatorandITtoresolvetheissue.

Ifagenerallogicorsystemerroroccursduringthebusinessprocess,for
example,ifasystemisnotavailablewhenattemptingtoenrollthenew
employee,anemailmessagethatdescribestheerrorissenttoIT.

Getting Started with Business Process Management Version 7.1

33

3. Add Technical Detail to the Process Model

Model with the error and exception handling added

ThefollowingDesignerfeaturesareusedinthemodelwiththeerrorandexception
handling:

Getting Started with Business Process Management Version 7.1

34

3. Add Technical Detail to the Process Model

Inthissample,conditionsareplacedonthetwotransitions(lines)fromtheGetHR
reviewoutcometocreateabranchinexecution.Onlyoneofthetwotransitionsis
takenbasedontheoutcomeofthetransitionconditions.
FortheEnrollinHRsystemstepanerrortransitionisused.Theerrortransitionis
takenatruntimeiftheserviceexecutedbytheEnrollinHRsystemstepthrowsan
exception.
Ifanerroroccursinanystepoftheprocessmodelforwhichthereisnoerror
transition,controlispassedtotheprocesswideerrorstep.Unlikeotherstepsinthe
processmodel,theprocesswideerrorstepisnotconnectedtoothersteps.

Adding Logic that Executes the Business Process


Afterthestepsandtransitionsforthebusinessprocessaredrawn,youcontinuetoupdate
themodeltodefinepropertiesforthestepsandtransitions.Thepropertiesforsteps
includeinformationsuchasidentifyingthelogictoexecuteforastep.Propertiesfor
transitionscanincludeaddingdescriptions(labels)forthetransitionorplacingconditions
ontransitionsforifandwhenoneshouldbetaken.Foradescriptionofthepropertiesyou
candefine,seethewebMethodsDesigneronlinehelp.
Designergoesbeyondmodelingthebusinessprocess.Afteryoucompletetheprocess
model,fromDesigneryoucangeneratetheruntimeitems(forexample.,services)needed
toexecuteyourbusinessprocessintheunderlyingwebMethodscomponents.
AlthoughDesignergeneratescomponentsforyou,additionalobjectsneedtobedefined
inotherwebMethodscomponents.Thetwomaintypesofinformationyoumustdefine
are1)thedefinitionofthedatathatwillpassbetweenthestepsintheprocess,and2)the
specificationoftheservicesand/orhumaninterfaces(tasks)usedforthesteps.These
servicesand/orhumaninterfacesmightalreadyexistinyourenvironmentormightbe
additionallogicthatneedstobedeveloped.
Thechaptersthatfollowinthisguideprovidemoreinformationaboutimplementingthe
stepsfor:
Webservices(seeChapter4,UseWebServices)
Interactionwithinternalsystems(seeChapter5,HandleInteractionswithInternal
Systems)
Interactionwithpeople(seeChapter6,HandleInteractionswithInternalPeople)
Interactionwithexternalpartners(seeChapter7,HandleInteractionswithExternal
Partners)
Errorandexceptionhandling(seeChapter8,PerformErrorandException
Handling)
ThesechaptersidentifythewebMethodssoftwarerequiredtoimplementeachtypeof
step,theactionsyouneedtotaketoimplementeachtypeofstep,andpointyoutoother
webMethodsdocumentationthatprovidesadditionalinformation.

Getting Started with Business Process Management Version 7.1

35

3. Add Technical Detail to the Process Model

Getting Started with Business Process Management Version 7.1

36

Chapter 4. Use Web Services

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Creating a Web Service Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Configuring the Activity Step for the Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Modifying the Web Service Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Using the Wrapper Service to Make the Inputs Available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Receiving Data Back Into the Business Process Synchronously . . . . . . . . . . . . . . . . . . . . . . . . 42

Getting Started with Business Process Management Version 7.1

37

4. Use Web Services

Overview
ThebusinessprocessinteractswithaWebservicebyinvokingaWebserviceconnector.In
Developer,WebservicesareimplementedwithaproviderorconsumerWebdescriptor.
TheWebservicedescriptordefinestheWebserviceandcontainsalloftheWebservice
connectorsassociatedwiththeWebservicebeingused.
ToindicatewhenyouwanttouseaWebservice,youaddanactivitysteptoyourprocess
modelandsetitssteptypetoWeb Service.Youconfiguretheactivitysteptoidentifythe
Webserviceconnectoryouwanttouse.
ThefollowingshowsthepartoftheprocessmodelfromChapter3,AddTechnicalDetail
totheProcessModelthatmodelsaninteractionwithaWebservice.
Model for interaction with a Web service

Use an activity step with the step type


set to Web Service to invoke a Web
service.

AftermodelingthetaskstointeractwithaWebservice,performthefollowingactions
duringdesigntimetosetuptheinteractionwithaWebservice:
Design-time task

For more information, see...

(Optional)CreateaWebservicedescriptorif
onedoesnotexist.

ReceivingDataBackIntothe
BusinessProcessSynchronouslyon
page42

IdentifytheWebserviceconnectoryouwant
thebusinessprocesstouse.

ConfiguringtheActivityStepfor
theWebServiceonpage39

(Optional)MakechangestotheWebservice
descriptor.

ModifyingtheWebService
Descriptoronpage40

InsurethattheinputstotheWebservicewillbe
availableatruntime.

UsingtheWrapperServicetoMake
theInputsAvailableonpage40

Getting Started with Business Process Management Version 7.1

38

4. Use Web Services

Design-time task

For more information, see...

SpecifytheauthenticationfortheWebservice.

SpecifyingAuthenticationforthe
WebServiceonpage41

Setuptheprocessmodelstepthatretrievesthe
outputfromtheWebservice.

ReceivingDataBackIntothe
BusinessProcessSynchronouslyon
page42

Note: IfyouwantyourprocesstobeexposedasaWebService,seethewebMethods
Designeronlinehelpforinformationaboutconfiguringreceivestepstodefinea
synchronousreceive/reply.

Creating a Web Service Descriptor


webMethodsDeveloperusesWebservicedescriptorstomakeISservicesavailableasWeb
services.WithintheWebservicedescriptoraretheWebserviceconnectorsthatreference
theoperationscontainedwithintheWebservice.
IfaWebservicedescriptorandconnectorsdonotexistfortheservicesyouwantto
invoke,youcancreateanewWebservicedescriptorinDeveloper.AWebservice
descriptordescribeseitheraprovideroraconsumerWebservice,butneverboth.
ProviderWebservicesarethoseWebservicesthatallowanexternalusertoinvokean
existingISserviceasanoperationoftheWebservice.
ConsumerWebservicesareexternalWebservicesthatcanbeinvokedfromwithinthe
localIS.
To learn more abouthowtocreateWebservicedescriptors,seetheWebServicesDevelopers
Guide.

Configuring the Activity Step for the Web Service


WhenyouconfiguretheactivitystepforaWebservice,youconfigurethesteptoidentify
theWSDLfileassociatedwiththetargetedserviceoperation.Todoso,choosetheCreate
Implementation > Create New Web Service ConnectorrightclickmenuoptiontoselectaWSDL
filethatresidesonaconnectedIntegrationServer.
AfteryouselecttheWSDLfile,ifthefilecontainstwoormoreoperations,youare
promptedtoselectasingleoperation;thisistheoperationthatwillbeassociatedwiththe
activitystep.IftheWSDLfilecontainonlyoneoperation,nopromptingforoperation
selectionoccurs.YouarealsoaskedtospecifyafolderlocationontheIntegrationServer
wheretheassociatedWebservicesdescriptorwillbecreated.

Getting Started with Business Process Management Version 7.1

39

4. Use Web Services

Afteryoumakeyourselections,DesignercreatesaWebservicedescriptoronthe
connectedIntegrationServerandautomaticallyupdatestheInputs / Outputspropertiesof
theactivitystep.
Tip! InDesigner,youcanselecttheWebserviceconnectoryouwanttouseintheIS
BrowserviewanddragittotheactivitystepfortheWebservice.Designerwillupdatethe
stepspropertiesappropriately.
To learn more about:
Webservicedescriptors(includinghowtocreatethem)andWebservice
connectors,seetheWebServicesDevelopersGuide.
HowtouseWebservicedescriptorsinDeveloper,seethewebMethodsDeveloper
UsersGuide.
Configuringstepsinaprocessmodel,seethewebMethodsDesigneronlinehelp.

Modifying the Web Service Descriptor


AfteryouspecifytheWSDLfileandoperationforaWebserviceactivitystep,Designer
automaticallycreatesaWebservicedescriptor(withWebserviceconnectors)onthe
connectedIntegrationServer.ThisWebservicedescriptoriscreatedwithdefaultsettings
foranumberofvalues;forexample:
Directive:ws
SOAPversion:SOAP1.1
Transport:HTTP
UseandStyle:DocumentLiteral
IfyouwanttomodifytheWebservicedescriptor,youmustdosoinDeveloper.Formore
informationaboutmodifyingWebservicedescriptors,seetheWebServicesDevelopers
Guide.

Using the Wrapper Service to Make the Inputs Available


YoumustsetupthebusinessprocesssothattheinputstotheWebservicewillbeavailable
atruntime.Todothis,youcanupdatethewrapperservicethatDesignergeneratesforthe
activitystep.Whenyoubuildanduploadaprocess,Designergeneratesawrapperservice
thelogicalserverforeverystepintheprocess,usingthesignaturespecifiedbythestep
inputsandoutputs.ForaWebserviceactivitystep,thewrapperserviceisaflowservice
thatinvokestheWebserviceconnector.ItresidesinthepackagethatDesignergenerates
fortheprocess.

Getting Started with Business Process Management Version 7.1

40

4. Use Web Services

Theinputsofthewrapperservicearethebusinessprocessdatathatyouaddtothestep
inputsinDesigner,and,asaresult,youcanmapdatafromtheseintotheinputsofthe
wrappedWebserviceconnector.Additionally,youcanusethewrapperservicetohard
codeinputvaluesifyouwant.Thewrapperserviceswillnotappearuntilyougenerate
anduploadtheprocess.

Specifying Authentication for the Web Service


OneinputtoaWebserviceconnectoristheauthdocument,whichshouldcontainthe
usernameandpasswordrequiredtoauthenticatetheWebservicerequest.Youcanuse
thewrapperservicetomaptheusernameandpassword,oryoucanhardcodethese
values.

To learn more about:


Howtomapdatainflowservicesorhowtohardcodevaluesintheserviceinputs,
seethewebMethodsDeveloperUsersGuide.
TheitemsDesignergenerateswhenyoubuildanduploadaprocess,seethe
webMethodsDesigneronlinehelp.

Getting Started with Business Process Management Version 7.1

41

4. Use Web Services

Receiving Data Back Into the Business Process Synchronously


OutputdatadefinedintheInputs / Outputspropertyofastepisreturnedsynchronously;
thatis,afterthestepcompletestheProcessEngineplacesthedataforthedefinedoutputs
intothebusinessprocesspipeline.Itisalsopossibletogetdatabackintoyourprocessas
anasynchronousreply.Formoreinformationaboutreceivingdataasynchronously,see
ReceivingDataBackIntotheBusinessProcessAsynchronouslyonpage49.Most
servicesreturnatleastsomedatasynchronously.
AfteraWebserviceactivitystepcompletes,theProcessEngineplacestheoutputdata
definedintheInputs / OutputspropertyoftheWebServiceactivitystepintothebusiness
processpipeline.IfthedefinedoutputsexactlymatchtheoutputthattheWebservice
returned,youdonotneedtotakeanyfurtheractionsatdesigntime.
However,iftheoutputsdefinedfortheWebServiceactivitystephaveadifferentformat,
youcanupdatethewrapperservicethatDesignergeneratesfortheWebServiceactivity
steptomaptheWebserviceconnectoroutputtotheoutputfieldsdefinedfortheWeb
Serviceactivitystep.
Bydefault,whenyouspecifytheWebserviceconnectorforaWebServiceactivitystep,
DesignersetsthestepsInputs / Outputspropertysothatitexactlymatchesthe
inputs/outputsoftheWebserviceconnector:
TheinputsaresettotheinputISdocumenttypethatDevelopergeneratedfortheWeb
serviceconnector.
TheoutputsaresettotheoutputISdocumenttypethatDevelopergeneratedforthe
Webserviceconnector.
Forexample,inthenewemployeesetupbusinessprocess,theWebServicesteptoordera
computerforthenewemployeeisused.WhentheWebserviceconnectorwasgenerated
fortheWebservice,DevelopergeneratedthefollowingISdocumenttypesthatwereused,
bydefault,fortheinputs/outputsoftheWebServiceactivitystep:
TheinputISdocumenttype
OrderComputer.OrderComputerPortType.doctype:orderComputerInput
TheoutputISdocumenttype
OrderComputer.OrderComputerPortType.doctype:orderComputerOutput
Youdonothavetousethedefaultinputsandoutputs.Youarefreetochangethemto
containthefieldsthatyouwant.However,youwillneedtousethewrapperserviceto
mapthedataintotheinputs/outputsthatyoudefine.

Processing the Web Service Output


WhenyouwantasubsequentsteptoaccessandprocessthereturnedWebserviceoutput,
updatethatstepsinputpropertiestoincludethedataitneeds.Forexampleinthesample
describedinthischapter,toaccessandprocesstheWebserviceoutput,updateastepafter

Getting Started with Business Process Management Version 7.1

42

4. Use Web Services

theWebserviceactivitystepsothatitusestheWebServiceactivitystepsoutputasits
input.Youcanthenidentifyhowyouwantthatsteptoprocesstheoutputbyconfiguring
thestepsAdvanced > Implementationproperties,forexample,byspecifyingaserviceto
invoke.
Note: Bydefault,DesignerdisplaysonlyBasicpropertiesintheBusinessAnalyst
perspective.ToviewAdvancedproperties,youmustchangetheAdvancedProperty
ModesettingintheDesignerpreferencesettings.Formoreinformation,seethe
webMethodsDesigneronlinehelp.
To learn more about:
Howtoassigninputstoastepinabusinessprocess,seethewebMethodsDesigner
onlinehelp.
Webserviceconnectors,includinghowtogenerateWebserviceconnectsandtheIS
elementsgeneratedforthem,seetheWebServicesDevelopersGuide.

Getting Started with Business Process Management Version 7.1

43

4. Use Web Services

Getting Started with Business Process Management Version 7.1

44

Chapter 5. Handle Interactions with Internal Systems

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Sending Data from the Business Process to the Internal System . . . . . . . . . . . . . . . . . . . . . . . . 47
Receiving Data Back Into the Business Process Asynchronously . . . . . . . . . . . . . . . . . . . . . . . 49

Getting Started with Business Process Management Version 7.1

45

5. Handle Interactions with Internal Systems

Overview
Tointeractwithaninternalsystem,thebusinessprocesssendsdatatotheinternalsystem.
Thebusinessprocessshouldsendthedataintheformatthattheinternalsystemexpects.
Tosendthedata,useanactivitystepinthebusinessprocessandensureitssteptypeisset
toIS Service.Theactivitystepinvokesaservicethatsendsthedatatotheinternalsystem.
Togetdatafromaninternalsystem,theinternalsystemsendsdatatothebusinessprocess
inadocument.Onemethodistohavetheinternalsystempublishthedocumenttothe
IntegrationServer.Togetthedocumenttothebusinessprocess,yousetupthebusiness
processtoreceivethepublisheddocument.
Note: Thischapterfocusesonasynchronouslyreceivingdataintoabusinessprocessby
havingtheinternalsystempublishthedocument.Thismethodwasselectedbecauseit
illustrateshowtocorrelateapublisheddocumenttothecorrectinstanceofabusiness
process.
However,anotherandmoredirectmethodtogetdatafromaninternalsystemtothe
businessprocessistohavethebusinessprocessinvokeaservicethatreturnsthedata
fromtheinternalsystemasitsoutput.Whendataisreturnedasserviceoutput,itis
availableinthebusinessprocessaftertheserviceexecutes.Formoreinformation,see
ReceivingDataBackIntotheBusinessProcessSynchronouslyonpage42.
ThefollowingdiagramshowsthepartoftheprocessmodelfromChapter3,Add
TechnicalDetailtotheProcessModelthatmodelsaninteractionwithaninternalsystem.
Model for Interaction with an internal system
In this model, use this step to
invoke a service to send data
to the internal system...

...and this step to receive the


data from the internal system.

Use an AND join on this step so its


execution begins only when there is a
transition from both the activity and
receive steps.

Aftermodelingthetasksthatinteractwithaninternalsystem,performthefollowing
actionsduringdesigntimetocompletethesetuptointeractwithaninternalsystem:

Getting Started with Business Process Management Version 7.1

46

5. Handle Interactions with Internal Systems

Design-time task

For more information, see...

Setuptosenddatafromthebusinessprocessto
theinternalsystem.

SendingDatafromtheBusiness
ProcesstotheInternalSystemon
page47

Setuptohavetheinternalsystemsenda
documenttothebusinessprocessandhavethe
businessprocessaccessthedocumentcontent.

ReceivingDataBackIntothe
BusinessProcessAsynchronously
onpage49

Sending Data from the Business Process to the Internal System


Tosetuptosenddatafromabusinessprocesstoaninternalsystem,youneedto:
Createaservicethatsendsthedocumenttotheinternalsystem.
Updatetheprocessmodeltoreferencetheservice.

Creating a Service that Sends Data to the Internal System


Youcancreateaservice(forexample,aflowserviceoraJavaservice)thatthebusiness
processinvokestosendthedatatotheinternalsystem.Usetheservicetoformatthedata
inthewaythattheinternalsystemexpectsandthensendthedatatotheinternalsystem.
Forexample,ifyourinternalsystemexpectsthedataasanXMLstring,youcanusethe
serviceto:
MapdatathatisinthebusinessprocesspipelinetoanIDataobjectthatrepresentsthe
structureofthedata.
Invokethebuiltinservicepub.xml:documentToXMLStringtoformtheXMLstring.
Invokeaservicethatyoucreatethatsendsthestringtotheinternalsystem.
Thefollowingfigureshowssampleflowservicelogictosenddatatoaninternalsystem.

To learn more abouthowtocreateservices,seethewebMethodsDeveloperUsersGuide.

Using webMethods Adapters


ThewebMethodsproductsuiteprovidesstandardsbasedadapterstoprovideaccesstoa
broadnumberofinternalsystems.IfyouhaveawebMethodsadapterthatinteractswith

Getting Started with Business Process Management Version 7.1

47

5. Handle Interactions with Internal Systems

theinternalsystem,youcanusethefeaturesprovidedbythewebMethodsadapterto
interfacewithyourinternalsystem.
ByusingawebMethodsadapter,youcanmorerapidlyandefficientlyintegratewithyour
internalsystem.Usingtheadapteralsolimitstheamountofdetailyourdevelopersneed
tounderstandaboutlowlevelspecificsofindividualapplicationinterfaces.
To learn more aboutthewebMethodsadaptersthatareavailable,seeinformationabout
currentreleasesintheRelease InfosectionofthewebMethodsAdvantageWebsiteat
http://advantage.webmethods.com.

Updating the Process Model to Reference the Service


Afteryoucreatetheservicethatsendsdatatotheinternalsystem,updatetheprocess
modeltoreferencetheservicesothatthebusinessprocessinvokestheserviceatruntime.
Todoso,selecttheISservicestepinDesignerandbrowseforanavailableIntegration
ServerserviceintheServicefieldoftheImplementationtabinthePropertiesview.
Note: Bydefault,DesignerdisplaysonlyBasicpropertiesintheBusinessAnalyst
perspective.ToviewAdvancedproperties,youmustchangetheAdvancedProperty
ModesettingintheDesignerpreferencesettings.Formoreinformation,seethe
webMethodsDesigneronlinehelp.
Update the Advanced >
Implementation > Service property
for this step to identify the service that
sends the data to the internal system.

Tip! InDesigner,youcanalsoselecttheserviceintheISBrowserviewanddragitonthe
activitystep.Designerwillupdatethestepspropertiesappropriately.
To learn more abouthowtosetpropertiesforstepsinabusinessprocess,seethe
webMethodsDesigneronlinehelp.

Getting Started with Business Process Management Version 7.1

48

5. Handle Interactions with Internal Systems

Receiving Data Back Into the Business Process Asynchronously


Togetdatafromaninternalsystemtoabusinessprocess,yousetuptoreceivedatafrom
theinternalsystem.Tosetupthisprocessing,youneedto:
DefineapublishableISdocumenttypethatdefinestheformatofthedatathatthe
internalsystemistosendtothebusinessprocess.
UpdatetheprocessmodelsothatitcanreceivetheISdocumenttype.
Correlatetheincomingdocumentwiththecorrectinstanceofthebusinessprocess.
Optionally,createaservicethatthebusinessprocessusestoprocessthedocument
fromtheinternalsystem.
Note: Forinformationabouthowtoreceiveinformationbackintothebusinessprocess
synchronously,seeReceivingDataBackIntotheBusinessProcessSynchronouslyon
page42.

Defining an IS Document Type for the Document from the


Internal System
YouneedtodefineapublishableISdocumenttypethatdefinesthestructureofthedata
thattheinternalsystemisgoingtosendtothebusinessprocess.ApublishableIS
documenttypedefinesadocumentthatcanbepublishedandsubscribedto.Theinternal
systemwillpublishthedocument,andyouaddareceivesteptotheprocessmodelto
receivethedocumentintotheprocess.
To learn more aboutpublishableISdocumenttypesandhowtodefinethem,seethe
PublishSubscribeDevelopersGuide.

Updating the Process Model to Receive the IS Document


AfteryoudefinetheISdocumenttype,addareceivesteptotheprocessmodelwherethe
documentistoentertheprocess.Todoso,selectthereceivestepinDesignerandbrowse
foranavailableIntegrationServerdocumentintheReceiveDocumentfieldofthe
ImplementationtabinthePropertiesview.

Getting Started with Business Process Management Version 7.1

49

5. Handle Interactions with Internal Systems

Update the Advanced > Implementation >


Receive Document property of the receive
step to identify the IS document type of the
document being published.

Tip! InDesigner,youcanalsoaddareceivestepbyselectingtheISdocumenttypeintheIS
Browserviewanddraggingitontothedesigncanvas;aproperlyconfiguredreceivestep
isautomaticallycreated.Ifyouhavealreadymodeledthereceivestep,youcanselectthe
ISdocumenttypeintheISBrowserviewanddragitonthereceivestep.Designersetsthe
stepspropertiesappropriately.
Createthetransitionfromthereceivesteptothestepwaitingforthedocument.Inthe
sampleabove,theProcessresultsoftheenrollstepwaitsforthedocument.Becausethe
EnrollinHRsystemstepalsotransitionstotheProcessresultsoftheenrollstep,
configurethestepsothatitdoesnotexecuteuntilboththetransitionfromtheactivityand
transitionfromthereceivestepoccurs.Todoso,settheAdvanced > Joins > Join Type
propertyoftheProcessresultsoftheenrolltoAND.

Getting Started with Business Process Management Version 7.1

50

5. Handle Interactions with Internal Systems

Set the Advanced > Joins > Join Type


property of this step to AND so that it
waits for both transitions before
executing.

To learn more abouthowtousereceivestepsandsetthepropertiesforstepsinabusiness


process,seethewebMethodsDesigneronlinehelp.

Correlating Incoming Documents with the Correct Process


Instance
Becauseyoucanhaveseveralinstancesofabusinessprocessrunningatthesametime,it
isimportantthattheincomingdocumentsbeprocessedbythecorrectinstanceofa
businessprocess.Forexample,youmighthavetwonewemployees,whichresultsintwo
instancesofthenewemployeesetupbusinessprocess.Oneinstanceisforanewemployee
namedAndrewZane;thesecondinstanceisforanewemployeenamedLeannaDaniels.
YouwantthedataforAndrewZanetobeprocessedonlybytheinstanceofthebusiness
processforAndrewZane,anddonotwantAndrewZanesdataerroneouslyprocessedby
theinstanceofthebusinessprocessforLeannaDaniels.
YouuseprocessinstanceIDsandcorrelationIDstoensureincomingdocumentsareusedby
thecorrectinstanceofabusinessprocess.
A process instance ID(alsocalledprocessIDandabbreviatedasPID) isaunique
identifiergeneratedbytheProcessEnginewhenitcreatesanewinstanceofa
businessprocess.TheProcessEnginerunsontheIntegrationServer,andmanages
runninginstancesofbusinessprocesses.TheProcessEnginestorestheprocess
instanceIDinthepipelineintheProcessData/ProcessInstanceIDvariable.

Getting Started with Business Process Management Version 7.1

51

5. Handle Interactions with Internal Systems

A correlation IDisanidentifierthatyoucreatetoidentifyaninstanceofthebusiness
process.YouusecorrelationIDsfordocumentsthataresenttothebusinessprocess
fromoutsidetheprocess.Alldocumentsthatwillbesentfromoutsidetheprocess
andthatwillbeassociatedwiththesameinstanceofabusinessprocessmustusethe
samecorrelationID.Additionally,eachcorrelationIDmustbeunique;twodifferent
instancesofthesamebusinessprocessshouldneverusethesamecorrelationID.
TocreatethecorrelationIDyoutypicallyuseinformationfromwithinthedocuments
thatarebeingsenttothebusinessprocess.BecausethecorrelationIDmustbethe
sameforalldocuments,theinformationyouuseforthecorrelationIDshouldbe
informationthatiscommontoalldocumentsforaspecificinstanceofthebusiness
process.
Foreachinstanceofabusinessprocess,thecorrelationIDmustbemappedtotheprocess
instanceID.TheProcessEngineusesthismappingtoperformacrossreferencelookupto
determinetheprocessinstanceIDthatisassociatedwithacorrelationID.Bydetermining
theprocessinstanceID,theProcessEnginecandeliverthedocumenttothecorrect
instanceofthebusinessprocess.
Tosetuptocorrelateanincomingdocumentwiththecorrectinstanceofaprocess,you
must:
DeterminethedatayouwanttouseforthecorrelationID.
CreateaservicetomapthecorrelationIDtotheprocessinstanceIDatruntime.
UpdatetheprocessmodeltoreferencetheservicethatmapsthecorrelationID.
CreatecorrelationservicestoextractthevalueforthecorrelationIDfromthe
incomingdocument.
Updatetheprocessmodeltoreferencethecorrelationserviceforthestepreceiving
theincomingdocument.

Determining the Data to Use for a Correlation ID


Atdesigntime,youmustsetupyourbusinessprocesssothatatruntimeitcan
dynamicallycreateacorrelationIDforaninstanceofabusinessprocess.Alldocuments
senttoasingleinstanceofabusinessprocessmustusethesamecorrelationID.Asaresult,
youmustselectdatathatwillbeavailableatruntimetocreatethecorrelationID.Thedata
youselectmustbeavailableforalldocumentsthatyouwillsendtothebusinessprocess.
Forexample,inthenewemployeesetupbusinessprocessifalldatapassedtothebusiness
processcontainsthenewemployeesfirstandlastname,youmightuseacombinationof
firstandlastnameforthecorrelationID.Ifyouhaveconcernsthatyoumighthavetwo
newemployeeswiththesamefirstandlastnamesstartingatthesametime,youmight
introduceauniqueIDforthenewemployee.Forexample,youmighthaveHRgeneratea
uniqueemployeenumberandrequirethisemployeenumbertobeinalldocumentssent
tothebusinessprocess.YoucanthenusetheemployeenumberforthecorrelationID.
To learn more aboutcorrelationIDs,seeinformationaboutcorrelationservicesinthe
webMethodsDesigneronlinehelp.

Getting Started with Business Process Management Version 7.1

52

5. Handle Interactions with Internal Systems

Mapping the Correlation ID to the Process Instance ID


FortheProcessEnginetodeterminetheprocessinstanceIDtowhichacorrelationID
corresponds,thebusinessprocessmustmapthecorrelationIDtotheprocessinstanceID.
TheProcessEnginestoresthismappingsothatitcancorrelateincomingdocumentstothe
correctrunninginstancesofprocesses.Themappingmustoccurbeforethebusiness
processexpectstoreceiveadocument.Theoneexceptiontothisruleiswhenthestarting
stepofthebusinessprocesswaitsforadocument.YoucannotestablishacorrelationID
beforethestartingstepofabusinessprocessbecausetheProcessEnginehasnotyet
createdanewinstancenorgeneratedaprocessinstanceID.Ifthebusinessprocess
containssubsequentreceivestepsthatwaitforpublisheddocuments,youmustidentifya
correlationID,andmapittotheprocessinstanceIDbeforethedocumentscanbe
received.
Note: YouonlyneedtomapthecorrelationIDtotheprocessinstanceIDasingletimefora
businessprocess.

Yo

TomapthecorrelationIDtotheprocessinstanceID,youcreateaservicethat:
IdentifythecorrelationID.
Invokethepub.prt.correlate:establishCorrelationservicetoestablishthemappingbetween
thecorrelationIDandtheprocessinstanceID.
ThefollowingfigureshowsasampleflowservicethatformsacorrelationIDandmapsit
totheprocessinstanceID.

Getting Started with Business Process Management Version 7.1

53

5. Handle Interactions with Internal Systems

In this sample, set the value of the


correlation ID using variable
substitution to pick up the values
of variables that are in the pipeline.
Add a Document Reference to
pub.prt:ProcessData to Pipeline
In. These values will be in the
pipeline at run time.

Map the process instance ID


from the pipeline to the inputs of
the establishCorrelation service.

Set the value of MappingType to


IS to indicate that you are
specifying a correlation ID and not a
Trading Networks conversation ID.

To learn more about:


Howtocreateservices,includinghowtousevariablesubstitutionwhensetting
serviceinputvalues,seethewebMethodsDeveloperUsersGuide.
Thepub.prt.correlate:establishCorrelationserviceandpub.prt:ProcessDataISdocumenttype,
seethewebMethodsIntegrationServerBuiltInServicesReference.

Updating the Process Model to Reference the Service


AfteryoucreatetheservicethatidentifiesandmapsthecorrelationID,updatetheprocess
modeltoreferencetheservicesothatthebusinessprocessinvokestheserviceatruntime.
Todoso,selecttheISservicestepinDesignerandbrowseforanavailableIntegration
ServerserviceintheServicefieldoftheImplementationtabinthePropertiesview.
Forthenewemployeesetupbusinessprocess,youcaninvokethisserviceimmediately
afteryoureceivetheinitialdataaboutthenewemployeesothatthecorrelationIDisset
fortheremainderofthebusinessprocess.Inthenewemployeesetupbusinessprocess,
youcanusetheGetHRreviewoutcomesteptoinvoketheservicethatformsandmaps
thecorrelationID,asshowninthefollowingdiagram:

Getting Started with Business Process Management Version 7.1

54

5. Handle Interactions with Internal Systems

Update the Advanced >


Implementation > Service
property to identify the service that
forms and maps the correlation ID.

To learn more abouthowtosetpropertiesforstepsinabusinessprocess,seethe


webMethodsDesigneronlinehelp.

Extracting the Correlation ID from an Incoming Document


AfterthebusinessprocesshasmappedthecorrelationIDtotheprocessinstanceID,the
businessprocessstillneedstotakemeasurestoextractthecorrelationIDfromincoming
documentssothattheProcessEnginehasthecorrelationIDfortheincomingdocument.
ToextractacorrelationIDfromanincomingdocument,useacorrelationservice.
How the Process Engine Processes the Incoming Document
Whenyoudefineyourprocessmodel,youuseareceivesteptoindicatetheprocessisto
waitforadocument.Whenyougeneratetheprocessmodel,atriggerisgeneratedonthe
IntegrationServerforthereceivestep.Thetriggerissetuptosubscribetothedocument.
WhentheIntegrationServerreceivesthedocumentatruntime,theProcessEngineknows
whichprocessmodelthedocumentisassociatedwith,basedonthetrigger.However,the
ProcessEnginestillneedstodeterminewhichrunninginstanceofthatprocessmodel
shouldreceivethedocument.
Todeterminetherunninginstanceoftheprocessmodelthatistoreceivethedocument,
theProcessEngineexecutesthecorrelationservicethatisassociatedwiththereceivestep.
Whenyoudefineyourprocessmodel,youmustassociateacorrelationservicewitheach
receivestepthatwaitsforadocumentthatisbeingpublishedfromoutsidetheprocess.At
runtimeforinputtothecorrelationservice,theProcessEnginepassesinformationabout
theprocessmodelandthedocumentthatitreceived.Thepurposeofthecorrelation
serviceistoextractthecorrelationIDfromtheincomingdocumentsothattheProcess
EnginecanuseittodeterminetheappropriateprocessinstanceID.
TheProcessEnginecanonlyusethecorrelationIDtodeterminetheprocessinstanceIDif
yourbusinessprocesspreviouslymappedthecorrelationIDtotheprocessinstanceIDas
describedinMappingtheCorrelationIDtotheProcessInstanceIDonpage53.After

Getting Started with Business Process Management Version 7.1

55

5. Handle Interactions with Internal Systems

determiningtheprocessinstanceID,theProcessEnginesendsthedocumenttothecorrect
runninginstanceofthebusinessprocess.
To learn more about:
Howtospecifyinputsforstepsinprocessmodelsandhowtogenerateprocess
models,seeinformationthewebMethodsDesigneronlinehelp.
Triggers,seethePublishSubscribeDevelopersGuide.
Creating the Correlation Service
Whenyoucreatethecorrelationservice,usethepub.prt:CorrelationServicespecificationto
definetheinputsandoutputsofyourcorrelationservice.WhentheProcessEngine
invokesthecorrelationservice,itpassesthecorrelationservicethedatadefinedbythe
inputvariablesofthepub.prt:CorrelationServicespecification.
OneoftheinputvariablesisDocument.Thisvariablecontainsthedocumentfromwhich
youwillextractthecorrelationID.Forexample,forthenewemployeesetupbusiness
process,whenHRreviewsthenewemployeerequest,itassignstheemployeeaunique
employeenumber.Thisemployeenumberwillbeincludedinalldocumentssenttothe
businessprocessandisusedasthecorrelationID.Thefollowingfigureshowsasample
flowservicethatextractsthecorrelationID.

Getting Started with Business Process Management Version 7.1

56

5. Handle Interactions with Internal Systems

In this sample, set the value of the


correlation ID using variable
substitution to pick up the value of the
Document/EmployeeNumber variable
that is in the pipeline.

To learn more about:


Correlationservices,seethewebMethodsDesigneronlinehelp.
Howtocreateservices,includinghowtouseapreexistingspecificationtodefine
theserviceinputsandoutputsandhowtousevariablesubstitution,seethe
webMethodsDeveloperUsersGuide.
Thepub.prt:CorrelationServicespecification,seethewebMethodsIntegrationServerBuilt
InServicesReference.

Updating the Process Model to Reference the Correlation Service


Afteryoucreatethecorrelationservice,updatetheprocessmodeltoreferencetheservice.
Youupdatethereceivestepthatwaitsfortheincomingdocument.Asaresult,whenthe
businessprocessexecutesatruntime,thecorrelationserviceexecutestoprovidethe
ProcessEnginewiththecorrelationIDoftheincomingdocument.

Getting Started with Business Process Management Version 7.1

57

5. Handle Interactions with Internal Systems

Toupdatetheprocessmodel,selectthereceivestepinDesignerandbrowsefor
correlationserviceintheCorrelationServicefieldoftheImplementationtabinthe
Propertiesview.
Update the Advanced > Implementation >
Correlation Service property of the receive
step that waits for the document.

To learn more about correlationservicesandhowtosetpropertiesforstepsinabusiness


process,seethewebMethodsDesigneronlinehelp.

Creating a Service to Process the Document from the


Internal System
Ifyouwant,thedocumentthattheinternalsystemsendscanbeprocessedafterthe
businessprocessreceivesthedocument.Todoso,youcreateaservicethatprocessesthe
document.Youconfigureanactivitysteptoexecutetheservice.Yousetupthetransitions
sothatatruntimeafterthedocumentarrives,thestepexecutescausingtheserviceto
executeandprocessthedocument.
Youcanaccessthecontentsofthereturneddocumentinthefollowingways:
Thecontentsofthereturneddocumentareinthepipelineinavariablewiththesame
nameastheISdocumenttype.Forexample,ifthestepwaitsforthedocumentthat
conformstothepublishableISdocumenttype
CustomCode.ISdoctypes:enrollHRsystemResponse,thecontentofthedocumentwillbeina
variablenamedenrollHRsystemResponse.ThedatawillbeformattedinanIDataobject
thatconformstotheISdocumenttype.
Whenyoubuildanduploadtheprocess,Designergeneratesawrapperserviceforthe
receivestep.Theinputofthewrapperserviceforthereceivestepisthereturned
document.Ifyouwant,youcanaddmappingstepstothewrapperservicetomapthe
datatoanother.

Getting Started with Business Process Management Version 7.1

58

5. Handle Interactions with Internal Systems

To learn more abouthowtocreateservices,seethewebMethodsDeveloperUsersGuide.

Updating the Process Model to Reference the Service


Afteryoucreatetheservice,updatetheprocessmodeltoreferencetheservice.Todoso,
selecttheISservicestepinDesignerandbrowseforanavailableIntegrationServer
serviceintheServicefieldoftheImplementationtabinthePropertiesview.

Update the Advanced >


Implementation > Service property
for this step to identify the service.

Tip! InDesigner,youcanalsoselecttheserviceintheISBrowserviewanddragitonthe
activitystep.Designerwillupdatethestepspropertiesappropriately.
To learn more abouthowtosetpropertiesforstepsinabusinessprocess,seethe
webMethodsDesigneronlinehelp.

Getting Started with Business Process Management Version 7.1

59

5. Handle Interactions with Internal Systems

Getting Started with Business Process Management Version 7.1

60

Chapter 6. Handle Interactions with Internal People

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Before You Can Use Steps that Involve People . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Creating the IS Document Types for Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Configuring the Task Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Getting Information To and From the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Getting Started with Business Process Management Version 7.1

61

6. Handle Interactions with Internal People

Overview
Thebusinessprocessinteractswithpeopleviatasks.Youaddtaskstepstoyourprocess
modeltoindicatewheninthebusinessprocessthatyouwanttointeractwithpeople.
Atruntime,thewebMethodsTaskEngineexecutestasks.Thedatasenttoorretrieved
fromapersonispassedbetweenthebusinessprocessandtheTaskEngineusing
documents.
ThefollowingdiagramshowsapartoftheprocessmodelfromChapter3,AddTechnical
DetailtotheProcessModelthatmodelsaninteractionwithpeople.
Model for interaction with a person

The input to the task step is the


document that the task expects.
To obtain the results of the task, set the input of
a step downstream from the task step to the
document that the task returns to the process.
The output of the task step is the document
that the task returns to the process.

Afteraddingatasksteptomodelinteractionwithpeople,performthefollowing
additionaldesigntimetasksthatarerequiredtoimplementtheinteractionwithpeople:
.

Design-time task

For more information, see...

Ensureyouhaveconfiguredtheconnection
betweentheTaskEngineandtheProcess
Engine.

BeforeYouCanUseStepsthat
InvolvePeopleonpage63.

CreatetheISdocumenttypesthatdefinethe
datathatthetaskexpectsasinputanddelivers
backtothebusinessprocessasoutput.

CreatingtheISDocumentTypes
forInputandOutputonpage63.

Completethepropertiesforthetaskstepin
yourprocessmodel.

ConfiguringtheTaskStepon
page64.

Setuptosendandreceiveinformationtoand
fromthebusinessprocess.

GettingInformationToandFrom
theBusinessProcessonpage67.

Getting Started with Business Process Management Version 7.1

62

6. Handle Interactions with Internal People

Before You Can Use Steps that Involve People


YoumustconfiguretheconnectionbetweentheTaskEngineandtheProcessEngineto
enabletheTaskEnginetoprovideresultsaboutcompletedtaskstotheProcessEngine.
TheTaskEnginerunsinMywebMethodsServer,andtheProcessEnginerunsinthe
IntegrationServer.Toconfiguretheconnectionbetweenthetwo:
ToconfiguretheTaskEnginetotheProcessEngine,fromMywebMethodsyou
identifytheIntegrationServeronwhichtheProcessEnginerunsontheMy
webMethodsAdministration>MywebMethods>SystemSettingspage.
ToconfiguretheProcessEnginetotheTaskEngine,fromIntegrationServer
Administrator,youconfiguretheMywebMethodsServerwheretheTaskEngineruns
onthehomepageoftheWmTaskClientpackage.
To learn more abouthowtoconfigurethisconnection,seeinformationaboutconfiguring
theTaskEngineinthewebMethodsTaskEngineUsersGuide.

Creating the IS Document Types for Input and Output


IntheDeveloper,defineISdocumenttypesthatdefinethestructureoftheinputsand
outputsthatthetaskwillexpect.Youcan:
Define a single IS document type for both the inputs and outputs.Ifthetaskonlymodifiesthe
contentoftheinputdocumentandthereforereturnsadocumentthatusesthesame
structureastheinputdocument,youdonotneedtocreatetwoseparateISdocument
types.Inthiscase,youonlyneedtodefineasingleISdocumenttypethatyouusefor
boththeinputandoutput.
Define separate IS document types, one for the input and another for the output.Ifthestructure
ofthedatathatthetaskreceivesasinputisdifferentfromwhatitreturnsasoutput,
youcandefineoneISdocumenttypefortheinputandaseparateISdocumenttype
fortheoutput.
WhenyoucreatetheISdocumenttypethatdefinestheinputs,definethedatathatyou
wanttopasstothetaskatruntime.Thebusinessprocesswillsendthedocumentthat
containstheinputdatatothetask,whichwill,inturn,startthetask.
Forexample,inthenewemployeesetupbusinessprocess,thereisatasksteptoassign
officespacetothenewemployee.Todeterminetheofficespaceneeds,theofficemanager
intheFacilitiesdepartmentthathandlesthisrequestwouldneedtoknowinformation
suchastheemployeesname,startdate,andwhethertheemployeeistohaveanofficeor
cubicle.YouwouldcreateanISdocumenttypethatdefinesfieldsforthisinformation.
Additionally,youmightincludeinformationinthedocumentthatthetasklogicrequires.
Forexample,youmightincludefieldsfordatausedtorouteatasktotheappropriate
OfficeManagerbasedonthestatewherethenewemployeewillwork.

Getting Started with Business Process Management Version 7.1

63

6. Handle Interactions with Internal People

WhenyoucreatetheISdocumenttypethatdefinestheoutputs,definethedatathatthe
taskwillreturntothebusinessprocess.Afterthetaskiscomplete,theoutputdocumentis
availableinthebusinessprocesspipeline.
Forexample,inthenewemployeesetupbusinessprocess,theOfficeManagermight
respondtotheofficespacerequestbyprovidinginformationsuchastheofficenumber
andphonenumber.YouwouldcreateanISdocumenttypethatdefinesfieldsforthis
information.

Guidelines for Creating the IS Document Types


WhenyoucreateanISdocumenttypeforinputtooroutputfromatask,keepinmindthe
followingguidelines:
DonotincludevariablesthatusethedatatypesStringTables.TaskEnginedoesnot
supportthisdatatype.
Donotincludedocumentsthatusetheexactsamename.Forexample:
OrderDoc
customerID
customerID

To learn more abouthowtocreateISdocumenttypes,seethewebMethodsDeveloperUsers


Guide.

Configuring the Task Step


Youconfigureatasksteptoindicatethetasktoexecute,theinputsthatthetaskexpects,
andtheoutputsthatthetaskreturns.Youcanuseataskthatalreadyexists,oryoucan
placeatasksteponthecanvasandimplementitfromwithintheprocessmodel.
To learn more abouthowtosetthepropertiesforataskstep,createnewtasksfromtask
steps,modifytasks,createuserinterfacesfortasks,andrulesassignment,seethe
webMethodsDesigneronlinehelp.

Using an Existing Task


Ifthetaskthatyouwanttheprocesstousealreadyexists,youcanconfiguretheproperties
forthetasksteptoidentifythattask.Todoso,yousetthetasksteppropertiesthatare
describedinthetablebelow.
Tip! IfyoudraganexistingtaskfromtheSolutionsviewtothedesigncanvas,Designer
createsanewtaskstepandsetsitspropertiesappropriately.Similarly,youcandragatask
fromtheSolutionsviewontoanexistingtasksteptohaveDesignerconfigurethe
propertiesforthattasksteptoinvoketheselectedtask.

Getting Started with Business Process Management Version 7.1

64

6. Handle Interactions with Internal People

Task Step Property

Description

Inputs/Outputs

Setthestepinputsandoutputs:
For the inputs,selecttheISdocumenttypethat
definestheinputforthetask.
For the outputs,selecttheISdocumenttypethat
definestheoutputforthetask.
Formoreinformation,seeGettingInformationToand
FromtheBusinessProcessonpage67.
Note:Forexistingtasks,thetaskdesignermayhave
alreadyincludedreferencestoinputandoutput
documenttypes.

Advanced>
Implementation>Type

EnsurethesteptypeissettoTask.

Advanced>
Implementation>Logical
Server

SetthelogicalservertoidentifytheIntegrationServer
thatisrunningtheProcessEngine,whichinturn,is
connectedtotheTaskEngineforthetask.Formore
informationabouttheconnectionbetweentheTask
EngineandtheProcessEngine,seeBeforeYouCan
UseStepsthatInvolvePeopleonpage63.

Advanced>
Implementation>Task
Information

Click
Browse for existing tasksandselectthetask
youwanttouse.Basedonthetaskyouselect,Designer
fillsintheTask NameandTask Type IDfields.
Note: WhenyouclicktheBrowse for existing tasks button,
Designeronlydisplaysthetasksthatareavailablein
yourcurrentworkspace.Ifthetaskyouwanttouseisin
adifferentworkspace,forexample,itisbeing
developedbyanotheruser,youcanidentifythattaskby
specifyingtheappropriatetasktypeID.Youcanview
tasktypeIDsfordeployedtasksontheMy
webMethodsAdministration>Processes>Tasks>Task
EngineAdministrationpage.

To learn more abouthowtosetthepropertiesforataskstep,seethewebMethods


Designeronlinehelp.

Getting Started with Business Process Management Version 7.1

65

6. Handle Interactions with Internal People

Implementing a New Task from a Task Step


Ifyoudonothaveanexistingtask,youcanaddatasksteptothecanvas,andthen
implementthetaskfromtheprocessmodel.
To learn more abouthowtosetthepropertiesforataskstep,createnewtasksfromtask
steps,modifytasks,createuserinterfacesfortasks,anddefiningtaskeventsand
assignments,seethewebMethodsDesigneronlinehelp.

Setting the Task Step Properties


Setthetasksteppropertiesthataredescribedinthetablebelow:
Task Step Property

Description

General>Label

Givethetaskstepauniquenameamongyourexisting
tasks.DesignerwillusetheLabelforthetaskname
whenyouimplementthetask.

Inputs/Outputs

Setthestepinputsandoutputs:
For the inputs,selecttheISdocumenttypethat
definestheinputforthetask.
For the outputs,selecttheISdocumenttypethat
definestheoutputforthetask.
Note: Whendesigningtheview(oruserinterface)forthe
taskinDesigner,theinputsandoutputsthatyousetfor
ataskstepwillbeavailableintheBindingsview.Asa
result,youcanusethedatawhendefiningthefieldsin
theviewyouwanttodisplayforauser.

Advanced>
Implementation>Type

EnsuretheAdvanced > Implementation > TypeissettoTask.

Advanced>
Implementation>Logical
Server

SetthelogicalservertoidentifytheIntegrationServer
thatisrunningtheProcessEngine,whichinturn,is
connectedtotheTaskEngineforthetask.Formore
informationabouttheconnectionbetweentheTask
EngineandtheProcessEngine,seeBeforeYouCan
UseStepsthatInvolvePeopleonpage63.

Implementing the Task


Afteryousetthetaskproperties,youcanimplementthetaskbyrightclickingthetask
stepandselecting Create Implementation > New Task.Afterthenewtaskiscreated,Designer

Getting Started with Business Process Management Version 7.1

66

6. Handle Interactions with Internal People

liststhetaskintheSolutionsviewunderaCompositeApplicationprojectthatitalso
creates;andinotherviewswheretasksappear.
Tocompletetheimplementationofthetask,fromDesigneryoumodifythetaskto
completetheuserinterface.Additionally,youmightwanttoassignrulestothetask.
To learn more abouthowtosetthepropertiesforataskstep,createnewtasksfromtask
steps,modifytasks,createuserinterfacesfortasks,anddefiningtaskeventsand
assignments,seethewebMethodsDesigneronlinehelp.

Getting Information To and From the Business Process


Youidentifytheinformationthatyouwantthebusinessprocesstopasstothetaskinthe
inputsdefinedintheInputs / Outputspropertiesofthetaskstep.Theinformationyoucan
useis:
Adocumentthatwaspublishedtothebusinessprocessandreceivedintothebusiness
processusingareceivestep
Adocumentthatwasreturnedasoutputfromastepupstreaminthebusinessprocess
Tomaketheoutputofthetaskavailabletothebusinessprocess,definetheoutputsinthe
Inputs / Outputspropertiesofthetaskstep.Becausethetaskstephasadefinedoutput,the
ProcessEnginewilladdtheoutputsintothebusinessprocesspipeline.Asaresult,the
outputisavailableforusebyanystepsdownstreamfromthetaskstep.
To learn more abouthowtosettheInputs / Outputspropertiesofataskstep,seethe
webMethodsDesigneronlinehelp.

Getting Started with Business Process Management Version 7.1

67

6. Handle Interactions with Internal People

Getting Started with Business Process Management Version 7.1

68

Chapter 7. Handle Interactions with External Partners

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Defining Information about External Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Sending Documents from the Business Process to External Partners . . . . . . . . . . . . . . . . . . . . 72
Getting Documents from External Partners to the Business Process . . . . . . . . . . . . . . . . . . . . . 76
Correlating Incoming Documents with the Correct Process Instance . . . . . . . . . . . . . . . . . . . . . 83

Getting Started with Business Process Management Version 7.1

69

7. Handle Interactions with External Partners

Overview
Tointeractwithanexternalpartner,thebusinessprocesssendsdata(intheformof
businessdocuments)toanexternalpartnerviawebMethodsTradingNetworks.Similarly,
datafromanexternalpartnerthatistogotothebusinessprocessgoesthroughTrading
Networks.YouneedtodefineinformationinTradingNetworkssothatitcanrecognize
andprocessthebusinessdocuments.
ThefollowingshowsthepartoftheprocessmodelfromChapter3,AddTechnicalDetail
totheProcessModelthatmodelstheinteractionwithanexternalpartner.
Model for interaction with external partner
The steps in the external pool labeled Payroll
Administrator are not required, but are useful
in the model to give a visual representation of
the processing.

The only steps that execute at run


time are the steps in the internal pool.
In this model, use this step to send
data to the external partner...

...and this step of receive data


from the external partner.

The business process proceeds to the


next step, and then waits for the return
document from the external partner.

Aftermodelingthetaskstointeractwithanexternalpartner,thefollowingareactionsyou
needtoperformduringdesigntimetocompletethesetuptointeractwithanexternal
partner:

Getting Started with Business Process Management Version 7.1

70

7. Handle Interactions with External Partners

Design-time task

For more information see...

DefineaTradingNetworksprofileforthe
externalpartnerifonedoesnotalreadyexist.

DefiningInformationabout
ExternalPartnersonpage71

Setuptosendabusinessdocumentfromthe
businessprocesstoTradingNetworks.

SendingDocumentsfromthe
BusinessProcesstoExternal
Partnersonpage72

SetuptohaveTradingNetworkssendabusiness
documenttoabusinessprocessandhavethe
businessprocessaccessthedocumentcontent.

GettingDocumentsfromExternal
PartnerstotheBusinessProcess
onpage76

IfabusinessdocumentfromTradingNetworks
doesnotstartthebusinessprocess,setupto
correlateincomingdocumentsfromTrading
Networkstothecorrectinstanceofabusiness
process.

CorrelatingIncomingDocuments
withtheCorrectProcessInstance
onpage83

Defining Information about External Partners


BeforeyoucanusewebMethodsTradingNetworkstosenddocumentstoorreceive
documentsfromexternalpartnerstoorfromexternalpartners,youmustdefinewhoyour
externalpartnersare.YoudothisbydefiningprofilesforyourpartnersinTrading
Networks.TradingNetworksrequiresaprofileforeachpartnerthatsendsdocumentsto
oristoreceivedocumentsfromTradingNetworks.Aprofileisacollectionofinformation
aboutacorporationthatisinyourtradingnetwork.
Ifyouhavenotalreadydoneso,defineaTradingNetworksprofilefortheexternal
partner.
To learn more about:
Profilesingeneral,seeinformationabouttradingpartnersinthewebMethods
TradingNetworksConceptsGuide.
HowtocreateprofilesinTradingNetworks,seethechapteronpartnerprofilesin
thewebMethodsTradingNetworksUsersGuide.

Getting Started with Business Process Management Version 7.1

71

7. Handle Interactions with External Partners

Sending Documents from the Business Process to External


Partners
Tosenddocumentsfromthebusinessprocesstoanexternalpartner,yousetupthe
businessprocesstosendabusinessdocumenttoTradingNetworks.TradingNetworks,in
turn,sendsthedocumenttotheexternalpartner.Tosetupthisprocessing,youneedto:
CreateaservicethatsendsthedocumenttoTradingNetworks.
Updatetheprocessmodeltoreferencetheservice.
DefineaTNdocumenttypeforthedocumentthebusinessprocessistosendto
TradingNetworks(e.g.,PayrollRequestdocument).
Defineaprocessingruletoprocessthedocumentfromthebusinessprocess(for
example,toprocessthePayrollRequestdocument).

Creating a Service to Send a Document to Trading Networks


Youuseaservice(flowservice,Javaservice)tosenddatafromthebusinessprocessto
TradingNetworks.Yourserviceshouldcreate(orform)thebusinessdocumentthatyou
wanttosendtoTradingNetworks.Thebusinessdocumentcanbeinanyformatthat
TradingNetworksaccepts,forexample,anXMLdocumentorflatfiledocument.After
formingthebusinessdocument,yourservicesendsthedocumenttoTradingNetworks.
HowyouformatandsendthedocumenttoTradingNetworksdiffersbasedonwhether
youarecreatinganXMLdocumentoraflatfiledocument.

Forming an XML Document to Send to Trading Networks


ToformandsendanXMLdocumenttoTradingNetworks,createaservicethat:
Formats the document as an XML node.Forexample,youmightuseaMAPflow
operationtomapdatafromthebusinessprocesspipelinetoformanIDataobjectthat
containstheinformationforthebusinessdocumentyouwanttosend.Youcanthen
converttheIDataobjecttoanXMLnode.
Sends the document to Trading Networks.Usethewm.tn.doc.xml:routeXMLservicetosendthe
documenttoTradingNetworks.
ThefollowingfigureshowssampleflowservicelogicforforminganXMLdocumentand
sendingittoTradingNetworks.
Convert to IData object to an
XML node by first converting it
to an XML string, then
converting the string to an XML

Getting Started with Business Process Management Version 7.1

72

7. Handle Interactions with External Partners

To learn more about:


Howtocreateservices,seethewebMethodsDeveloperUsersGuide.
Thepub.xml:documentToXMLStringandpub.xml:xmlStringToXMLNodeservices,seethe
webMethodsIntegrationServerBuiltInServicesReference.
Thewm.tn.doc.xml:routeXMLservice,seethewebMethodsTradingNetworksBuiltIn
ServicesReference.
UsingXMLdocumentswithTradingNetworks,seethechapteraboutTNXML
documenttypesinthewebMethodsTradingNetworksUsersGuide.

Forming a Flat File Document to Send to Trading Networks


ToformandsendaflatfiledocumenttoTradingNetworks,createaservicethat:
Formats the document as an InputStream. Forexample,youmightuseaMAPflow
operationtomapdatafromthebusinessprocesspipelinetoformanIDataobjectthat
containstheinformationforthebusinessdocumentyouwanttosend.Youcanthen
converttheIDataobjecttoanInputStream.
Youcancreateaflatfileschematohelpyouconvertthedocument.Aflatfileschema
definesthestructureoftheflatfiledocument.Yourservicecanusetheflatfileschema
whenformattingtheflatfiledocumentasanInputStream.
Sends the document to Trading Networks. SendaflatfiledocumentasanInputStreamto
TradingNetworksviaadocumentgatewayservicethatyoucreate.TradingNetworks
usesadocumentgatewayservice(orgatewayservice)torecognizethetypeofflatfile
document.ThedocumentgatewayservicethensendsthedocumenttoTrading
Networks.TosubmittheflatfiledocumenttoTradingNetworks,yourgateway
servicesshouldinvokethewm.tn.doc.ff:routeFlatFileservice.
Thefollowingfigureshowssampleflowservicelogicforformingaflatfiledocumentand
sendingittoTradingNetworks.
Convert the IData object to an
InputStream by first converting
it to a String, then bytes, then
finally an InputStream.
The pub.flatFile.convertToString
service requires a flat file schema
that defines the structure of the flat
file document you are forming.

Getting Started with Business Process Management Version 7.1

73

7. Handle Interactions with External Partners

To learn more about:


Howtocreateservices,seethewebMethodsDeveloperUsersGuide.
Howtocreateflatfileschemasandthepub.flatFile:convertToStringservice,seetheFlat
FileSchemaDevelopersGuide.
Thepub.string:stringToBytesandpub.io:bytesToStreamservices,seethewebMethods
IntegrationServerBuiltInServicesReference.
HowtocreateagatewayserviceandhowtouseflatfiledocumentswithTrading
Networks,seethechapteraboutTNflatfiledocumenttypesinthewebMethods
TradingNetworksUsersGuide.
Thewm.tn.doc.ff:routeFlatFileservice,seethewebMethodsTradingNetworksBuiltIn
ServicesReference.

Updating the Process Model to Reference the Service


AfteryoucreatetheservicethatformsthebusinessdocumentandsendsittoTrading
Networks,updatetheprocessmodeltoreferencetheservicesothatthebusinessprocess
invokestheserviceatruntime.
Todoso,selectthestepthatsendsthebusinessdocumentandbrowseforanavailable
IntegrationServerserviceintheServicefieldoftheImplementationtabintheProperties
view.

Getting Started with Business Process Management Version 7.1

74

7. Handle Interactions with External Partners

Use the Advanced > Implementation >


Service property for this step to identify the
service that forms the business document
and sends it to Trading Networks.

Tip! InDesigner,youcanalsoselecttheserviceintheISBrowserviewanddragitonthe
activitystep.Designerwillupdatethestepspropertiesappropriately.
To learn more abouthowtosetpropertiesforstepsinabusinessprocess,seethe
webMethodsDesigneronlinehelp.

Defining a TN Document Type for the Document from the


Process
WhenTradingNetworksreceivesabusinessdocument,itfirstattemptstorecognizethe
typeofdocument.Todoso,itmatchestheincomingbusinessdocumenttoitsTN
documenttypes.YoumustdefineaTNdocumenttypeforthebusinessdocumentthatthe
businessprocessistosendtoTradingNetworks.
To learn more abouthowtocreateTNdocumenttypes,seethechaptersaboutTNXML
documenttypesandTNflatfiledocumenttypesinthewebMethodsTradingNetworks
UsersGuide.

Getting Started with Business Process Management Version 7.1

75

7. Handle Interactions with External Partners

Defining a Processing Rule for the Document from the


Process
AfterTradingNetworksrecognizesthetypeofdocumentusingitsTNdocumenttype,it
selectsaprocessingruletousetoprocessthedocument.Youmustcreateaprocessingrule
tousetodeliverthebusinessdocumenttoyourexternalpartner.
Forexample,ifyounamedtheTNdocumenttypethatisusedforthedocumentfromthe
businessprocessPayrollRequest,youmightsetuptheprocessingruletousethe
Document TypecriteriatoselectdocumentswhenthenameoftheTNdocumenttypeis
PayrollRequest.Then,todeliverthedocument,youmightusetheDeliver Document By
processingactiontodeliverthedocumentusingthePrimaryHTTPdeliverymethod.
To learn more abouthowtocreateprocessingrules,seethechapteraboutprocessingrules
inthewebMethodsTradingNetworksUsersGuide.

Getting Documents from External Partners to the Business


Process
Togetdocumentsfromanexternalpartnertothebusinessprocess,yousetupTrading
Networkstoreceiveabusinessdocumentfromtheexternalpartner.TradingNetworks,in
turns,sendsthebusinessdocumenttothebusinessprocess.Tosetupthisprocessing,you
needto:
DefineaTNdocumenttypeforthedocumentthattheexternalpartnerwillsendto
thebusinessprocessthroughTradingNetworks(forexample.,thePayrollACK
document).
UpdatetheprocessmodeltoreceiveadocumentthatconformstotheTNdocument
type.
Optionally,defineaprocessingruletoprocessthedocumentfromtheexternal
partner(forexample.,toprocessthePayrollACKdocument).
Optionally,createaservicethatthebusinessprocessinvokestoprocessthedocument
fromtheexternalpartner.
Important! Ifthestepthatstartsthebusinessprocessdoesnotreceiveadocumentfrom
TradingNetworks,youmustensurethatincomingdocumentsfromTradingNetworks
aresenttothecorrectinstanceofthebusinessprocess.Forinformation,seeCorrelating
IncomingDocumentswiththeCorrectProcessInstanceonpage83.

Getting Started with Business Process Management Version 7.1

76

7. Handle Interactions with External Partners

Defining a TN Document Type for the Document from the


External Partner
Asstatedbefore,whenTradingNetworksreceivesabusinessdocument,itfirstattempts
torecognizethetypeofdocumentbymatchingtheincomingbusinessdocumenttoitsTN
documenttypes.YoumustdefineaTNdocumenttypeforabusinessdocumentthatan
externalpartneristosendtoTradingNetworks.
Becauseyouwantthisbusinessdocumenttobesenttothebusinessprocess,youmust
definetheTNdocumenttypetoextracttheConversationIDsystemattributefromthe
document.ThevalueoftheConversationIDattributeisavaluewithinadocumentthatis
commontoalldocumentsthatareinthesameinstanceofabusinessprocess.Inother
words,besuretodefinetheTNdocumenttypeinsuchawaythatthevalueextractedfor
theConversationIDattributeisthesameforalldocumentsthatpassfromTrading
Networkstothebusinessprocessforthespecificinstanceofthebusinessprocess.
Inadditiontoidentifyingtheinstanceofthebusinessprocesstowhichthebusiness
documentbelongs,theConversationIDattributeisalsothetriggerthattellsTrading
NetworkstopassadocumenttotheProcessEngineafteritperformsitsownprocessing.
TheProcessEngineispartoftheIntegrationServer,anditistheruntimeenginethat
managesrunninginstancesofbusinessprocesses.
If a ConversationID is extracted,afterTradingNetworkscompletesitsownprocessing
definedbyaprocessingrule,TradingNetworkspassesthedocumenttotheProcess
Engine,whichdetermineswhetherabusinessprocessiswaitingforthedocument.
If a ConversationID is not extracted,afterTradingNetworkscompletesitsownprocessing
definedbyaprocessingrule,processingends.TradingNetworksdoesnotpassthe
documenttotheProcessEngine.
To learn more about:
HowtocreateTNdocumenttypes,seethechaptersaboutTNXMLdocument
typesandTNflatfiledocumenttypesinthewebMethodsTradingNetworksUsers
Guide.
Systemattributes,includingtheConversationIDsystemattribute,seethechapter
aboutdocumentattributesinthewebMethodsTradingNetworksUsersGuide.

Updating the Process Model to Receive the TN Document


AfteryoudefinetheTNdocumenttype,addareceivesteptotheprocessmodelwherethe
documentistoentertheprocess.UsethereceivestepsAdvanced > Implementation > Receive
DocumentpropertytoidentifythefullyqualifiednameoftheTNdocumenttype.
Forexample,inthenewemployeesetupprocessmodel,ifyounametheTNdocument
typefortheacknowledgmentfromthePayrollAdministratorasPayrollACK,you

Getting Started with Business Process Management Version 7.1

77

7. Handle Interactions with External Partners

wouldsettheAdvanced > Implementation > SubscriptionpropertytothePayrollACKTN


documenttype.

Update the Advanced > Implementation >


Receive Document property of the receive
step to identify the TN document type of the
document being sent via Trading Networks.

Tip! InDesigner,youcanselectaTNdocumenttypeintheISBrowserviewanddragitto
thedesigncanvas;aproperlyconfiguredreceivestepisautomaticallycreated.Ifyouhave
alreadymodeledthereceivestep,youcanselecttheTNdocumenttypeintheISBrowser
viewanddragitonthereceivestep.TheTNdocumenttypesarelistedintheISBrowser
viewlastunderTradingNetworksDocuments.
Createthetransitionfromthereceivesteptothestepwaitingforthedocument.Inthe
sampleabove,theProcesspayrollACKstepwaitsforthedocument.Becausethe
MakepayrollrequeststepalsotransitionstotheProcesspayrollACKstep,configure
thestepsothatitdoesnotexecuteuntilboththetransitionfromtheactivityandtransition
fromthereceivestepoccurs.Todoso,settheAdvanced > Joins > Join Typepropertyofthe
ProcesspayrollACKtoAND.

Getting Started with Business Process Management Version 7.1

78

7. Handle Interactions with External Partners

Set the Advanced > Joins > Join Type


property of this step to AND so that it
waits for both transitions before
executing.

Important! Ifthestepthatstartsthebusinessprocessdoesnotreceiveadocumentfrom
TradingNetworks,youmusttakestepstoensurethatincomingdocumentsfromTrading
Networksaresenttothecorrectinstanceofthebusinessprocess.Forinformation,see
CorrelatingIncomingDocumentswiththeCorrectProcessInstanceonpage83.
To learn more abouthowtousereceivestepsandsetthepropertiesforstepsinabusiness
process,seethewebMethodsDesigneronlinehelp.

Getting Started with Business Process Management Version 7.1

79

7. Handle Interactions with External Partners

Defining a Processing Rule for Document from the External


Partner
Ifyouwant,youcandefineaprocessingruleinTradingNetworkstotakeactionsonthe
documentfromtheexternalpartnerbeforeTradingNetworkspassesthedocumenttothe
businessprocess.Ifyoudonotdefineaprocessingrule,TradingNetworksusesitsdefault
processingrule(Default Rule),whichperformsnoprocessingactionsagainstthedocument.
AsstatedaboveinDefiningaTNDocumentTypefortheDocumentfromtheExternal
Partneronpage77,becausetheTNdocumenttypeissetuptoextractthe
ConversationID,afterTradingNetworksperformsitsprocessingitpassesthedocument
tothebusinessprocess.
To learn more abouthowtocreateprocessingrules,seethechapteraboutprocessingrules
inthewebMethodsTradingNetworksUsersGuide.

Creating a Service to Process the Document from the


External Partner
Ifyouwant,youcanhavethedocumentthattheexternalpartnersendsprocessedafterthe
businessprocessreceivesthedocument.Todoso,youcreateaserviceandreferenceitin
theprocessmodelstepthatwaitsforthebusinessdocument.Atruntimeafterthe
businessdocumentarrives,thestepexecutescausingtheservicetoexecutetoprocessthe
document.
TheProcessEnginedoesnotpassthedocumentcontentinthebusinessprocesspipeline.
Instead,itpassestheinternalIDthatTradingNetworksgeneratedforthedocument.The
internalIDisinapipelinevariablethathasthesamenameastheTNdocumenttypefor
thebusinessdocument.Forexample,iftheTNdocumenttypeforbusinessdocumentis
namedPayrollACK,theinternalIDisinthePayrollACKvariableinthepipeline.The
serviceyoucreatecanusetheinternalIDtorequestthedocumentcontentfromTrading
Networks.Aftertheserviceobtainsthedocumentcontent,theservicecanconvertthe
contenttoanIDataobject.
ThelogictousetoobtainthedocumentcontentandconvertittoanIDataobjectdiffers
basedonwhetherthefilereceivedfromtheexternalpartnerisinXMLorflatfileformat.

Obtaining XML Document Content and Converting It to an IData Object


Thefollowingdescribesthelogicaserviceshouldcontaintoretrievethecontentofan
XMLdocumentandconvertthecontenttoanIDataobject:
To retrieve the document content,invokethewm.tn.doc:viewservice.Thewm.tn.doc:view
servicetakesasinputtheinternalIDforthedocumentyouwanttoretrieve.The
wm.tn.doc:viewservicereturnstheBizDocEnvelopeforthedocumentinthebizdoc
pipelinevariable.ABizDocEnvelopeisaTradingNetworksrepresentationofa
transactionthatithasprocessed.TheBizDocEnvelopecontainsthedocumentcontent

Getting Started with Business Process Management Version 7.1

80

7. Handle Interactions with External Partners

alongwithinformationthatTradingNetworksrequirestomanageandprocessthe
document.Thedocumentcontentisinthebizdoc/Contentpipelinevariable.
To convert the document content to an IData object,invokethewm.tn.doc.xml:bizdocToRecord
service.Thewm.tn.doc.xml:bizdocToRecordservicetakestheBizDocEnvelope(inthebizdoc
pipelinevariable)asinput.Aftertheserviceexecutes,theIDataobjectwillbeinthe
boundNodeoutputvariable.
Thefollowingfigureshowssampleflowservicelogictoobtainthedocumentcontentof
anXMLdocumentandconvertittoanIDataobject.
(

Map the internal ID of the TN


document to the internalID
input variable.

Set the getContent


variable to true.

To learn more about:


Howtocreateservices,seethewebMethodsDeveloperUsersGuide.
Thewm.tn.doc:viewandwm.tn.doc.xml:bizdocToRecordservices,seethewebMethods
TradingNetworksBuiltInServicesReference.

Obtaining Flat File Document Content and Converting it to an IData Object


Thefollowingdescribesthelogicaserviceshouldcontaintoretrievethecontentofaflat
filedocumentandconvertthecontenttoanIDataobject:
To retrieve the document content,firstretrievetheBizDocEnvelopeforthedocument;
thenretrievethecontentfromtheBizDocEnvelope.
ToretrievetheBizDocEnvelopeinvokethewm.tn.doc:viewservice,whichtakesas
inputtheinternalIDforthedocumentyouwanttoretrieve.Thewm.tn.doc:view
servicereturnstheBizDocEnvelopeforthedocumentinthebizdocpipeline
variable.FormoreinformationaboutinvokingthisserviceseeObtainingXML
DocumentContentandConvertingIttoanIDataObjectabove.

Getting Started with Business Process Management Version 7.1

81

7. Handle Interactions with External Partners

ToretrievethedocumentcontentfromtheBizDocEnvelopeaseitherabytearray
oranInputStream,invokethewm.tn.doc:getContentPartDataservice.Thisservice
requiresthatyouspecifythenameofthecontentpartthatyouwant.Ifyouhave
notnamedyourcontentpartsandyourdocumentonlycontainsasinglecontent
part,specifyffdata.
To convert the document content to an IData object,invokethepub.flatFiile:convertToValues
service.Thepub.flatFiile:convertToValuesservicetakesasinputthedocumentcontentand
aflatfileschema.Youmustcreateaflatfileschemathatdefinesthestructureofthe
flatfile.Aftertheserviceexecutes,theIDataobjectwillbeintheffValuesoutput
variable.
Thefollowingfigureshowssampleflowservicelogictoobtainthedocumentcontentofa
flatfiledocumentandconvertittoanIDataobject.

To learn more about:


Howtocreateservices,seethewebMethodsDeveloperUsersGuide.
Thewm.tn.doc:viewandwm.tn.doc.getContentPartDataservices,seethewebMethods
TradingNetworksBuiltInServicesReference.
Howtocreateflatfileschemasandthepub.flatFile:convertToValuesservice,seetheFlat
FileSchemaDevelopersGuide.

Updating the Process Model to Reference the Service


Afteryoucreatetheservice,updatetheprocessmodeltoreferencetheservice.Todoso,
selectthestepthatwaitsforthedocumentandbrowseforanavailableIntegrationServer
serviceintheServicefieldoftheImplementationtabinthePropertiesview.

Getting Started with Business Process Management Version 7.1

82

7. Handle Interactions with External Partners

Update the Advanced >


Implementation > Service
property for this step to identify
the service.

To learn more abouthowtosetpropertiesforstepsinabusinessprocess,seethe


webMethodsDesigneronlinehelp.

Correlating Incoming Documents with the Correct Process


Instance
Becauseyoucanhaveseveralinstancesofabusinessprocessrunningatthesametime,it
isimportantthattheincomingdocumentsbeprocessedbythecorrectinstanceofa
businessprocess.Forexample,youmighthavetwonewemployees,whichresultsintwo
instancesofthenewemployeesetupbusinessprocess.Oneinstanceisforanewemployee
namedAndrewZane;thesecondinstanceisforanewemployeenamedLeannaDaniels.
YouwantthedataforAndrewZanetobeprocessedonlybytheinstanceofthebusiness
processforAndrewZane,anddonotwantAndrewZanesdataerroneouslyprocessedby
theinstanceofthebusinessprocessforLeannaDaniels.

Getting Started with Business Process Management Version 7.1

83

7. Handle Interactions with External Partners

How the Incoming Documents are Sent to the Correct


Process Instances
YouuseprocessinstanceIDsandconversationIDstoensurethatincomingdocumentsfrom
TradingNetworksareusedbythecorrectinstanceofabusinessprocess.
A process instance ID(alsocalledprocessIDandabbreviatedasPID) isaunique
identifierthattheProcessEnginegenerateswhenitcreatesanewinstanceofa
businessprocess.TheProcessEngineispartoftheIntegrationServer,anditisthe
runtimeenginethatmanagesrunninginstancesofbusinessprocesses.TheProcess
EnginestorestheprocessinstanceIDinthepipelineinthe
ProcessData/ProcessInstanceIDvariable.
A conversation IDisauniqueidentifierthatyouhaveTradingNetworksextractfroma
businessdocumentthatissentfromanexternalpartner.Youdeterminethedata
withinabusinessdocumentthatTradingNetworksistoextractwhenyoudefinethe
TNdocumenttypeforthebusinessdocument.Allbusinessdocumentsassociated
withthesameinstanceofabusinessprocessmustusethesameconversationID.
Additionally,eachconversationIDmustbegloballyunique.Thatis,twodifferent
instancesofthesamebusinessprocessshouldneverusethesameconversationID.
Foreachinstanceofabusinessprocess,theconversationIDfortheinstancemustbe
mappedtotheprocessinstanceID.Asaresult,whenTradingNetworkssendsa
documenttoabusinessprocess,theProcessEngineusestheconversationIDtodoacross
referencelookuptodeterminethecorrespondingprocessinstanceID.Bydeterminingthe
processinstanceID,theProcessEnginecandeliverthedocumenttothecorrectinstanceof
thebusinessprocess.
DependingonwhenabusinessprocessreceivesadocumentfromTradingNetworks,you
mightneedtomaptheconversationIDtotheprocessinstanceID.
When the step that starts a business process waits for a business document from Trading
Networks,youdonotneedtotakeanyactiontomaptheconversationID.TheProcess
EngineautomaticallymapstheconversationIDtotheprocessinstanceIDthatit
generates.
When the first use of a business document from Trading Networks is in a later step of the
business process,youneedtomaptheconversationIDtotheprocessinstanceID.

Mapping the Conversation ID to the Process Instance ID


IfthefirstuseofabusinessdocumentfromTradingNetworksinabusinessprocessisnot
thefirststepoftheprocess,youneedtoprepareforitsreceiptbymappingthe
conversationIDtotheprocessinstanceID.Thebusinessprocessneedstodothismapping
beforeitexpectstoreceiveanybusinessdocumentfromTradingNetworks.

Getting Started with Business Process Management Version 7.1

84

7. Handle Interactions with External Partners

Note: YouonlyneedtomaptheconversationIDtotheprocessinstanceIDasingletimefor
abusinessprocess.

Yo

Forexample,inthenewemployeesetupbusinessprocess,thefirsttimethebusiness
processexpectsabusinessdocumentfromTradingNetworksiswhenitreceivesthe
payrollacknowledgmentfromthePayrollAdministrator.Inthisbusinessprocess,you
wouldneedtomaptheconversationIDtotheprocessinstanceIDbeforethebusiness
processexpectsthepayrollacknowledgmenttoarrive.

Map the conversation ID to the process


instance ID before this step that waits
for a business document is executed.

TomaptheconversationIDtotheprocessinstanceID,youcreateaservice.Theservice
thatyoucreateshouldinvokethepub.prt.correlate:establishCorrelationservicetoestablishthe
mappingbetweentheconversationIDandtheprocessinstanceID.
Youcaninvoketheservicethatperformsthemappingeitherfromastepinthebusiness
processorfromaTradingNetworksprocessingrulethatusestheExecute a Service
processingaction.

Invoking the Service from a Step in the Business Process


Whenyoucreateaservicethatyouwanttoinvokefromastepinthebusinessprocess,use
informationinthebusinessprocesspipelinetoformtheconversationID;theninvokethe

Getting Started with Business Process Management Version 7.1

85

7. Handle Interactions with External Partners

pub.prt.correlate:establishCorrelationservicetoestablishthemappingbetweentheconversation
IDandtheprocessinstanceID.
ThefollowingfigureshowsasampleflowservicethatformsaconversationIDandmaps
ittotheprocessinstanceID.

Add a Document Reference to


pub.prt.ProcessData to
Pipeline In. These values will
be in the pipeline at run time.

Map the process instance ID


from the pipeline to the inputs
of the establishCorrelation
service.

In this sample, set the value


of the conversation ID using
variable substitution to pick
up the values of variables
that are in the pipeline.

Set the value of the MappingType


to TN to indicate you are
specifying a Trading Networks

To learn more about:


Howtocreateservices,includinghowtousevariablesubstitutionwhensetting
serviceinputvalues,seethewebMethodsDeveloperUsersGuide.
Thepub.prt.correlate:establishCorrelationserviceandpub.prt:ProcessDataISdocumenttype,
seethewebMethodsIntegrationServerBuiltInServicesReference.
Updating the Process Model to Reference the Service
AfteryoucreatetheservicethatformsandmapstheconversationID,updatetheprocess
modeltoreferencetheservicesothatthebusinessprocessexecutestheserviceatruntime.
Toupdatetheprocessmodel,youupdatetheAdvanced > Implementation > Service property
ofastepintheprocessmodel.Useastepthatisexecutedbeforeyouexpecttoreceivea
businessdocumentfromTradingNetworks.
Forthenewemployeesetupbusinessprocess,youcanaddthelogictomapthe
conversationIDtotheprocessinstanceIDtothesameservicethatsendsthepayroll
requesttoTradingNetworks.

Getting Started with Business Process Management Version 7.1

86

7. Handle Interactions with External Partners

This step invokes a service to send the


payroll request to Trading Networks.
Update the logic of the service so it
also invokes the establishCorrelation
service to map the conversation ID to
the process instance ID.

To learn more abouthowtosetpropertiesforstepsinabusinessprocess,seethe


webMethodsDesigneronlinehelp.

Invoking the Service from a Trading Networks Processing Rule


AsanalternativetomappingtheconversationIDtotheprocessinstanceIDusinga
serviceinvokedbythebusinessprocess,insteadyoumightbeabletomapthe
conversationIDusingaTradingNetworksprocessingrule.Ifyourbusinessprocesssends
abusinessdocumenttoTradingNetworksandexpectsareplybusinessdocument,you
canusetheprocessingruleforthebusinessdocumentsenttoTradingNetworkstomap
theconversationID.
Forexample,inthenewemployeesetupbusinessprocess,thebusinessprocesssendsa
payrollrequesttoTradingNetworksandexpectsapayrollacknowledgment.Youcould
definetheprocessingruleforthepayrollrequesttomaptheconversationIDtothe
processinstanceID.
Tosetupthisprocessing,youneedto:
EnsuretheTNdocumenttypeforthebusinessdocumentthatthebusinessprocess
sendstoTradingNetworks(forexample.,thepayrollrequest)extractsthe
conversationID.
DefinetheprocessingruleforthebusinessdocumenttousetheExecute a Service
processingactiontoinvokeaservicethatperformsthemapping.

Getting Started with Business Process Management Version 7.1

87

7. Handle Interactions with External Partners

BecausetheTNdocumenttypeextractstheconversationID,itwillbeavailableinthe
pipelinefortheserviceexecutedbytheExecute a Serviceprocessingaction.Inaddition,
becausethebusinessdocumentissentfromabusinessprocess,thepipelinealsocontains
informationabouttherunninginstanceofthebusinessprocess,includingtheprocess
instanceID.
Thefollowingfigureshowsasampleflowservicethatcouldbeexecutedbyaprocessing
ruletomaptheconversationIDtotheprocessinstanceID.

Add a Document Reference to


wm.tn.ref:BizDocEnvelope and
pub.prtProcessData to
Pipeline In. These values will
be in the pipeline at run time.

Map the conversation ID from


the pipeline to the inputs of the
establishCorrelation service.

Set the value of MappingType to


TN to indicate you are specifying a
Trading Networks conversation ID.

Map the process instance ID


from the pipeline to the inputs of
the establishCorrelation service.

Note: WhenyouextracttheconversationIDfromabusinessdocument,TradingNetworks
sendsthebusinessdocumenttotheProcessEngineafteritcompletesitsprocessing.Ifno
businessprocesswaitsforthebusinessdocument,theProcessEnginewillbeunableto
findabusinessprocessthatwaitsforthisdocument.Asaresult,theProcessEngine
performsnoprocessingforthebusinessdocument
Forexample,iftheconversationIDisextractedfromthepayrollrequest,Trading
NetworkssendsthepayrollrequestbacktotheProcessEngine.Becausenobusiness

Getting Started with Business Process Management Version 7.1

88

7. Handle Interactions with External Partners

processwaitsforthepayrollrequest,theProcessEnginewillnotusethepayrollrequest
document.
To learn more about:
Howtocreateservices,includinghowtousevariablesubstitutionwhensetting
serviceinputvalues,seethewebMethodsDeveloperUsersGuide.
HowtocreateTNdocumenttypes,seethechaptersaboutTNXMLdocument
typesandTNflatfiledocumenttypesinthewebMethodsTradingNetworksUsers
Guide.
Systemattributes,includingtheConversationIDsystemattribute,seethechapter
aboutdocumentattributesinthewebMethodsTradingNetworksUsersGuide.
Howtodefineprocessingrules,seethechapteraboutprocessingrulesinthe
webMethodsTradingNetworksUsersGuide.
Thepub.prt.correlate:establishCorrelationserviceandpub.prt:ProcessDataISdocumenttype,
seethewebMethodsIntegrationServerBuiltInServicesReference.
Thewm.tn.rec:BizDocEnvelopeISdocumenttype,seethewebMethodsTradingNetworks
BuiltInServicesReference.

Getting Started with Business Process Management Version 7.1

89

7. Handle Interactions with External Partners

Getting Started with Business Process Management Version 7.1

90

Chapter 8. Perform Error and Exception Handling

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Transitioning Based on Process Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Transitioning when a Service Throws an Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Transitioning When There is an Unexpected Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Implementing an Exception or Error Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

Getting Started with Business Process Management Version 7.1

91

8. Perform Error and Exception Handling

Overview
Youshoulddefineerrorandexceptionhandlingforyourbusinessprocesstohandleboth
expectedandunexpectedexceptionsanderrors.Forexample,inthenewemployeesetup
businessprocessanexpectedexceptionwouldbewhenHRdoesnotapprovethenew
employee,andanunexpectederrormightbeiftheservicethatenrollsthenewemployee
intotheHRinternalsystemrunsoutofmemoryandthrowsanexception.
Tohandleerrorsandexceptions,yousetupthebusinessprocesstotransitiontoanother
stepwhenanerrororexceptionoccurs.Thensetupthatsteptohandletheerrorinany
wayyouchoose.Forexample,youmightsetupthesteptoinvokeaservicethatsendsan
emailmessagetoinformanadministratoroftheexceptionorerror.
ThischapterdescribesthreeofthemethodsprovidedwithDesignertotransitiontoastep
intheeventofanexceptionorerror:
TransitioningBasedonProcessDataonpage92.
TransitioningwhenaServiceThrowsanExceptiononpage93.
TransitioningWhenThereisanUnexpectedErroronpage94.
Note: Inadditiontothemethodslistedabove,youcanalsosetup:
Atimeoutvaluetotransitionafteracertaintimeelapsesandaconditionisnotmet.
Aniterationsexceededtotransitionafterastepisexecutedunsuccessfullyaftera
certainnumberofattempts.
Formoreinformationaboutthesemethods,seeinformationaboutsteptransitionsinthe
webMethodsDesigneronlinehelp.

Transitioning Based on Process Data


Youmightwanttoperformalternateprocessingbasedontheoutcomeofastepinthe
businessprocess.Iftheoutcomeofthestepisreturnedtotheprocessinthestepsoutputs,
youcandefinetransitionsthatexecutedifferentstepsbasedonthatvalue.
Forexample,inthenewemployeesetupprocessmodel,HReitherapprovesorrejectsthe
newemployee.ThedecisionthatHRmakesissavedintheHRapprovalvariableinthe
pipeline.IfHRapproves,theHRapprovalvariableissettoapproved;ifHRrejects,the
HRapprovalvariableissettorejected.Asaresult,youcanusethevalueofthe
HRapprovalvariabletoconditionallytransitiontoonesteporanother.
Tosetuptoconditionallybranchtoanexception/errorstepbasedonavalueinthe
pipeline,addasteptoyourprocessmodeltohandletheexceptionorerror,andcreatea
transitiontotheexception/errorstep.Whenyoucreatethetransition,leavethetransition
typeasIf Condition.

Getting Started with Business Process Management Version 7.1

92

8. Perform Error and Exception Handling

Afteryoucreatethetransition,youcaneditthetransitionconditionstodefinewhento
takethetransitionbasedonpipelinevalues.Whenyoueditthetransition,youselectthe
appropriatepipelinevariablethatyouwanttouseandspecifyanoperatorand
comparisonvaluetouseforthecondition.
Forexample,asstatedaboveforthenewemployeesetupbusinessprocess,theoutcomeof
theReviewnewemployeestepcausestheHRapprovalvariableinthepipelinetobe
eithersettoapprovedorrejected.Forthisbusinessprocess,editthetransitioncondition
totransitiontotheexception/errorstepwhenthevalueoftheHRapprovalvariableisequal
torejected.

Step to perform the exception


and error handling

Edit the condition for the


transition.

To learn more abouthowtocreatetransitionsandsettransitionconditions,seethe


webMethodsDesigneronlinehelp.

Transitioning when a Service Throws an Exception


Ifyourbusinessprocessinvokesaservice,thereisthepossibilitythattheinvokedservice
mightthrowanexception.Tocatchthisunexpectederror,youcanuseanerrortransition.
Atruntime,thebusinessprocesstakestheerrortransitionifaservicethrowsan
exception.

Getting Started with Business Process Management Version 7.1

93

8. Perform Error and Exception Handling

Forexample,thenewemployeesetupprocessmodelinvokesaservicetoenrollthenew
employeeintheinternalHRsystem.Iftheservicethrowsanexception,thebusiness
processtakestheerrortransitiontoasteptohavethedataerrorreviewed.
Touseanerrortransition,addtheerrorsteptotheprocessmodel,andcreateatransition
totheerrorstep.Afteryoucreatethetransition,changethetransitiontypetoError.
Step to perform if the service
executed by the Enroll in HR
system throws an exception.

Designer automatically labels


the transition with Error.

To learn more abouthowtocreateerrortransitions,seethewebMethodsDesigneronline


help.

Transitioning When There is an Unexpected Error


Tocatchunexpectederrorswithstepsinyourprocessmodel,createaprocesswideerror
step.Atruntime,theprocesswideerrorstepreceivescontrolwhenastepthatdoesnot
haveitsownerrortransitionencountersanerror.
Donotcreatetransitionstoorfromtheprocesswideerrorstep,anddonotaddinputsto
theprocesswideerrorstep.Theprocesswideerrorstepisplacedunconnectedwithinthe
processmodel.Ifyouareusinganinternalpool,theprocesswideerrorstepmustbe
placedwithintheinternalpoolaswell,ratherthanonthedesigncanvasoutsidethepool.
YoudesignatethestepastheprocesswideerrorstepusingtheAdvanced > Error process
property.TosettheAdvanced > Errorprocessproperty,clickonthecanvaswithoutselecting
astep,transition,pool,orswimlane.InthePropertiesview,settheAdvanced > Error
processpropertybyselectingthenameofthestepyouwanttousefortheprocesswide
errorstep.
Forexample,inthenewemployeesetupbusinessprocess,theprocesswideerrorstepis
namedHandleprocesserror.Todesignatethisstepastheprocesswideerrorstep,set
theAdvanced > ErrorprocesspropertytoHandleprocesserror.

Getting Started with Business Process Management Version 7.1

94

8. Perform Error and Exception Handling

To learn more abouthowtocreateprocesswideerrorsteps,seethewebMethods


Designeronlinehelp.

Implementing an Exception or Error Step


Youtypicallyuseanactivitysteptohandleanexceptionorerror.Toimplementthe
activitystep,youcreateaservicethatperformstheexceptionorerrorhandling,and
updatetheAdvanced > Implementation > Servicepropertyoftheexception/errorstepto
specifytheservicetoinvoke.
Forexample,inthenewemployeesetupbusinessprocessthesteptohandleHRrejecting
anewemployeemightinvokeaservicethatsendsanemailmessagetothehiring
managerexplainingwhytheemployeerequestwasrejected.
To learn more aboutinvokingservicesfromastepintheprocessmodel,seethe
webMethodsDesigneronlinehelp.

Getting Started with Business Process Management Version 7.1

95

8. Perform Error and Exception Handling

Getting Started with Business Process Management Version 7.1

96

Chapter 9. Execute, Monitor, and Manage Business


Processes

Executing the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98


Monitoring the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Managing a Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

Getting Started with Business Process Management Version 7.1

97

9. Execute, Monitor, and Manage Business Processes

Important! BeforeyoucanusewebMethodsMonitor,youmusthaveyourdatabasesetup
correctly.Forinformationabouthowtosetupthedatabaseandlogdata,seethe
webMethodsInstallationGuideandthewebMethodsLoggingGuide.

Executing the Business Process


Toexecuteabusinessprocess,theruntimeobjectsfortheprocessmodelmustexistonthe
runtimeservers,andtheprocessmodelmustbeenabled.ThentheProcessEnginewill
usetheseruntimeobjectswheneventsoccurthattriggerthebusinessprocess.

Before You Can Execute the Business Process


Beforeyoucanexecuteabusinessprocess(eithertotestitortomakeitavailableina
productionenvironment),youmust:
Build and upload the process model for execution tocreatetheruntimeobjectsonthe
IntegrationServersandMywebMethodsServersthatareusedbytheprocess.
Enable the process modelfromMywebMethods;todoso,gototheAdministration >
Business > Business Processpageandedittheprocessyouwanttoenable.
To learn more about:
Buildinganduploadingaprocessmodelforexecution,seethewebMethods
Designeronlinehelp.
Enablingtheprocessmodel,seethewebMethodsMonitorUsersGuide.

Starting an Instance of the Business Process


Abusinessprocessbeginswhenaneventthattriggersthefirststepofabusinessprocess
occurs.Forexample,forthenewemployeesetupbusinessprocess,thefirststepinthe
businessprocessisthereceivestepthatwaitsforthedocumentthatcontainsinformation
aboutthenewemployee.Thisstepwaitsforthedocumentthatcontainsinformation
aboutthenewemployee.
WhentheIntegrationServerreceivesthedocumentthatcontainstheinformationabout
thenewemployee,theProcessEnginecreatesanewinstanceofthenewemployeesetup
businessprocess.Youcanmonitorandmanageinstancesofthebusinessprocessusing
webMethodsMonitor.

Getting Started with Business Process Management Version 7.1

98

9. Execute, Monitor, and Manage Business Processes

Monitoring the Business Process


webMethodsMonitorallowsyoutoviewprocessinstancesthatareinyoursystem.The
userinterfacethatyouusetoaccessthisfeatureofwebMethodsMonitorisMy
webMethods.Youcanviewprocessesthatarecurrentlyrunning,havecompleted,and
alsothosethathavefailed.
Whenviewingthestatusofaspecificinstanceofabusinessprocess,youcanuse
webMethodsMonitortodisplaytheimageofyourbusinessprocess.Theimagethat
webMethodsMonitordisplaysmatchesthemodelyoucreatedwithDesigner.
webMethodsMonitoraddssymbolsnexttostepsintheprocesstoillustratewhethera
stepiscompleted,currentlyrunning,waiting(forexample,waitingforadocumentto
arrive),orfailed.Youcandeterminethefollowingtypesofinformation:
Forarunningprocess,thestepsthathavecurrentlycompletedandthestepthatis
currentlyrunning.
Forafailedprocess,thestepthatcausedthefailure.

To learn more about monitoringabusinessprocess,includinghowtodoadvanced


searchestolocateinformationaboutspecificinstancesofabusinessprocess,see
informationaboutworkingwithloggeddataforprocessesinthewebMethodsMonitor
UsersGuide.

Getting Started with Business Process Management Version 7.1

99

9. Execute, Monitor, and Manage Business Processes

Managing a Business Process


YoucanusewebMethodsMonitortoperformthefollowingtypesoftaskstomanageyour
businessprocesses:
Delete unused process models.Ifyoucreateaprocessmodel,buildanduploadaversion
ofthemodel,thenenabletheversion,buttheprocessmodelversionisneverused,
youcandeletethatprocessmodelversionfromtheprocessauditloggingdatabase.
NotethattheprocessmodelwillstillexistinDesigner,butbydeletingitfrom
webMethodsMonitor,theprocessmodelversionisnolongeravailablefortheProcess
Enginetoselectforuse.
Disable process models.Ifyouwanttotemporarilymakeaprocessmodelversion
unavailable,youcandisableit.TheProcessEnginedoesnotcreatenewinstancesof
disabledprocessmodelversions.Forexample,ifasystemthataprocessmodelusesis
temporarilyunavailable,youcandisableallversionsoftheprocessmodelsothatnew
instancesdonotstart.
Enable process models.Ifyoudisabledaprocessmodelversion,youcanmakeit
availableagainbyenablingit.Onlyoneversionofaprocessmodelcanbeenabledata
time.Also,allprocessmodelversionsthatarebuiltanduploadedtowebMethods
MonitorfromDesignerareaddedinadisabledstate;youmustenabletheprocess
modelversionbeforeyoucanuseitforthefirsttime.
Suspend business processes.Youcansuspendaninstanceofarunningbusinessprocess
tohaltitsexecution.Forexample,ifasystemthataprocessusesbecomesunavailable
duringtheprocessexecution,youcansuspendtheprocessinstanceuntilyoumake
thesystemavailableagain.Thismightpreventthebusinessprocessinstancefrom
failingduetotheunavailablesystem.
Resume business process.Ifyoupreviouslysuspendedaninstanceofabusiness
process,youcanresumeittoallowtheexecutionoftheprocessinstancetoproceed.
Resubmit business processes.Youcanresubmitaninstanceofabusinessprocessata
stepyouselect.Additionally,youcanalterruntimedata(e.g.,altervaluesinthe
businessprocesspipeline)beforeresubmittingthestep.Forexample,ifabusiness
processinstancefailedduetoanerrorwithastepthatfailedbecauseavalueinthe
pipelinewasincorrect,youcouldalterthepipelinevaluetotheexpectedvalue,and
resubmitfromthefailedsteptoallowthebusinessprocessinstancetocomplete
successfully.
To learn more about managingabusinessprocess,seeinformationaboutworkingwith
loggeddataforprocessesinthewebMethodsMonitorUsersGuide.

Getting Started with Business Process Management Version 7.1

100

Appendix A. Quick Reference for Modeling Business


Processes

Business Tasks Using Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102


Business Tasks that Involve Internal Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Business Tasks that Involve People . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Business Tasks that Involve External Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

Getting Started with Business Process Management Version 7.1

101

A. Quick Reference for Modeling Business Processes

Business Tasks Using Web Services


Model the step

Formoreinformationaboutmodelingthestep,see:
AddingtheITBusinessTaskstotheModelonpage30forasamplemodelthat
includesWebServicesteps.
webMethodsDesigneronlinehelpformoreinformationaboutmodelingstepsin
processmodels.

Configure the step

SetthefollowingpropertiesfortheWebserviceactivitystep:
Property

Setting

Advanced > Implementation > Type

WebService.

Advanced > Implementation > Logical Server

TheIntegrationServeronwhichtheWeb
serviceconnectorresides.

Advanced > Implementation > Service

Thefullyqualifiednameoftheservice.You
canusethebrowsebuttonnexttothisfield
toselectaWebserviceconnectoronthe
IntegrationServer,draganddropaWeb
serviceconnectorontotheactivitystep,or
rightclicktostarttheWebservicewizard.

Inputs / Outputs

Theinputstoandoutputsofthestep.
AfteryousettheAdvanced > Implementation >
Serviceproperty,Designerconfiguresthe
inputsandoutputsautomatically.Youare
freetochangethem.

Formoreinformation,seeConfiguringtheActivityStepfortheWebServiceon
page39orthewebMethodsDesigneronlinehelp.
Make the inputs
and authentication
information
available

Receive the
response from the
Web service

UpdatethewrapperservicetomaketheinputstotheWebserviceandauthentication
informationavailabletotheWebservice.
1

InDesigner,buildanduploadtheprocess.

InDeveloper,locatethewrapperservicefortheWebserviceactivitystep.

UpdatethewrapperservicetosettheWebserviceinputvariablesbyeither
mappingvaluesfromtheprocessdataorhardcodingvalues.

Updatethewrapperservicetosettheauthenticationinformationbyeither
mappingvaluesfromtheprocessdataorhardcodingvaluesintheauthdocument,
whichisaninputtotheWebserviceconnector.

TheProcessEngineplacestheresponseoftheWebserviceinthebusinessprocess
pipelinebecausetheWebserviceactivitystephasdefinedoutputsinitsInputs / Outputs
property.Asaresult,itwillbeavailabletosubsequentsteps.Formoreinformation,see
ReceivingDataBackIntotheBusinessProcessSynchronouslyonpage42.

Getting Started with Business Process Management Version 7.1

102

A. Quick Reference for Modeling Business Processes

Business Tasks that Involve Internal Systems


Model the step

Formoreinformationaboutmodelingthestep,see:
DefiningStepsforHRBusinessTasksonpage26forasamplemodelinvolvingan
internalsystem.
webMethodsDesigneronlinehelpformoreinformationaboutmodelingstepsin
processmodels.

Set up to send data


to the internal
system

Createaservicethatsendsdatatotheinternalsystem.Formoreinformation,see
CreatingaServicethatSendsDatatotheInternalSystemonpage47.

Configure the
activity step that
sends data to the
internal system

Setthefollowingpropertiesfortheactivitystep:
Property

Setting

Advanced > Implementation > Type

ISService.

Advanced > Implementation > Logical Server

TheIntegrationServeronwhichtheservice
thatsendsdatatotheinternalsystemresides.

Advanced > Implementation > Service

Thefullyqualifiednameoftheservicethat
sendsdatatotheinternalsystem.Youcan
usethebrowsebuttonnexttothisfieldto
selectaserviceonIntegrationServer.

Inputs / Outputs

Theinputstoandoutputsfromtheservice
thatsendsdatatotheinternalsystem.

Formoreinformation,seeSendingDatafromtheBusinessProcesstotheInternal
Systemonpage47.

Getting Started with Business Process Management Version 7.1

103

A. Quick Reference for Modeling Business Processes

Set up to receive
the response from
the internal system

Theprocesscanreceivetheresponsesynchronouslyorasynchronously
To receive the
response
synchronously

Toreceivetheresponseintothebusinessprocesspipelineafterthe
activitystepcompletes,ensureyouhavedefinedtheoutputsinthe
Inputs / Outputs property.Formoreinformation,seeReceivingData
BackIntotheBusinessProcessSynchronouslyonpage42.

To receive the
response
asynchronously

Tosetuptoreceivetheresponseasynchronously:
InDeveloper,defineapublishableISdocumenttypethat
definesthedatatheinternalsystemwillreturn.Formore
information,seethePublishSubscribeDevelopersGuide.
AddlogictoestablishacorrelationIDfortheprocess.Formore
information,seeMappingtheCorrelationIDtotheProcess
InstanceIDonpage53.
CreateacorrelationservicetoextractacorrelationIDfromthe
responsedocument.Formoreinformation,seeCorrelating
IncomingDocumentswiththeCorrectProcessInstanceon
page51.
Addareceivesteptothemodelthatwaitsforthedocument
fromtheinternalsystem.

Configure the
receive step that
receives the
asynchronous
response from an
internal system

Setthefollowingpropertiesforthereceivestep:
Property

Setting

Advanced > Implementation > Logical Server

TheIntegrationServeronwhichthe
correlationserviceresides.

Advanced > Implementation > Correlation


Service

Thefullyqualifiednameofthecorrelation
service.Youcanusethebrowsebuttonnext
tothisfieldtoselectaserviceonIntegration
Server.

Advanced > Implementation > Receive


Document

Thefullyqualifiednameofthepublishable
ISdocumenttypethatdefinesthedatathe
internalsystemwillreturn

Formoreinformation,seeUpdatingtheProcessModeltoReceivetheISDocumenton
page49andCorrelatingIncomingDocumentswiththeCorrectProcessInstanceon
page51.

Getting Started with Business Process Management Version 7.1

104

A. Quick Reference for Modeling Business Processes

Business Tasks that Involve People


Model the step

Formoreinformationaboutmodelingthestep,see:
AddingtheFacilitiesBusinessTaskstotheModelonpage29forasamplemodel
involvinginteractionwithpeople(i.e.,thatincludesataskstep).
webMethodsDesigneronlinehelpformoreinformationaboutmodelingstepsin
processmodels.

Define the task


input and output

IntheDeveloper,defineISdocumenttypesthatdefinethestructureoftheinputsand
outputsthatthetaskwillexpect.
DefineasingleISdocumenttypeforboththeinputsandoutputsifthetaskreturns
itsoutputbyupdatingthecontentoftheinputdocument.
DefineanISdocumenttypefortheinputandanotherfortheoutputifthestructure
ofthetaskinputisdifferentfromthetaskoutput.

Configure the step


when using an
existing task

Setthefollowingpropertiesforthetaskstepwhenusinganexistingtask:
Property

Setting

Advanced > Implementation > Type

Task.

Advanced > Implementation > Logical Server

TheIntegrationServerthatisrunningthe
ProcessEngine,whichinturn,isconnected
totheTaskEngineforthetask.

Advanced > Implementation > Task


Information

Thetaskyouwanttouse.

Inputs / Outputs

TheISdocumenttype(s)thatdefinethetask
inputsandoutputs.

Formoreinformation,seeUsinganExistingTaskonpage64.

Getting Started with Business Process Management Version 7.1

105

A. Quick Reference for Modeling Business Processes

Configure the step


when implementing
a new task

Toaddanemptytaskstepandimplementanewtaskfromit:
1

Setthefollowingpropertiesforthetasksteptosetuptoimplementthenewtask:
Property

Setting

General > Label

Auniquenameamongyourexistingtasks.

Advanced > Implementation > Type

Task.

Advanced > Implementation > Logical


Server

TheIntegrationServerthatisrunningthe
ProcessEngine,whichinturn,isconnected
totheTaskEngineforthetask.

Inputs / Outputs

TheISdocumenttype(s)thatdefinethetask
inputsandoutputs.

Implementthetaskbyrightclickingthetaskstepandselecting
Create Implementation > New Task.

Modifythetasktocompletetheuserinterface.Additionally,youmightwantto
assignrulestothetask

Formoreinformation,seeImplementingaNewTaskfromaTaskSteponpage66and
webMethodsDesigneronlinehelpformoreinformationaboutmodifyingtasks.
Send data to the
internal system

Atruntime,theProcessEnginesendsthedataidentifiedintheinputsofthetasksteps
Inputs / Outputs propertytothetask.Formoreinformation,seeGettingInformationTo
andFromtheBusinessProcessonpage67.

Receive the
response from the
task

TheProcessEnginewillplacetheresponsefromthetaskinthebusinessprocess
pipelinebecausethetaskstephasdefinedoutputsinitsInputs / Outputs property.For
moreinformation,seeGettingInformationToandFromtheBusinessProcesson
page67.

Getting Started with Business Process Management Version 7.1

106

A. Quick Reference for Modeling Business Processes

Business Tasks that Involve External Partners


Define information
about the external
partner

UsingTradingNetworks,defineaprofileforyourexternalpartner.Formore
information,seeDefiningInformationaboutExternalPartnersonpage71andthe
chapteraboutcreatingpartnerprofilesinthewebMethodsTradingNetworksUsersGuide.

Model the steps

Formoreinformationaboutmodelingthestepstointeractwithanexternalpartner,see:
DefiningStepsforHRBusinessTasksonpage26forasamplemodelinvolvingan
externalpartner.
webMethodsDesigneronlinehelpformoreinformationaboutmodelingstepsin
processmodels.

Set up to send data


to the external
system

TosenddatatoTradingNetworks,youdothefollowing:
CreateaservicethatsendsadocumenttoTradingNetworks.Formoreinformation,
seeSendingDocumentsfromtheBusinessProcesstoExternalPartnerson
page72.
UsingTradingNetworks,defineaTNdocumenttypeforthedocumentthatwillbe
senttoTradingNetworks.Formoreinformation,seeDefiningaTNDocument
TypefortheDocumentfromtheProcessonpage75andwebMethodsTrading
NetworksUsersGuideforinformationaboutcreatingTNXMLdocumenttypesand
TNflatfiledocumenttypes.
UsingTradingNetworks,defineaprocessingruletoprocessthedocumentthatisto
besenttoTradingNetworks.Formoreinformation,seeDefiningaProcessing
RulefortheDocumentfromtheProcessonpage76andwebMethodsTrading
NetworksUsersGuideforinformationaboutcreatingprocessingrules.

Configure the
activity step that
sends data to the
external partner

Setthefollowingpropertiesfortheactivitystepthatsendsdatatotheexternalpartner:
Property

Setting

Advanced > Implementation > Type

ISService.

Advanced > Implementation > Logical


Server

TheIntegrationServeronwhichtheservice
thatsendsdatatotheTradingNetworks
resides.

Advanced > Implementation > Service

Thefullyqualifiednameoftheservicethat
sendsdatatoTradingNetworks.Youcanuse
thebrowsebuttonnexttothisfieldtoselecta
serviceonIntegrationServer.

Inputs / Outputs

Theinputstotheservicethatsendsdatato
theTradingNetworks,ifany.

Formoreinformation,seeUpdatingtheProcessModeltoReferencetheServiceon
page74.

Getting Started with Business Process Management Version 7.1

107

A. Quick Reference for Modeling Business Processes

Set up to receive
the response from
the internal system

TradingNetworksreturnsdatafromanexternalpartner,andyoureceiveitintothe
processasynchronously.Tosetuptoreceivedata:
UsingTradingNetworks,defineaTNdocumenttypeforthedocumentthatthe
externalpartnerwillsendtoTradingNetworksandthatTradingNetworkswill
forwardtothebusinessprocess.Formoreinformation,seeDefiningaTN
DocumentTypefortheDocumentfromtheExternalPartneronpage77and
webMethodsTradingNetworksUsersGuideforinformationaboutcreatingTNXML
documenttypesandTNflatfiledocumenttypes.
Important! BesuretodefinetheTNdocumenttypetoextracttheConversationID
systemattribute.
UsingTradingNetworks,defineaprocessingruletoprocessthedocumentthatthe
externalpartnerwillsendtoTradingNetworks.Formoreinformation,see
DefiningaProcessingRuleforDocumentfromtheExternalPartneronpage80
andwebMethodsTradingNetworksUsersGuideforinformationaboutcreating
processingrules.
AddlogictoestablishaconversationIDfortheprocess.Formoreinformation,see
MappingtheConversationIDtotheProcessInstanceIDonpage84.
AddareceivesteptotheprocessmodeltoreceivethedocumentfromTrading
Networks.

Configure the
receive step the
receives data from
the external partner

Setthefollowingpropertiesforthereceivestep:
Property

Setting

Advanced > Implementation > Receive


Document

ThefullyqualifiednameoftheTNdocument
typethatdefinesthedatatheexternalsystem
willreturn.

Note: Youdonotneedtospecifyacorrelationservicewhenreceivingadocumentfrom
TradingNetworksbecauseProcessEngineobtainstheconversationIDfromTrading
Networks.
Formoreinformation,seeUpdatingtheProcessModeltoReceivetheTNDocument
onpage77.FormoreinformationabouthowtoaccessthedocumentthatTrading
Networksreturns,seeCreatingaServicetoProcesstheDocumentfromtheExternal
Partneronpage80.

Getting Started with Business Process Management Version 7.1

108

Index

Index
A
adapters, webMethods 47
AND join
using when waiting for document and transition 50, 78
when to use 50, 78
asynchronously receiving documents
how documents processed 55
requirements 49

B
Bindings view 66
bizdoc 80
BizDocEnvelope 80
build and upload business process 98
business process
activity step 28
before you can execute 98
build and upload 98
deleting unused models for 100
disabling models 100
enabling 98
enabling model for 100
making models temporarily unavailable 100
monitoring 99
receive step 28
resubmitting 100
resuming 100
starting new instance of 98
suspending 100
task step 28

C
code sample
creating document for external partner
flat file document 73
XML document 72
extracting correlation ID from incoming document 57

Getting Started with Business Process Management Version 7.1

mapping
authentication information for Web services 41
conversation ID to process instance ID 86, 88
correlation ID to process instance ID 54
obtaining response document content from external partner
81, 82
sending data to
external partner via Trading Networks 72, 73
internal system 47
configuring
connection between Task Engine and Process Engine 63
IS Service activity step 103, 107
receive step 104, 108
task step 64, 66, 105
Web service activity step 102
conversation ID
ConversationID system attribute for TN document type 77
data to use for 77
definition 77, 84
how Trading Networks uses 77
relationship to process instance ID 84
when you have to map to process instance ID 84
correlating incoming documents with correct process instance
51, 83
correlation ID
creating 52
definition 52
determining data to use for 52
extracting from documents 55
mapping to process instance ID 53
purpose 52
rules for using 52
correlation service
creating 56
description 55
Document input variable 56
identifying when to execute 57
input and output variables 56
purpose 55

109

Index

Correlation Service (Advanced>Implementation) property 104


creating
correlation IDs 52
correlation service 56
process document from external partner 80
publishable IS document types 49
service to send documents to
external partner via Trading Networks 72
internal system 47

D
definitions
bizdoc 80
BizDocEnvelope 80
business process management 10
conversation ID 77, 84
correlation ID 52
error transition 35
external pool 28
internal pool 28
PID 51
process ID 51
process instance ID 51, 84
process-wide error step 35
publishable IS document type 49
swimlane 28
wrapper service 40
deleting unused processes 100
disabling process models 100
Document input variable to correlation service 56
document types, See IS document types
documentation
additional 8
feedback 8
documents
obtaining content of documents from Trading Networks 80
obtaining response flat file document content 81
obtaining response XML document content 80
receiving asynchronously 49
receiving synchronously 42
response from internal system 49
service to create flat file documents for external partner 73
service to create flat file documents for Trading Networks 73

Getting Started with Business Process Management Version 7.1

service to create XML documents for external partner 72


service to create XML documents for Trading Networks 72
Web service output 42

E
enabling process models 98, 100
Error (Advanced) process property 94
error processing
handling exceptions 93
handling expected errors 92
handling unexpected errors 94
overview 92
sample for handling exceptions 94
sample for handling expected conditions 93
sample for handling unexpected conditions 94
transitioning based on pipeline value 92
transitioning based on process data 92
types of transitions 92
exceptions, handling in processes 93
executing
before you can execute processes 98
correlation services in business processes 57
processes, enabling 98
external partners, interacting with in business processes
configuring IS Service activity step 107
configuring receive step 108
defining partners in Trading Networks 71
making Trading Networks send response to business process
77
modeling 70
overview 70
receiving response from external partner 76
sending data to external partner 72
when to map conversation ID to process instance ID 84
external pool 28
extracting
correlation ID from documents 55

F
flat file document
converting to IData object 81
creating to send to Trading Networks 73
retrieving content of document sent from Trading Networks 81

110

Index

H
human tasks, using in business processes
configuring task step 64, 105
defining IS document types for input and output 63
IS document input/output guidelines 64
modeling 62
overview 62
prerequisites 63

IS Service activity step


configuring 103, 107

J
Join Type (Advanced>Implementation>Joins) property 50, 78
joins, AND
using when waiting for document and transition 50, 78
when to use 50, 78

IDs
conversation 84
conversation ID 77
correlation 52
process instance ID (PID) 51
Inputs / Outputs (Advanced>Implementation) property 102
Inputs / Outputs property 40, 65, 66, 103, 105, 106, 107
internal people, interacting with in business processes, See
human tasks, using in business processes
internal pool 28
internal systems, interacting with in business processes
asynchronously receive documents from internal system 49
configuring IS Service activity step 103
configuring receive step 104
defining response data from internal system 49
determining data to use for correlation IDs 52
extracting correlation ID from documents 55
getting data into correct process instance 51
mapping correlation ID to process instance ID 53
modeling 46
overview 46
processing document from 39, 58
processing document from internal system 39, 58
receiving response from internal system 49
sending documents to internal system 47
using webMethods adapters to interact with 47
IS Browser view 40, 48, 50, 59, 75, 78
IS document types
creating publishable IS document types 49
guidelines for human tasks input/output 64
input and output of human tasks 63
output for Web service 42
pub.prt:ProcessData 54
publishable 49

Label (General) property 66, 106


Logical Server (Advanced>Implementation) property 65, 66, 102,
103, 104, 105, 106, 107

Getting Started with Business Process Management Version 7.1

M
mapping
conversation ID to process instance ID
from activity step 85
from processing rule 87
how to do the mapping 85, 87
when you have to map 84
where in process to do mapping 84
correlation ID to process instance ID 53
how to do mapping 53
modeling steps to
interact with external partners 70
interact with internal people 62
interact with internal systems 46
use Web services 38
monitoring business processes 99

P
partner profiles 71
people, interacting with in business processes, See human tasks,
using in business processes
PID 51
Process Engine, configuring connection to Task Engine 63
process instance ID
definition 51, 84
mapping conversation ID to 84
mapping correlation ID to 53
relationship to conversation ID 84
when you have to map conversation ID to 84

111

Index

process property, Advanced>Error 94


processing rule, Trading Networks
Deliver Document By processing action 76
document to send to external partner 76
Document Type criteria 76
Execute a Service processing action 85, 87
response document from external partner 80
using to map conversation ID to process instance ID 87
process-wide error step
definition 35
description 94
designating 94
no transitions to 94
when control is passed to it 94
profiles, partner 71
properties, process, Advanced>Error 94
properties, step
interact with external partner
Advanced>Implementation>Joins>Join Type 78
Advanced>Implementation>Logical Server 107
Advanced>Implementation>Service 107
Advanced>Implementation>Subscription 77, 108
Advanced>Implementation>Type 107
Inputs / Outputs 107
interact with internal system
Advanced>Implementation>Correlation Service 104
Advanced>Implementation>Logical Server 103, 104
Advanced>Implementation>Service 103
Advanced>Implementation>Subscription 104
Advanced>Implementation>Type 103
Inputs / Outputs 103
IS Service activity step
Advanced>Implementation>Logical Server 103, 107
Advanced>Implementation>Service 103, 107
Advanced>Implementation>Type 103, 107
Advanced>Joins>Join Type 50
Inputs / Outputs 107
receive step
Advanced>Implementation>Correlation Service 104
Advanced>Implementation>Joins>Join Type 78
Advanced>Implementation>Logical Server 104
Advanced>Implementation>Subscription 77, 104, 108

Getting Started with Business Process Management Version 7.1

task step
Advanced>Implementation>Logical Server 65, 66, 105,
106
Advanced>Implementation>Task Information 65, 105
Advanced>Implementation>Type 65, 66, 105, 106
General>Label 66, 106
Inputs / Outputs 65, 66, 105, 106
Web Service activity step
Advanced>Implementation>Inputs / Outputs 102
Advanced>Implementation>Logical Server 102
Advanced>Implementation>Service 102
Advanced>Implementation>Type 102
configuring 39
Inputs / Outputs 40
pub.flatFiile:convertToValues service 82
pub.flatFile:convertToString service 74
pub.io:bytesToStream service 74
pub.prt.correlate:establishCorrelation service 53, 54, 85
pub.prt:CorrelationService specification 56
pub.prt:ProcessData IS document type 54
pub.string:stringToBytes service 74
pub.xml:documentToString service 47
pub.xml:documentToXMLString service 73
pub.xml:xmlStringToXMLNode service 73

R
receive step
configuring 104, 108
executing correlation services from 57
receiving documents asynchronously 55
resubmitting business process 100
resuming business process 100
retrieving data from
external partner 76
internal systems 49

S
sending documents to
external partners via Trading Networks 72
internal systems 47
Service (Advanced>Implementation) property 102, 103, 107
services
correlation
creating 56

112

Index

description 55
Document input variable 56
identifying when to execute 57
input and output variables 56
purpose 55
mapping correlation ID to process instance ID 53
processing document from internal system 39, 58
pub.flatFiile:convertToValues 82
pub.flatFile:convertToString 74
pub.io:bytesToStream 74
pub.prt.correlate:establishCorrelation 53, 54, 85
pub.string:stringToBytes 74
pub.xml:documentToString 47
pub.xml:documentToXMLString 73
pub.xml:xmlStringToXMLNode 73
sending documents to
external partner via Trading Networks 72
internal systems 47
wm.tn.doc.ff:routeFlatFile 73, 74
wm.tn.doc.xml:bizdocToRecord 81
wm.tn.doc.xml:routeXML 72, 73
wm.tn.doc:getContentPartData 82
wm.tn.doc:view 80, 81
specification, pub.prt:CorrelationService 56
starting new instance of process 98
step properties
interact with external partner
Advanced>Implementation>Joins>Join Type 78
Advanced>Implementation>Logical Server 107
Advanced>Implementation>Service 107
Advanced>Implementation>Subscription 77, 108
Advanced>Implementation>Type 107
Inputs / Outputs 107
interact with internal system
Advanced>Implementation>Correlation Service 104
Advanced>Implementation>Logical Server 103, 104
Advanced>Implementation>Service 103
Advanced>Implementation>Subscription 104
Advanced>Implementation>Type 103
Inputs / Outputs 103
IS Service activity step
Advanced>Implementation>Logical Server 103, 107
Advanced>Implementation>Service 103, 107

Getting Started with Business Process Management Version 7.1

Advanced>Implementation>Type 103, 107


Advanced>Joins>Join Type 50
Inputs / Outputs 107
receive step
Advanced>Implementation>Correlation Service 104
Advanced>Implementation>Joins>Join Type 78
Advanced>Implementation>Logical Server 104
Advanced>Implementation>Subscription 77, 104, 108
task step
Advanced>Implementation>Logical Server 65, 66, 105,
106
Advanced>Implementation>Task Information 65, 105
Advanced>Implementation>Type 65, 66, 105, 106
General>Label 66, 106
Inputs / Outputs 65, 66, 105, 106
Web Service activity step
Advanced>Implementation>Logical Server 102
Advanced>Implementation>Service 102
Advanced>Implementation>Type 102
configuring 39
Inputs / Outputs 40, 102
Subscription (Advanced>Implementation) property 77, 104, 108
suspending business process 100
swimlane 28
synchronously receiving output 42

T
Task Engine, configuring connection to Process Engine 63
Task Information (Advanced>Implementation) property 65, 105
task step, configuring 105
tasks
Bindings view 66
designing user interface 66
implementing new for processes 66
using existing in processes 64
TN document type
ConversationID attribute 77
document to send to external partner 75
in IS Browser view 78
Trading Networks
defining external partners 71
forming a flat file document to send to 73
forming an XML document to send to 72

113

Index

obtaining response document from external partner 80


sending documents to 72
transitions
creating 92
Error 94
If Condition 92
sample for handling exceptions 94
sample for handling expected conditions 93
sample for handling unexpected conditions 94
types you can use for error handling 92
troubleshooting information 8
Type (Advanced>Implementation) property 65, 66, 102, 103,
105, 106, 107

U
upload (and build) business process 98

W
Web Service activity step, configuring 102
Web services, using in business processes
IS document for the output from Web service 42
modeling 38
obtaining outputs from Web service 42
overview 38
specifying authentication for Web service 41
webMethods adapters 47
webMethods Advantage Web site 48
wm.tn.doc.ff:routeFlatFile service 73, 74
wm.tn.doc.xml:bizdocToRecord service 81
wm.tn.doc.xml:routeXML service 72, 73
wm.tn.doc:getContentPartData service 82
wm.tn.doc:view service 80, 81
wrapper service
definition 40

X
XML document
converting to IData object 80
creating to send to Trading Networks 72
retrieving content of document sent from Trading Networks 80

Getting Started with Business Process Management Version 7.1

114

You might also like