session 606: workflow integration with non-sap

85
Session 606: Workflow integration with non-SAP workflow applications Dale Davis, IBM Darrell Heath, EnterSysGroup Ginger Gatling, SAP

Upload: others

Post on 03-Feb-2022

19 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Session 606: Workflow integration with non-SAP

Session 606: Workflowintegration with non-SAPworkflow applicationsDale Davis, IBMDarrell Heath, EnterSysGroupGinger Gatling, SAP

Page 2: Session 606: Workflow integration with non-SAP

In this presentation we will….

• List the options available when integratingSAP Business Workflow with non-SAP tasksand non-SAP systems

• Explain real world scenarios where some ofthe options have been implemented

• Discuss the future of workflow integration

Page 3: Session 606: Workflow integration with non-SAP

Topics• Integration options

• Create workflow tasks for external service calls and BSP’s• Universal Worklist launch handlers• SAP NetWeaver Exchange Infrastructure Business Process Management• Wf-XML and Web Services

• Real world examples• Accessing Web Services• Integration with Lotus Notes• Extended notifications for Outlook integration

• Future• Universal Worklist API to access non-SAP tasks• Guided Procedures

Page 4: Session 606: Workflow integration with non-SAP

Topics• Integration options

• Create workflow tasks for external service calls and BSP’s• Universal Worklist launch handlers• SAP NetWeaver Exchange Infrastructure Business Process Management• Wf-XML and Web Services

• Real world examples• Accessing Web Services• Integration with Lotus Notes• Extended notifications for Outlook integration

• Future• Universal Worklist API to access non-SAP tasks• Guided Procedures

Page 5: Session 606: Workflow integration with non-SAP

1995

EP 5.0

2003

SAP NetWeaver ‘04

SAP NetWeaver 2004s

BusinessWorkflow

UniversalWorklist

+ CollaborationTasksBPM

+ GuidedProcedures

Evolution of workflow tools

Page 6: Session 606: Workflow integration with non-SAP

ABAP Dialog orBackground

Service call viaExchange Infrastructure

Wf-XML

WebDynpro

SOAP

Web activity step (Wf-XML, SOAP)WF_EXTSRV to import ABAP services such asBSPWFWS to import WSDL (WSDL 1.1, only simpleschema types, only http bindings)Web service via XI proxyUWL launch handlersUWL APILotus/Outlook Integration

Integration Options

Page 7: Session 606: Workflow integration with non-SAP

-Transaction: WF_EXTSRV-Generate your service

SAP will guide youthrough the next stepsvia a Wizard

Import ABAP Services

6.20

Page 8: Session 606: Workflow integration with non-SAP

Generated Task

Business Object Type“WEBSERVICE”Method“PROCESSDIALOG”

6.20

Page 9: Session 606: Workflow integration with non-SAP

• WF_HANDCUST to configure workflow URLs.• WFWS to import external WSDL.• WF_EXTSRV for BSP’s and ABAP services.• Generate tasks.• Extend service itself to do callback to WF_HANDCUST URL.

Hint!Example BSP: SWXTRAREQExample Workflow: WS66700042

Required Configuration

6.20

Page 10: Session 606: Workflow integration with non-SAP

Topics• Integration options

• Create workflow tasks for external service calls and BSP’s• Universal Worklist launch handlers• SAP NetWeaver Exchange Infrastructure Business Process Management• Wf-XML and Web Services

• Real world examples• Accessing Web Services• Integration with Lotus Notes• Extended notifications for Outlook integration

• Future• Universal Worklist API to access non-SAP tasks• Guided Procedures

Page 11: Session 606: Workflow integration with non-SAP

• Unified and centralized access to their work.• Aggregate task items from multiple providers into one list.

• SAP Business Workflow• Collaboration Tasks• Alert Management System• Knowledge Management Notifications• Guided Procedure Actions• Current pilot to include external tasks in UWL

• Custom worklists enable specific views for specific tasks• Enables user personalization• Applications can bypass having to implement their own inbox

Universal Worklist Features

NW04

Page 12: Session 606: Workflow integration with non-SAP

Parameterized launching forBSPiViewURLWeb DynproObject navigationSAP GUI (for HTML)

