In this example, we’ve used a dialog user. It needs to be pointed out that a Communications user is actually the ideal type of user for this application, since they can not log in as a dialog user can.
This step needs to be done in both systems to enable communication. The called system will need to be able to create XML documents in the calling system through this service.
If a workflow finishes almost instantaneously, the document interchange may become confused, which will result in error.
Without the reference workflow, you would have no context for binding the local workflow to the remote workflow.
Creating the reference workflow ahead of time may save you some trouble later when creating a web activity to call a remote system.
The calling workflow is an entirely different template than the reference workflow. It will use the reference workflow interface to exchange elements with the remote system.
The transfer format may be one of several versions of Wf-XML, as well as one or two other encoding schemes. Note on extra dialog: this dialog allows you to create your reference workflow on the fly, but it can cause issues with object locking. It also may be difficult to adjust the container interface and/or activate the newly created reference workflow if it is created here. It is much easier to create the reference workflow first, in a separate step, as we have done in our example.
The hostname and port number were entered in the remote system in transaction SWR_WEBSERVER. The workflow template number is the number from the REMOTE system. This needs to be differentiated from the reference workflow number, which will be entered in a different location a couple of slides later.
Two sets of documents are created if the “Wait For Feedback” box was checked in the Workflow Builder. Only one set of documents is necessarily created in the other instance (the CreateProcessInstance.request set). The second set indicates that the remote workflow has finished, which is only useful if you have instructed your calling workflow to wait for this information.
Mention work item ID at left side again. This transaction can be reached (for individual documents) by double clicking in SWXML. Mention needs to be made about error processing; specifically that it is done through the workflow log, where you can automatically navigate to this transaction.
Different versions of Wf-XML may be used. The standard specifications are also available at http://www.wfmc.org.
The header section contains the URL of the called system. The body’s ObserverKey section contains the callback URL which will be used in the ProcessInstanceStateChanged interchange. The ContextData section, according to the spec, is completely free form. SAP, when generating documents, uses the above format for passing elements bound to the reference workflow’s container.
The immediacy of the response should be stressed, as in: the data returned from the HTTP request made with the originating document must actually contain the response document. Any other data returned immediately by the remote server will result in error. The MIME type is only of concern when dealing with Non-SAP systems. SAP’s Workflow environment will automatically generate documents of the correct type
REQUEST DOCUMENT: The state that is passed informs the calling system of the current state of the remote workflow. The remote workflow will export container elements in its “ResultData” section (corresponding with the ContextData section in the previous slides). RESPONSE DOCUMENT: Returned immediately by the calling system, similarly to the process in the previous slides.
Any language could be used on the web server in the example, as long as it immediately returns a proper Wf-XML document. In this example, a background process is not launched by the script, but there is no reason it couldn’t run some background programs that send a ProcessInstanceStateChanged document back to the R/3 system upon completion.
Developing Cross-System Workflow Applications with Wf-XML
SICF – HTTP Service Hierarchy Maintenance (setup of workflow_xml node)
SWR_WEBSERVER – Setup of web server callback URL
SWXML – Selection Report for XML Documents
OAOR – Business Document Navigator
Further Information Public Web: http://www.wfmc.org – Workflow Management Coalition www.sdn.sap.com - SAP Developers‘ Network Related Workshops/Lectures at SAP TechEd ’05 EPI104 – Interoperability SAP NetWeaver–IBM WebSphere, Lotus, and Tivoli EPI200 - ASUG Workflow/Webflow SIG Community: Tips, Tricks and Information Sharing Session Americas’ SAP Users’ Group (ASUG) www.asug.com
THANK YOU FOR YOUR ATTENTION ! QUESTIONS – SUGGESTIONS – DISCUSSION
Feedback Please complete your session evaluation. Be courteous — deposit your trash, and do not take the handouts for the following session. Thank You !
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
MaxDB is a trademark of MySQL AB, Sweden.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG.
This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies, developments, and functionalities of the SAP ® product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice.
SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.
SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence.
The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.