SlideShare a Scribd company logo
Developing Cross-System Workflow Applications with Wf-XML
Speaker Information Daniel J Rempe Systems Analyst, University of Nebraska Edwin Mukusha Business Technologies Lead, University of Nebraska
Learning Objectives As a result of this workshop, you will be able to: Understand the concept and syntax of Wf-XML Learn the essential steps to setup the Workflow environment for web activities Develop workflows that accomplish tasks across related systems
Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
Creating a Service Alias in transaction SICF Open path default_host/sap/bc Right click on workflow_xml and choose “New Sub-Element” Enter the name of your alias Click the radio button “Reference to an existing service”
Setting Service Parameters (1) Enter a description in the provided space Enter a userid and password for handling incoming requests Modify security settings as necessary
Setting Service Parameters (2) Find the path to the workflow_xml node as before and click on it Press the save button
Activating alias link in SICF Right click on your new alias and choose “Activate Link”
Determining HTTP Port Number and Host Name Open transaction SMICM Use the menu path Goto->Parameters->Display Find the parameter icm/server_port_ x  containing the port number for the HTTP protocol Find the parameter icm/host_name_full to determine the server’s host name
Setting handler for workflows in SWR_WEBSERVER Enter your hostname and port as a URL in the web server address box Enter the path to your SICF service, which should be SAP/BC/ WORKFLOW_XML/ Alias Name /?  Test the URL by pressing the button next to the URL at the bottom
Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
Container interface for remote workflow You will need to be familiar with the container elements in the workflow you are calling
Remote workflow template The remote workflow in this example will wait ten seconds before changing the value of a return element It is necessary that some processing time occur for the document interchange  to be successful
Container interface for reference workflow The reference workflow is a template in the calling system that refers to the remote workflow Elements which need to be exchanged with the remote workflow must share the same definition in the reference workflow
Reference Workflow Template It is not necessary that the reference workflow contain any steps Any steps included in the reference template will not actually be run on the calling system
Creating the Calling Workflow
Creating a Web Activity The web activity contains a URL that calls a workflow on another system Transfer Format indicates the specification used to exchange information between systems “ Wait For Feedback”, when checked, will cause the calling workflow to wait until the remote workflow finishes before it completes
Using the URL Wizard The URL wizard generates a URL for calling the remote system based on the information you enter
Adding an alias to the URL The wizard will not add your alias name from SICF to the generated URL. For instance, in this link:  HTTP://uncsuns.nebraska.edu:8199/SAP/BC/WORKFLOW_XML/?~localkey=WS91000004 The alias needs to be added in this manner:  HTTP://.....WORKFLOW_XML/ WF_XML_ALIAS /?~localkey.....
Adding the Reference Workflow Add the reference workflow created earlier in the provided space Binding elements to the reference workflow is done on the Call tab
Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
Viewing progress in the Workflow Log The remote workflow’s overall progress will be shown if the Wait For Feedback box was checked on the calling system Specific steps within the remote workflow are not shown
Viewing XML files with transaction SWXML Transaction SWXML provides a report of Wf-XML documents sent or received by the system The report organizes groups of documents by Work Item ID
Wf-XML documents are stored using the SAP Business Document Service OAOR does not allow selection by date/time as SWXML does View documents in transaction OAOR (BDS)
Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
Wf-XML is a standard published by the Workflow Management Coalition to enable interoperability between systems that use Workflow This presentation uses version 1.1 of the Wf-XML standard.  The full specification of this standard can be downloaded at: http://www.wfmc.org/standards/docs/Wf-XML-11.pdf The Wf-XML version is specified while creating the Web Activity step in the Workflow Builder Wf-XML Specification
This process shows a two-way communication process between systems A Request is made by the initiating system, which is immediately acknowledged by a Response from the receiving system The receiving system sends its own Request upon completing its task, which is acknowledged by a Response from the initiator System Interaction Source:  http://www.wfmc.org/standards/docs/Wf-XML-11.pdf
A CreateProcessInstance interchange is initiated when instructing a remote system to perform a particular workflow task A ProcessInstanceStateChanged interchange is done whenever the state of the remote workflow changes (for example, when it is complete) System Interaction (2) Source:  http://www.wfmc.org/standards/docs/Wf-XML-11.pdf
This is a CreateProcessInstance.Request document.  It was automatically generated by the Workflow system in the previous example CreateProcessInstance - Request
This is a CreateProcessInstance.Response document.  It is returned immediately from the called system in acknowledgement of the Request document CreateProcessInstance - Response The MIME type of the returned document MUST BE  text/xml .  Any other type will cause the originating workflow to end in error
ProcessInstanceStateChanged
Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
In this example, an Apache web server runs a Perl script at a given URL which responds with a Wf-XML document Interfacing With Foreign Systems #!c:/perl/bin/Perl.exe ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); print &quot;Content-type: text/xml\n\n&quot;; print &quot;<?xml version=\&quot;1.0\&quot; encoding=\&quot;ISO-8859-1\&quot; ?>\n&quot;;  print &quot;  <WfMessage xmlns=\&quot;http://www.wmfc.org/standards/docs/Wf-XML\&quot; Version=\&quot;1.1\&quot;>\n&quot;; print &quot;  <WfMessageHeader>\n&quot;; print &quot;  <Response />\n&quot;; print &quot;  <Key>Apache Transaction - Free Text 1</Key>\n&quot;; print &quot;  </WfMessageHeader>\n&quot;; print &quot;  <WfMessageBody>\n&quot;; print &quot;  <CreateProcessInstance.Response>\n&quot;; print &quot;  <ProcessInstanceKey>Apache Transaction - Free Text 2</ProcessInstanceKey>\n&quot;; print &quot;  <ContextData>\n&quot;; print &quot;  <Name>Date</Name><Value>$mon/$mday/$year</Value>\n&quot;; print &quot;  <Name>Time</Name><Value>$hour:$min:$sec</Value>\n&quot;; print &quot;  <Return>\n&quot;; print &quot;  <Success />\n&quot;; print &quot;  <Message>\n&quot;; print &quot;  <Number>ZH999</Number>\n&quot;; print &quot;  <Text>&amp; &amp; &amp; &amp;</Text>\n&quot;; print &quot;  <V1>The method was executed successfully</V1>\n&quot;; print &quot;  </Message>\n&quot;; print &quot;  </Return>\n&quot;;
Here, a Lotus Notes server runs an agent which attempts to create a calendar entry document before returning a Wf-XML document The document returned is dependent upon whether the agent was able to accomplish its task Interfacing With Foreign Systems (2) public class JavaAgent extends AgentBase { public void NotesMain() { try { ... creating calendar entry in Notes printXMLDocument(notes_doc.getUniversalID()); } catch(NotesException e) { createErrorDocument(e.text, 1); } }
Interfacing With Foreign Systems (3) private void createErrorDocument(String msg, int type) { try { notes_doc = sapleave_db.createDocument(); notes_doc.replaceItemValue(&quot;Form&quot;, &quot;Incoming&quot;); notes_doc.replaceItemValue(&quot;Error&quot;, new Integer(type)); notes_doc.save(); printXMLDocument(notes_doc.getUniversalID()); } catch (NotesException ex) { ex.printStackTrace(); }  } private void printXMLDocument(String id) { try { pw.println(&quot;Content-type: text/xml&quot;); pw.println(&quot;<?xml version=\&quot;1.0\&quot; encoding=\&quot;ISO-8859-1\&quot; ?>&quot;);  pw.println(&quot;<WfMessage xmlns=\&quot;http://www.wmfc.org/standards/docs/Wf-XML\&quot; Version=\&quot;1.1\&quot;>&quot;); pw.println(&quot;<WfMessageBody>&quot;); … . Context Data of Response Document pw.println(&quot;</WfMessageBody>&quot;); pw.println(&quot;</WfMessage>&quot;); } catch (Exception ex) { ex.printStackTrace(); }  }
Summary Wf-XML enables systems to communicate and manage wokflow tasks using a standard XML-based syntax SAP’s Workflow Builder automatically handles the specifics of Wf-XML interaction using the Workflow Container and the  Business Document Service The SAP Workflow runtime environment provides interfaces for administration and troubleshooting of remote workflow tasks Non-SAP systems can easily communicate with R/3 systems using the same document structure
Transaction Reference 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. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.  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. Copyright 2006 SAP AG. All Rights Reserved

More Related Content

ZIP
ASP.Net Presentation Part1
PPT
Asp.net tips
PPT
R12 d49656 gc10-apps dba 23
PPT
Server Controls of ASP.Net
PPT
R12 d49656 gc10-apps dba 26
PDF
Create Home Directories on Storage Using WFA and ServiceNow integration
PPTX
SSIS : Ftp and script task
PPTX
Debugging a Production Issue
ASP.Net Presentation Part1
Asp.net tips
R12 d49656 gc10-apps dba 23
Server Controls of ASP.Net
R12 d49656 gc10-apps dba 26
Create Home Directories on Storage Using WFA and ServiceNow integration
SSIS : Ftp and script task
Debugging a Production Issue

Viewers also liked (20)

PDF
Russo Revelation on Mad Men Vol 1.7
PPS
數位學院:好事吸引力
PDF
Global Climatic Change - Engineers Perspective
PPT
Pel1
PDF
Security Storage Containers
PPT
Opdracht Informatica
ODP
Dexma project plm
PDF
Px09683
PPT
Online Reputation Management
PPT
Slide Share Thin2
PPTX
Experiências de aprendizagem aberta, flexível e a distância para a 4ª revoluç...
PPT
Fav’ Pix Of The Week
PPT
Increase Adwords Profits
PPT
Are We There Yet
PPT
I Formation Offense
PPT
Pistol Offense
PPT
Apres Resultados 4 T07 Eng Final
PPT
Fball Brophy Urban Meyer Spread
PDF
Pronk like you mean it
PDF
Kshitij Jewels Fashion Earrings
Russo Revelation on Mad Men Vol 1.7
數位學院:好事吸引力
Global Climatic Change - Engineers Perspective
Pel1
Security Storage Containers
Opdracht Informatica
Dexma project plm
Px09683
Online Reputation Management
Slide Share Thin2
Experiências de aprendizagem aberta, flexível e a distância para a 4ª revoluç...
Fav’ Pix Of The Week
Increase Adwords Profits
Are We There Yet
I Formation Offense
Pistol Offense
Apres Resultados 4 T07 Eng Final
Fball Brophy Urban Meyer Spread
Pronk like you mean it
Kshitij Jewels Fashion Earrings
Ad

Similar to Sap Tech Ed06 Asug Wf (20)

PDF
Workflow Yapceu2010
PDF
CASE-4 Automating Business Processes in Denver: A Technical Case Study
PPT
]project-open[ Workflow Developer Tutorial Part 2
PDF
2001 09 ma,ma b2 b process integration tutorial
PDF
2000 09 dh,mm,mts,mz m (xml world 2000) wf-xml tutorial
PDF
Connected Applications using WF and WCF
PDF
Pdf mbs workflow
PPT
About work flow
PPT
]project-open[ Workflow Developer Tutorial Part 3
PPT
The cornerstones of SAP workflow
PDF
Ind twss-pdf
PDF
USP presentation of CHOReOS @ FISL Conference
PPT
07 b 01workflowdefinition
ODP
XPages is Workflow's new best friend
PDF
Workflow Workshop 2012 Sep Leucir Marin
PPT
Business workflow
PDF
Better Open Source Enterprise C++ Web Services
PDF
2006 mm,ks,jb (miami, florida bpm summit) xpdl tutorial
PDF
Bpf Workflow
ODT
Workflow Usage Best Practices
Workflow Yapceu2010
CASE-4 Automating Business Processes in Denver: A Technical Case Study
]project-open[ Workflow Developer Tutorial Part 2
2001 09 ma,ma b2 b process integration tutorial
2000 09 dh,mm,mts,mz m (xml world 2000) wf-xml tutorial
Connected Applications using WF and WCF
Pdf mbs workflow
About work flow
]project-open[ Workflow Developer Tutorial Part 3
The cornerstones of SAP workflow
Ind twss-pdf
USP presentation of CHOReOS @ FISL Conference
07 b 01workflowdefinition
XPages is Workflow's new best friend
Workflow Workshop 2012 Sep Leucir Marin
Business workflow
Better Open Source Enterprise C++ Web Services
2006 mm,ks,jb (miami, florida bpm summit) xpdl tutorial
Bpf Workflow
Workflow Usage Best Practices
Ad

More from Keith Swenson (20)

PDF
Finding documents in Cognoscenti
PDF
mcetech2015
PDF
mri-bp2015
PDF
BPM2014
PDF
Adaptive Case Management Workshop 2014 - Keynote
PDF
Seven Domains of Predictability - BPMCM 2014
PPTX
2014 bpm next_slide_share
PDF
OpenID Protocol Explained
PDF
New Tools: ACM for Human Resources
PDF
EDOC2013
PDF
Seven Domains of Predictability
PPTX
Smart Process Apps on Interstage BOP
PDF
BPMNext 2013 Swenson
PPTX
Position paperpresentation
PPTX
PEHRS Presentation on ACM
PPT
Taming The Unpredictable: Real-World Adaptive Case Management
PPT
Figures for Mastering the Unpredictable
PPT
The Nature of Knowledge Work
PPT
Large-Scale Federated BPM / Workflow
PPT
BPM Model Preserving Strategy vs. Model Transforming Strategy
Finding documents in Cognoscenti
mcetech2015
mri-bp2015
BPM2014
Adaptive Case Management Workshop 2014 - Keynote
Seven Domains of Predictability - BPMCM 2014
2014 bpm next_slide_share
OpenID Protocol Explained
New Tools: ACM for Human Resources
EDOC2013
Seven Domains of Predictability
Smart Process Apps on Interstage BOP
BPMNext 2013 Swenson
Position paperpresentation
PEHRS Presentation on ACM
Taming The Unpredictable: Real-World Adaptive Case Management
Figures for Mastering the Unpredictable
The Nature of Knowledge Work
Large-Scale Federated BPM / Workflow
BPM Model Preserving Strategy vs. Model Transforming Strategy

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
cuic standard and advanced reporting.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Electronic commerce courselecture one. Pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Approach and Philosophy of On baking technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
Teaching material agriculture food technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Empathic Computing: Creating Shared Understanding
PPTX
A Presentation on Artificial Intelligence
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Modernizing your data center with Dell and AMD
cuic standard and advanced reporting.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Electronic commerce courselecture one. Pdf
NewMind AI Monthly Chronicles - July 2025
Dropbox Q2 2025 Financial Results & Investor Presentation
Approach and Philosophy of On baking technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Teaching material agriculture food technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
20250228 LYD VKU AI Blended-Learning.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
MYSQL Presentation for SQL database connectivity
Empathic Computing: Creating Shared Understanding
A Presentation on Artificial Intelligence

Sap Tech Ed06 Asug Wf

  • 1. Developing Cross-System Workflow Applications with Wf-XML
  • 2. Speaker Information Daniel J Rempe Systems Analyst, University of Nebraska Edwin Mukusha Business Technologies Lead, University of Nebraska
  • 3. Learning Objectives As a result of this workshop, you will be able to: Understand the concept and syntax of Wf-XML Learn the essential steps to setup the Workflow environment for web activities Develop workflows that accomplish tasks across related systems
  • 4. Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
  • 5. Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
  • 6. Creating a Service Alias in transaction SICF Open path default_host/sap/bc Right click on workflow_xml and choose “New Sub-Element” Enter the name of your alias Click the radio button “Reference to an existing service”
  • 7. Setting Service Parameters (1) Enter a description in the provided space Enter a userid and password for handling incoming requests Modify security settings as necessary
  • 8. Setting Service Parameters (2) Find the path to the workflow_xml node as before and click on it Press the save button
  • 9. Activating alias link in SICF Right click on your new alias and choose “Activate Link”
  • 10. Determining HTTP Port Number and Host Name Open transaction SMICM Use the menu path Goto->Parameters->Display Find the parameter icm/server_port_ x containing the port number for the HTTP protocol Find the parameter icm/host_name_full to determine the server’s host name
  • 11. Setting handler for workflows in SWR_WEBSERVER Enter your hostname and port as a URL in the web server address box Enter the path to your SICF service, which should be SAP/BC/ WORKFLOW_XML/ Alias Name /? Test the URL by pressing the button next to the URL at the bottom
  • 12. Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
  • 13. Container interface for remote workflow You will need to be familiar with the container elements in the workflow you are calling
  • 14. Remote workflow template The remote workflow in this example will wait ten seconds before changing the value of a return element It is necessary that some processing time occur for the document interchange to be successful
  • 15. Container interface for reference workflow The reference workflow is a template in the calling system that refers to the remote workflow Elements which need to be exchanged with the remote workflow must share the same definition in the reference workflow
  • 16. Reference Workflow Template It is not necessary that the reference workflow contain any steps Any steps included in the reference template will not actually be run on the calling system
  • 18. Creating a Web Activity The web activity contains a URL that calls a workflow on another system Transfer Format indicates the specification used to exchange information between systems “ Wait For Feedback”, when checked, will cause the calling workflow to wait until the remote workflow finishes before it completes
  • 19. Using the URL Wizard The URL wizard generates a URL for calling the remote system based on the information you enter
  • 20. Adding an alias to the URL The wizard will not add your alias name from SICF to the generated URL. For instance, in this link: HTTP://uncsuns.nebraska.edu:8199/SAP/BC/WORKFLOW_XML/?~localkey=WS91000004 The alias needs to be added in this manner: HTTP://.....WORKFLOW_XML/ WF_XML_ALIAS /?~localkey.....
  • 21. Adding the Reference Workflow Add the reference workflow created earlier in the provided space Binding elements to the reference workflow is done on the Call tab
  • 22. Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
  • 23. Viewing progress in the Workflow Log The remote workflow’s overall progress will be shown if the Wait For Feedback box was checked on the calling system Specific steps within the remote workflow are not shown
  • 24. Viewing XML files with transaction SWXML Transaction SWXML provides a report of Wf-XML documents sent or received by the system The report organizes groups of documents by Work Item ID
  • 25. Wf-XML documents are stored using the SAP Business Document Service OAOR does not allow selection by date/time as SWXML does View documents in transaction OAOR (BDS)
  • 26. Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
  • 27. Wf-XML is a standard published by the Workflow Management Coalition to enable interoperability between systems that use Workflow This presentation uses version 1.1 of the Wf-XML standard. The full specification of this standard can be downloaded at: http://www.wfmc.org/standards/docs/Wf-XML-11.pdf The Wf-XML version is specified while creating the Web Activity step in the Workflow Builder Wf-XML Specification
  • 28. This process shows a two-way communication process between systems A Request is made by the initiating system, which is immediately acknowledged by a Response from the receiving system The receiving system sends its own Request upon completing its task, which is acknowledged by a Response from the initiator System Interaction Source: http://www.wfmc.org/standards/docs/Wf-XML-11.pdf
  • 29. A CreateProcessInstance interchange is initiated when instructing a remote system to perform a particular workflow task A ProcessInstanceStateChanged interchange is done whenever the state of the remote workflow changes (for example, when it is complete) System Interaction (2) Source: http://www.wfmc.org/standards/docs/Wf-XML-11.pdf
  • 30. This is a CreateProcessInstance.Request document. It was automatically generated by the Workflow system in the previous example CreateProcessInstance - Request
  • 31. This is a CreateProcessInstance.Response document. It is returned immediately from the called system in acknowledgement of the Request document CreateProcessInstance - Response The MIME type of the returned document MUST BE text/xml . Any other type will cause the originating workflow to end in error
  • 33. Server Configuration Workflow Setup Wf-XML At Run Time Wf-XML Document Overview Communicating With Non-SAP Systems
  • 34. In this example, an Apache web server runs a Perl script at a given URL which responds with a Wf-XML document Interfacing With Foreign Systems #!c:/perl/bin/Perl.exe ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); print &quot;Content-type: text/xml\n\n&quot;; print &quot;<?xml version=\&quot;1.0\&quot; encoding=\&quot;ISO-8859-1\&quot; ?>\n&quot;; print &quot; <WfMessage xmlns=\&quot;http://www.wmfc.org/standards/docs/Wf-XML\&quot; Version=\&quot;1.1\&quot;>\n&quot;; print &quot; <WfMessageHeader>\n&quot;; print &quot; <Response />\n&quot;; print &quot; <Key>Apache Transaction - Free Text 1</Key>\n&quot;; print &quot; </WfMessageHeader>\n&quot;; print &quot; <WfMessageBody>\n&quot;; print &quot; <CreateProcessInstance.Response>\n&quot;; print &quot; <ProcessInstanceKey>Apache Transaction - Free Text 2</ProcessInstanceKey>\n&quot;; print &quot; <ContextData>\n&quot;; print &quot; <Name>Date</Name><Value>$mon/$mday/$year</Value>\n&quot;; print &quot; <Name>Time</Name><Value>$hour:$min:$sec</Value>\n&quot;; print &quot; <Return>\n&quot;; print &quot; <Success />\n&quot;; print &quot; <Message>\n&quot;; print &quot; <Number>ZH999</Number>\n&quot;; print &quot; <Text>&amp; &amp; &amp; &amp;</Text>\n&quot;; print &quot; <V1>The method was executed successfully</V1>\n&quot;; print &quot; </Message>\n&quot;; print &quot; </Return>\n&quot;;
  • 35. Here, a Lotus Notes server runs an agent which attempts to create a calendar entry document before returning a Wf-XML document The document returned is dependent upon whether the agent was able to accomplish its task Interfacing With Foreign Systems (2) public class JavaAgent extends AgentBase { public void NotesMain() { try { ... creating calendar entry in Notes printXMLDocument(notes_doc.getUniversalID()); } catch(NotesException e) { createErrorDocument(e.text, 1); } }
  • 36. Interfacing With Foreign Systems (3) private void createErrorDocument(String msg, int type) { try { notes_doc = sapleave_db.createDocument(); notes_doc.replaceItemValue(&quot;Form&quot;, &quot;Incoming&quot;); notes_doc.replaceItemValue(&quot;Error&quot;, new Integer(type)); notes_doc.save(); printXMLDocument(notes_doc.getUniversalID()); } catch (NotesException ex) { ex.printStackTrace(); } } private void printXMLDocument(String id) { try { pw.println(&quot;Content-type: text/xml&quot;); pw.println(&quot;<?xml version=\&quot;1.0\&quot; encoding=\&quot;ISO-8859-1\&quot; ?>&quot;); pw.println(&quot;<WfMessage xmlns=\&quot;http://www.wmfc.org/standards/docs/Wf-XML\&quot; Version=\&quot;1.1\&quot;>&quot;); pw.println(&quot;<WfMessageBody>&quot;); … . Context Data of Response Document pw.println(&quot;</WfMessageBody>&quot;); pw.println(&quot;</WfMessage>&quot;); } catch (Exception ex) { ex.printStackTrace(); } }
  • 37. Summary Wf-XML enables systems to communicate and manage wokflow tasks using a standard XML-based syntax SAP’s Workflow Builder automatically handles the specifics of Wf-XML interaction using the Workflow Container and the Business Document Service The SAP Workflow runtime environment provides interfaces for administration and troubleshooting of remote workflow tasks Non-SAP systems can easily communicate with R/3 systems using the same document structure
  • 38. Transaction Reference 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
  • 39. 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
  • 40. THANK YOU FOR YOUR ATTENTION ! QUESTIONS – SUGGESTIONS – DISCUSSION
  • 41. Feedback Please complete your session evaluation. Be courteous — deposit your trash, and do not take the handouts for the following session. Thank You !
  • 42. 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. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. 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. Copyright 2006 SAP AG. All Rights Reserved

Editor's Notes

  • #8: 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.
  • #12: 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.
  • #15: If a workflow finishes almost instantaneously, the document interchange may become confused, which will result in error.
  • #16: Without the reference workflow, you would have no context for binding the local workflow to the remote workflow.
  • #17: Creating the reference workflow ahead of time may save you some trouble later when creating a web activity to call a remote system.
  • #18: 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.
  • #19: 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.
  • #20: 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.
  • #25: 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.
  • #26: 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.
  • #28: Different versions of Wf-XML may be used. The standard specifications are also available at http://www.wfmc.org.
  • #31: 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.
  • #32: 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
  • #33: 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.
  • #35: 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.