Note:Enables you to add new UI’s forlegacy SAP task (use WebDynpro to launch existing task ina 4.6C system).Currently piloting API to enableexternal tasks to appear in UWL

NW04

Page 13: Session 606: Workflow integration with non-SAP

XML Example<Action name="launchWebDynProABAP"handler="SAPWebDynproABAPLauncher“>

Launches anABAP WebDynpro

1

2

3

NW04

Page 14: Session 606: Workflow integration with non-SAP

Topics• Integration options

• Create workflow tasks for external service calls and BSP’s• Universal Worklist launch handlers• SAP NetWeaver Exchange Infrastructure Business Process Management• Wf-XML and Web Services

• Real world examples• Accessing Web Services• Integration with Lotus Notes• Extended notifications for Outlook integration

• Future• Universal Worklist API to access non-SAP tasks• Guided Procedures

Page 15: Session 606: Workflow integration with non-SAP

System A System B

Process Bridge

Interfaces for

Process Communication

Data Integration

Embedded Process

Unbounded Process

Embedded Process

Process Integration

Integration Process

Application Process Application Process

XI Integration Process

NW04

Page 16: Session 606: Workflow integration with non-SAP

Integration Process Definition in XI

NW04

Page 17: Session 606: Workflow integration with non-SAP

Generated Workflow

• SAP NetWeaver Exchange Infrastructure(XI) has “Integration Processes” built inthe Integration Repository.

• When activated, these processes generateworkflows.

• BPM processes are used fororchestration of XML messages betweensystems.

• Correlations are used to match messagesfor the process.

NW04

Page 18: Session 606: Workflow integration with non-SAP

Topics• Integration options

• Create workflow tasks for external service calls and BSP’s• Universal Worklist launch handlers• SAP NetWeaver Exchange Infrastructure Business Process Management• Wf-XML and Web Services

• Real world examples• Accessing Web Services• Integration with Lotus Notes• Extended notifications for Outlook integration

• Future• Universal Worklist API to access non-SAP tasks• Guided Procedures

Page 19: Session 606: Workflow integration with non-SAP

Wf-XML

• In the late 90’s someone said interoperability betweenworkflow engines would be a “good thing”

• Standardized exchange of messages betweenworkflow systems for different manufacturers

• Workflow Management Coalition (WfMC) is a non-profit, organization of workflow vendors, users,analysts and university/research groups -http://www.wfmc.org/

• The WfMC is an organization for the standardizationof Workflow Management Systems of which they havereleased Wf-XML 1.0, 1.1 and 2.0 (draft)

• SAP currently supports WfXML 1.0 and WfXML 1.1

Page 20: Session 606: Workflow integration with non-SAP

Inside-Out: Wf-XML

SAP System B

External ProcessEmbedded Process

Wf-XML

Wf-XML

Page 21: Session 606: Workflow integration with non-SAP

Outside-In: Wf-XML

SAP System B

External ProcessEmbedded Process

Wf-XML

Wf-XML

<?xml version="1.0" ?>- <WfMessage Version="1.0" xmlns="http://www.wfmc.org/standards/docs/Wf-XML">- <WfMessageHeader>

<Request ResponseRequired="Yes" /><Key>HTTP://esgsap01.esginternal.com/SAP/BC/WORKFLOW_XML/?~localkey=WS99500056</Key></WfMessageHeader>

- <WfMessageBody>- <CreateProcessInstance.Request StartImmediately="true">

<ObserverKey>http://esgsap01.esginternal.com/SAP/BC/WORKFLOW_XML/?~protocol=03&~localkey=000000572824</ObserverKey>- <ContextData>

<REQUEST>StartTask</REQUEST></ContextData></CreateProcessInstance.Request></WfMessageBody></WfMessage>

<?xml version="1.0" ?>- <WfMessage Version="1.0" xmlns="http://www.wfmc.org/standards/docs/Wf-XML">- <WfMessageHeader>

<Request ResponseRequired="Yes" /><Key>http://esgsap01.esginternal.com/SAP/BC/WORKFLOW_XML/?~protocol=03&~localkey=000000572824</Key></WfMessageHeader>

- <WfMessageBody>- <ProcessInstanceStateChanged.Request>

<ProcessInstanceKey>http://esgsap01.esginternal.com/SAP/BC/WORKFLOW_XML/?~protocol=03&~localkey=000000572825</ProcessInstanceKey>- <State>

<closed.completed /></State>

- <ResultData><RESPONSE>Process Rejected</RESPONSE></ResultData></ProcessInstanceStateChanged.Request></WfMessageBody></WfMessage>

Page 22: Session 606: Workflow integration with non-SAP

Web Services

• A web service is a process that has been exposed by theprovider to request or supply information

• One of the most common protocols for Web Servicecommunication is Simple Object Access Protocol (SOAP)

• Web services can be developed by a variety of webdevelopment platforms however they all support thisprotocol

• Many of these web services are simple Remote ProcedureCalls (RPCs) but offer very valuable capabilities

• Along with Wf-XML support, SAP has included support forcalling external SOAP services

Page 23: Session 606: Workflow integration with non-SAP

Web Services Examples

Pricing

PackagingCosts

WeatherShipping Routes

InventoryStatus

You name it…

Page 24: Session 606: Workflow integration with non-SAP

Web Services Examples

You name it…

Page 25: Session 606: Workflow integration with non-SAP

Topics• Integration options

• Create workflow tasks for external service calls and BSP’s• Universal Worklist launch handlers• SAP NetWeaver Exchange Infrastructure Business Process Management• Wf-XML and Web Services

• Real world examples• Accessing Web Services• Integration with Lotus Notes• Extended notifications for Outlook integration

• Future• Universal Worklist API to access non-SAP tasks• Guided Procedures

Page 26: Session 606: Workflow integration with non-SAP

Example: Web Service

• Business Problem:• Within SAP, need to trigger action on an external system

• Scenario:• Inbound data mapped via an external EAI tool to inbound IDOC• IDOC fails to post in SAP and triggers workflow• User chooses to update the mapping data and requests the data to be

remapped and sent to SAP; Workflow cancels existing IDOC error

• Parameters:• External mapping tool utilizes web services as communication links

via SOAP protocol

• Practical application:• This is a very simple scenario that can be applied to other valuable

business processes that exist between disparate systems

Page 27: Session 606: Workflow integration with non-SAP

Web Service: Process flow

• User is prompted for actionto take

• Chooses to notify webservice to Resend

• Notification is sent to WebService via SOAP Protocol

• Acknowledgement isreceived and WF continues.

Decision:Analyze IDOC

Decision:Analyze IDOC

wf-xml: SOAPReq Resend

http://www...

Page 28: Session 606: Workflow integration with non-SAP

Web Service: Webactivity Step

Page 29: Session 606: Workflow integration with non-SAP

Web Service: Webactivity Step

Page 30: Session 606: Workflow integration with non-SAP

Web Service: Webactivity Step

Page 31: Session 606: Workflow integration with non-SAP

Web Service: Webactivity Step

Page 32: Session 606: Workflow integration with non-SAP

Web Service: SOAP on the Ropes

• The Good• By default the SAP builds the XML per the selected protocol• All container elements with values are added to XML document• SOAP protocol is a synchronous process, therefore SAP waits on a

response• SAP automatically matches data elements in the returned XML document to

container elements and transfers the data (in theory)

• The Bad• Current problems with return binding for SOAP processes require special

handling• The Web step allows manipulation of the outgoing and incoming XML

document via rules• the following may ease some learning pains

Page 33: Session 606: Workflow integration with non-SAP

Web Service: Format Rule

Page 34: Session 606: Workflow integration with non-SAP

Web Service: Format Rule

Page 35: Session 606: Workflow integration with non-SAP

Wf-XML: Conversion Rule

• Create New Rule for Webflow: XML Format• Create a custom class with the standard interface of

IF_SWF_XML_RULE_DATA_SET• Now encoding and decoding are done by custom

methods, standard SAP processing no longer takes placefor this step (i.e. you have to do it all now)

• Use class CL_SWF_DEMO_WEBACTIVITY as anexample (sample coding supplied below in the appendix)

• Now……

Page 36: Session 606: Workflow integration with non-SAP

Wf-XML: Format Rule

Page 37: Session 606: Workflow integration with non-SAP

Wf-XML: Format Rule

Page 38: Session 606: Workflow integration with non-SAP

Wf-XML: Encoding and Decoding

Page 39: Session 606: Workflow integration with non-SAP

Topics• Integration options

• Create workflow tasks for external service calls and BSP’s• Universal Worklist launch handlers• SAP NetWeaver Exchange Infrastructure Business Process Management• Wf-XML and Web Services

• Real world examples• Accessing Web Services• Integration with Lotus Notes• Extended notifications for Outlook integration

• Future• Universal Worklist API to access non-SAP tasks• Guided Procedures

Page 40: Session 606: Workflow integration with non-SAP

Integration with Lotus Notes

About Lotus Notes

Manage emails, collaboration and electronic calendarfunction in an online and offline mode

Lotus Domino provides workflow functionality used formany intra company approval processes

Why Integrate SAP Workflow with Lotus Notes?

Occasional SAP users

Existing Notes Domino Workflow

Frequent Lotus Notes email or workflow users

Users prefers single point of notification for work orapprovals requiring their attention

Page 41: Session 606: Workflow integration with non-SAP

SAP/ Lotus Notes Workflow Case Study

Business Scenario 1 – Initially implemented SAP R/3 3.1H

Create an SAP workflow solution that estimates thematerial scrap and rework costs of implementing anEngineering Change (EC) at a given future date byreading SAP Inventory Management tables

Start this SAP workflow from an estimate approvalworkflow request form in Lotus Notes

Calculate the estimated costs and return the values toLotus Notes Workflow Approval Form

Route the completed form through the Notes Workflowapproval process

Page 42: Session 606: Workflow integration with non-SAP

SAP/Lotus NotesWorkflowIntegration Flow

Page 43: Session 606: Workflow integration with non-SAP

Start SAPWorkflow(in Lotus)

zec_eccost2

raisecreatedinpdm

event(RFC function)

CreateECM

Overwriteestimate

?

DeleteDuplicateestimate

DuplicateNotification

CancelWorkflow

CreateECM

EstimateEC Cost

created duplicate

yes no

end of workflow

Work flow

SAP Workflow

Page 44: Session 606: Workflow integration with non-SAP

SAP Workflow started by RFCfrom Lotus Notes Automation Object

Page 45: Session 606: Workflow integration with non-SAP
Page 46: Session 606: Workflow integration with non-SAP
Page 47: Session 606: Workflow integration with non-SAP
Page 48: Session 606: Workflow integration with non-SAP
Page 49: Session 606: Workflow integration with non-SAP

SAP RFC

Page 50: Session 606: Workflow integration with non-SAP
Page 51: Session 606: Workflow integration with non-SAP

SAP Workflow/ Lotus Notes Case Study

Business Scenario 2

Create a centralized workflow solution to standardizeapproval to dispose of surplus assets across a globalcorporation

Base approval routings on $$ Clip Levels which vary byGeography

Some users will initiate requests, process approvals anddisposition assets in SAP using SAP workflow

Others would like to receive workitem notifications toprocess approvals in Lotus Notes

All managers and employees would like to receivedeadline notifications in Lotus Notes

Page 52: Session 606: Workflow integration with non-SAP

Lotus Integration Case Study

The Good News

SAP Configuration to support Notes integration issimple

No special SAP Workflow Configuration settingsneeded to enable Notes integration

The Challenge is designing the SAP workflow

One workflow or multiple based on notificationpreferences geographies and clip levels?

Does the notification preference have any bearing onthe agent determination method?

Page 53: Session 606: Workflow integration with non-SAP

Step 1: Configure SAP to support outgoingmail

• Use Transaction SCOT toconfigure your InternetConnection

• Two node types are available• SMTP based on Internet Mail

Protocol• RTP based on Remote Function Call

Protocol• For this Solution we used the SMTP

Node• Assign the Mail host for outgoing

mail• Assign the port• Assign the code page

• Schedule a background job to link toyour communication Node

Page 54: Session 606: Workflow integration with non-SAP

Step 2: Ensure WF-BATCH and all SAP WFusers have email addresses

• You may need your Security& Authorization team to takecare of this

Page 55: Session 606: Workflow integration with non-SAP

Step 3: Schedule the RSWUWFML2 report

Page 56: Session 606: Workflow integration with non-SAP

Step 4: Requests are sent to the outboundinternet mail queue

Page 57: Session 606: Workflow integration with non-SAP

Step 4 Continued: Successfully Completedrequests have a green status

Page 58: Session 606: Workflow integration with non-SAP

Step 5: Workitem Notifications received inLotus with Executable Workitems attached

Page 59: Session 606: Workflow integration with non-SAP

Step 6: Opening of attachment prompts user forsignon information once

Page 60: Session 606: Workflow integration with non-SAP

The User is taken directly into the decisionstep in SAP to execute the approval usingstandard SAP Workflow Functionality

Page 61: Session 606: Workflow integration with non-SAP

Implementation Considerations

• The user only needs to log on to SAP once from Lotus via anattachment

• Initial Sign on popup can be suppressed by minor coding of a LotusApplet

• After release 4.6B RSWUWFML is end of maintenance• RSWUWFML2 replaced RSWUWFML in release 4.6C and above• For SAP 6.40 and Above use Extended Notifications.

• RSWUWFML is no longer supported in these higher releases• Notes Domino 6.0 and Outlook 2002 are the last releases where the

RSWUWFML/2 interfaces are supported• Transaction SCOT Internet Mail configuration is sufficient to send

Workflow generated notification emails to a non SAP mail server• This includes simple notifications and deadline notifications• the RSWUWFML/2 reports are not needed

Page 62: Session 606: Workflow integration with non-SAP

Helpful Notes on email Integrationwith RSWUWFML2

• 896090 : RSWUWFML2 vs RSWUWFML• 810468 : Enhancement to Mail Notification• 929393 : RSWUWFML2: Improved Logging• 627397: End of maintenance of Outlook/Lotus workflow

Page 63: Session 606: Workflow integration with non-SAP

Topics• Integration options

• Create workflow tasks for external service calls and BSP’s• Universal Worklist launch handlers• SAP NetWeaver Exchange Infrastructure Business Process Management• Wf-XML and Web Services

• Real world examples• Accessing Web Services• Integration with Lotus Notes• Extended notifications for Outlook integration

• Future• Universal Worklist API to access non-SAP tasks• Guided Procedures

Page 64: Session 606: Workflow integration with non-SAP

SAP Business Workflow

send e-mails

ExtendedNotifications

process workitem

collect workitems

Email

End user

Email client

SAP GUI or Portal UWL

Extended Notifications

NW04

Page 65: Session 606: Workflow integration with non-SAP

Feature Comparison

X---Support workitem forwarding via e-mail

X---Lists of workitems in one e-mail

X---Links to new Web UIs (WebDynpro,etc)

X---Generic decisions

X---HTML e-mail (Outlook only)

XX--Enhanced substitution handlingXX--Enhanced address determination

XX--Prefix AND suffix text (surroundingworkitem description)

XX--SAP Shortcut attachments

XXX-Deliver workitems to any e-mailclient

ExtendedNotification

s

RSWUWML2

RSWUWFMLSAP MAPIFeature

Page 66: Session 606: Workflow integration with non-SAP

SAP Note 627397

Email per work item or collection

Page 67: Session 606: Workflow integration with non-SAP

Index ofwork items

Generic Decision

ShortcutAttachmentspossible

WorkitemDescription

Shortcut links

Page 68: Session 606: Workflow integration with non-SAP

• SWN_SELSEN is the batch that has to be planned to runperiodically. You can run this directly for test purposes.

• Transaction SWNCONFIG is for advanced configuration.• Transaction SWNADMIN is for basic administration.• SAP Connect must be configured for email connectivity.

Required Configuration

Page 69: Session 606: Workflow integration with non-SAP

Topics• Integration options

• Create workflow tasks for external service calls and BSP’s• Universal Worklist launch handlers• SAP NetWeaver Exchange Infrastructure Business Process Management• Wf-XML and Web Services

• Real world examples• Accessing Web Services• Integration with Lotus Notes• Extended notifications for Outlook integration

• Future• Universal Worklist API to access non-SAP tasks• Guided Procedures

Page 70: Session 606: Workflow integration with non-SAP

Defining types

Subviews

Actions

UWL Connectors

Page 71: Session 606: Workflow integration with non-SAP

• Connecting a 3rd party provider systemUWL Service

ProviderConnector

3rd partyprovider

Java Stub

Prot

ocol

(e.g

. http

)

Enterprise Portal

AttachmentConnector

3rd partyprovider

Java Stub

Java

Stub

Prot

ocol

UWL API Architecture

Page 72: Session 606: Workflow integration with non-SAP

Development Tools & Documentation

• Documentation to get started• SAP NetWeaver Developer Studio Plugin

• Create code skeleton• JavaDoc

• RSS Tutorial + Sample Code• SAP Office Mail HowTo Guide + Sample Code

Interested? Details in SAP Note 921758.

Page 73: Session 606: Workflow integration with non-SAP

Topics• Integration options

• Create workflow tasks for external service calls and BSP’s• Universal Worklist launch handlers• SAP NetWeaver Exchange Infrastructure Business Process Management• Wf-XML and Web Services

• Real world examples• Accessing Web Services• Integration with Lotus Notes• Extended notifications for Outlook integration

• Future• Universal Worklist API to access non-SAP tasks• Guided Procedures

Page 74: Session 606: Workflow integration with non-SAP

Where guided procedures fits

Business integrity

“Best practice” processes

Packaged solutions

Custom built or composed

“Next practice” processes

Business innovation

Legacy/3rd PartyLegacy/3rd Party SAPSAP

Analytics

EnterpriseServices

Repository

SAP NetWeaverBusiness Process Platform

PlatformProcess Components

PlatformProcess Components

Composite ApplicationsComposite Applications

PartnerPartner

NW04s

Page 75: Session 606: Workflow integration with non-SAP

Guided Procedures componentsGuided Procedures

Guided Procedures Activity Gallery

enteradditional

data

Legacy FI CRM Office Email HR

sendnotification

orderequipment

assignworkplace

Business Objects and Services

Page 76: Session 606: Workflow integration with non-SAP

Best Practices

• To incorporate BSP’s and ABAP services in yourworkflow, use WF_EXTSRV

• Use Universal Worklist as a central location to access allyour tasks

• If using external WSDL files, use a Web Dynpro andUniversal Worklist launch handlers for the service call

• Integration with non-SAP workflow systems requires theexternal system to support Wf-XML 1.1

Page 77: Session 606: Workflow integration with non-SAP

Key Learnings

• When integrating non-SAP tasks with SAP Business Workflow yourmajor options include:

• WF_EXTSRV for ABAP services• WFWS for external services WSDL with simple XML schemas• Web Activity step for SOAP calls• Web Activity step for Wf-XML with non-SAP workflow systems• Universal Worklist Launch handlers to call any service or URL• UWL API should be generally available in a few months

• Options for delivery of workflow tasks:• Lotus Notes and Outlook with ABAP report• Extended Notifications on ERP2004 and beyond

• If your workflow process touches many different systems you may wantto consider Guided Procedures (NetWeaver 2004s only – ERP2005)

Page 78: Session 606: Workflow integration with non-SAP

Further Information

• How to for Extended Notifications:http://help.sap.com/saphelp_nw2004s/helpdata/en/d5/581ee8d56f1247bf34cfcd66d16d81/frameset.htm

• Universal Worklist Launch Handlers:http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/05b15de3864040a9426788a12699b3/frameset.htm

• BIT603 for use of external services• BIT430 for BPM in Exchange Infrastructure• SDN for guided procedures

Page 79: Session 606: Workflow integration with non-SAP

606Session Code:

Page 80: Session 606: Workflow integration with non-SAP

Appendix

• WF-XML sample coding Rule

Page 81: Session 606: Workflow integration with non-SAP

WF-XML: Encoding

Page 82: Session 606: Workflow integration with non-SAP

WF-XML: Decoding

Page 83: Session 606: Workflow integration with non-SAP

Appendix

• Wf-XML sample coding Rule

Page 84: Session 606: Workflow integration with non-SAP

Wf-XML: Encoding

Page 85: Session 606: Workflow integration with non-SAP

Wf-XML: Decoding