Upload
anonymous-sg5usnze
View
218
Download
2
Embed Size (px)
DESCRIPTION
01 combining integration processes with human capital
Citation preview
1
Combining Integration Processes with Human Workflows
Author: Alan Rickayzen
2
Cookbook for Integration
Summary
Overview
The Problems to Solve
3
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Process Integration in NetWeaver ‚04
Within SAP NetWeaver, separate tools are used to define Integration Processes and Human Workflow Processes
Integration Processes are:Message-basedInterface-focused Inter-Application (Cross-Component)Have no support for human interactionEnabled with SAP XI
Human Workflow Processes are:Object-BasedHuman-focusedIntra-applicationHave no support for Mapping, Routing or message transformationsEnabled with the SAP Web AS
However, most automated business processes involve a combination of the two.
4
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
SAP NetWeaver™PEOPLE
Multi channel accessPortalCollaboration
INFORMATION
PROCESS
Integration BrokerBusiness Process Mgmt
APPLICATION
Knowledge MgmtBusiness IntelligenceMaster Data Mgmt
J2EEABAPDB and OS Abstraction
Business Process Management
BPM in SAP NetWeaver ‘04
UWL
SAP BI
ERP CRM SRM 3rd partyWMS
3rd partyERP
SAP EP
= Adapter
Ad-hoc Workflow
Cross-Component BPMSAP XI
SAP Business Workflow
m
w
m
m = Message/ Documentw = Workitem
Intra-ApplicationProcess Automation
Human InteractionCollaboration
Inter-ApplicationProcess Automation
m
alert
This shows how the different engines unite to automate a sophisticated businessprocess.
5
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Ad Hoc Enhancements and the Universal Worklist
Once the human workflow has been triggered, work items will appear in the Universal Worklist
The user can then design and initiate Ad Hoc Workflows, which supplement the standard business process for example by:
Requesting additional information from expert colleaguesPolling opinionsGetting additional managerial support/consent
To achieve this, no additional modeling in the XI process or Business Process is required.
The Universal Inbox and the Ad Hoc Workflow are enabled with SAPEnterprise Portal
6
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Short Excursion: Universal Worklist (UWL)
This provides the integration between Ad Hoc Workflow andSAP Business Workflow
Business Workflow
Ad HocWorkflow
What follows is a description of the new EP 6 Release of the Universal Worklist
The right hand column is not normally configured to display, but it makes it clearthat different backend components are supported and the workitems are displayedin one list.
The tab register at the top of the inbox allows you to see thetasks that you have to perform, as well as
notifications (e.g. deadline notifications from Business Workflow),
requests (workflows that you have started)
tasks you have completed (equivalent to an outbox)
completed requests (completed workflows that you have triggered)
Alerts can be displayed in the UWL, together with workitems from the SAP Business Workflowand Ad Hoc Workflow.
The users can also track what has happened to the processes that they participated in orinstigated.
7
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Complete Business Process Automation
To automate the complete business process you will want to make use of the different workflow engines. There is clearly an overlap in how much of the business process takes place in one engine or the other and this needs to be decided on at the beginning of the project.
Considerations:TCO/Versus SimplicityAggregating the complete process into as few as possible sub-processes spread around the different engines will make the modeling simple and flexible. But if the strengths of any one tool are not utilized the total cost of ownership will be high.Process TransparencyThe more distributed sub-processes involved in the complete process, the less overall process transparency will be achieved.Build-in-advance versus handle-on-the-spotException handling is one of the most dynamic parts of the process. Initially, ad hoc workflow can be used to handle the exceptions migrating to standard workflows for the commonest exceptions later.
TCO/Versus Simplicity. If many components are involved, the emphasis will be on a central SAP XI cross-component process handling the process integration spawning separate local workflows for the human interaction.Alternatively, if the lions share of the process is mainly human-task oriented, then the human workflow will take the driving seat and spawn small cross-component processes to handle the integration with other components.
8
Overview
The Problems to Solve
Cookbook for Integration
Summary
9
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
The Problem to Solve
Combining Process Integration with Human Workflow is requires merging the message-oriented approach of SAP XI with the Object-Orientated approach of SAP Business Workflow.
Hurdle 1: How do you correlate a message, with a payload consisting of raw data tags to a single instance of a business object? (Integration Process-> Workflow)
Hurdle 2: How do you convert a business object consisting of a virtually infinite tree of data attributes to a single message? (Workflow -> Integration Process)
Any user can create their Ad hoc workflows through the UniversalWorklist so no development work is required to enable this.
WorkflowIntegration Process
The symbols at the bottom of the page represent a message and a business object instance respectively
10
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Hurdle 1: Transferring data from SAP XI to the workflow
Three best-practice mechanisms to leap this hurdle (and one that is not practical):
1. Determine a unique object key from a message tag and trigger the workflow
2. Send the object key to the system and allow the application to trigger a human workflow indirectly via an event
3. Convert the message data to workflow container data and use the workflow to manipulate forms instead of business objects
4. Trigger the workflow directly with a Wf-XML message (not suitable)Wf-XML version 1.1 is supported by SAP Business Workflow but there is no adaptor available for creating such messages with SAP XI This is not a viable solution and won’t be described in the following slides.
Mechanism one is described in the lighthouse scenario cookbook.
Wf-XML is an open interface for process to process integration from the Workflow Management Coalition.
11
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Mechanism 1: Determine a unique object key
Method:Use the XI mapping to determine the business object key from themessage and generate a new message which is sent to the destination component to trigger a workflow based on this business objectThis can be done by coding this into the proxy itself or by using mapping within XI to determine the object key.
Object key
XI Application
12
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Mechanism 1: Determine a unique object key
Advantage: Simple to implement.Error-handling (such as when the tag is missing) can be handled withint XI
DisadvantageThe problem is that the ccBPM process assumes that the message will be routed to a component where the business object exists. This will only be the case when there is very static routing.A representation of the object must exist and the instance itself must reside in the workflow component. Often there is no business object representation of the message data. I.e. Forms processing is required rather than business object methods.
This scenario will be the exception rather than the rule.
Object key
The ccBPM process transmits a message containing the data for an event to betriggered. A proxy receives the message and triggers the corresponding eventusing the function module (API) SAP_WAPI_CREATE_EVENT orSAP_WAPI_START_WORKFLOW. The event method is preferable becausedifferent workflows can be switched on and off via the event linkage in thecomponent without touching the XI server.
The data passed to the API is the object type, event name, object key and ifnecessary a container containing supplementary information.
Data is returned to the XI process via a step in the workflow or via a destructormethod.
Note: The transfer mechanism is can be done via a proxy when the component is6.20+. In earlier releases the RFC adaptor can be used. **NEW**
This is described in detail in the lighthouse cookbook.
13
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Mechanism 2: Trigger a human workflow indirectly
Method: Send the object status to the system and allow the application to trigger a human workflow indirectlyThe workflow can be triggered via standard component customizingsuch as status/change-document workflow triggering.
ApplicationEvent
Data Message
XI Application
14
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Mechanism 2: Trigger a human workflow indirectly
Advantage:No special development necessary and no customizing in XI.Different components can follow their own policies. E.g. one could choose to trigger a workflow whereas another could handle the scenario with custom transactions.
DisadvantageThe process loses transparency
In terms of adaptability and agility this is better than mechanism 1.
ApplicationEventData Message
No custom coding necessarily unless.
Feedback to XI is achieved by a response from the workflow which XI correlates to the original process.
15
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Mechanism 3a: Send the message data to a workflow
Method:Convert the message data to workflow container data and use the workflow to manipulate forms instead of business objectsThe data is transferred from XI via a proxy which calls an API to start the workflow directly.This is pure process-to-process implementation. The workflow can use forms to process the data.
Data Message
XI Application
16
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Mechanism 3b: Send the message data to a workflow
Variation of this Method:Write the message data to a database cluster and access it via your own business object which you have developed yourself.The data is transferred from XI via a proxy which transfers the data to the cluster and then calls an API to start the workflow directly.The workflow can access the data via the object that you have created and after the workflow finishes the database entry can be deleted.
Data Message
XI Application
17
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Mechanism 3: Send the message data to a workflow
Advantage:There is no need to correlate the data to a business object. The data can be processed independently. Process transparency is retained.Variation 3b allows complex data structures to be accessed in the workflow.
Disadvantage:Workflow performance suffers if a lot of data is carried in the container (variation 3b avoids this by storing the data locally) .Forms-processing in workflow is not optimized for the Web. Development work is required for web-based forms (e.g. WebDynpro, HTML forms, Webflow services).Standard applications and transactions cannot be used so more development effort is required (particularly 3b).
This is the preferred method for starting a workflow from SAP XI.
Data Message
18
Cookbook for Integration
Overview
The Problems to Solve
Summary
19
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Detail: Send the message data to a workflow
Skills required: ABAP, SAP Business Workflow, XI
Steps (following the mechanism 3 or the previous section):1. Generate a Proxy in the workflow component (this generates an ABAP
function module which can then be edited. If the workflow component is based on a release earlier than Web AS 6.20 then use the RFC Adaptor instead.
2. Develop a short routine that fills a workflow container and triggers the workflow. 1. SAP_WAPI_START_WORKFLOW (variation a uses a local object)2. SAP_WAPI_CREATE_EVENT (variation b uses an event)
3. Develop the forms and the workflow.
1. Note: If you are using simple forms you may have to use the function SWW_WI_START_SIMPLE instead of the preferred SAP_WAPI_START_WORKFLOW API so that a structure container element can be passed to the workflow. If you are using another forms technique (e.g. Adobe via WebDynpro or ITS HTML forms) then you should use the standard API.
Notice that the workflow is not triggered via an event because there is no underlying business object. A generic event (e.g. forms created) is difficult to maintain because each forms scenario would need a different interface or a special mechanism for collecting the different data structures relating to different forms.
The simple form technique is used for the IDES demonstration of ccBPM/Workflow integration.
SAP_WAPI_START_WORKFLOW is the standard API for starting workflows and this can be used if you. However, simple forms require a cannot be used because structures cannot be passed via this API. If you are starting a workflow based on simple forms (which require a structure to be passed, then use SWW_WI_START_SIMPLE
Example code to trigger the workflow
method Z_ORDERWFTRIGGER_INB~EXECUTE_ASYNCHRONOUS .
20
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Transferring data back to SAP XI
No business object is involved and only the forms data needs to be transferred back to SAP XI.
Create a final step in the workflow to call the proxy and return the results to SAP XI
CALL METHOD ZMyProxy=>EXECUTE_ASYNCHRONOUSEXPORTING
OUTPUT = output
Here is an example of the method:
method PUSH_ORDER_STATUS .data: output type ZWFWFDTYPE_MSG,
obj type ref to ZWFCO_ORDERWFTRIGGER_OUT,
lo_sys_exception TYPE REF TO cx_ai_system_fault,lo_async_messaging TYPE REF TO if_wsprotocol_async_messaging.
output-WFDTYPE_MSG-PRIORITY = sales_order-priority.output-WFDTYPE_MSG-net_value = sales_order-net_value.output-WFDTYPE_MSG-transdescription1 = sales_order-transdescription1.output-WFDTYPE_MSG-transdescription2 = sales_order-transdescription2.output-WFDTYPE_MSG-soldtoparty1 = sales_order-soldtoparty1.output-WFDTYPE_MSG-soldtoparty2 = sales_order-soldtoparty2.
CREATE OBJECT OBJ.
lo_async_messaging ?= lo_clientProxy->get_protocol( if_wsprotocol=>async_messaging ).
lo_async_messaging->set_serialization_context(‘EG_MY_QUEUE_ID').
TRY.CALL METHOD ZWFCO_ORDERWFTRIGGER_OUT=>EXECUTE_ASYNCHRONOUS
EXPORTINGOUTPUT = output
.CATCH CX_AI_SYSTEM_FAULT INTO lo_sys_exception.
ENDTRY.
21
Cookbook for Integration
Summary
Overview
The Problems to Solve
22
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
Checklist for Testing
As with integration scenario, the time invested in checking the individual components independently and making them robust always pays off in the long run.
1. Check that the Integration Process with SAP XI executes independently of the trigger-workflow step (create a bypass route for testing purposes)
2. Create a test report in the workflow system to make sure that the workflow executes properly (or use the workflow test environment).
3. Allow the workflow to be triggered from the integration process,and make sure that the workflow does start with the correct container elements filled in the workflow component.
Example ZBPMWF_STARTWORKFLOW is an example of a test report to start a workflow:
*&---------------------------------------------------------------------**& Report ZBPMWF_STARTWORKFLOW **& **&---------------------------------------------------------------------**& **& **&---------------------------------------------------------------------*
REPORT ZBPMWF_STARTWORKFLOW .include <cntn01>.
swc_container input_container.swc_create_container input_container.
data: combined_so like ZBPMWF_SOC,* INPUT_CONTAINER_head like SWR_CONT,* INPUT_CONTAINER like SWR_CONT occurs 0,
MESSAGE_LINES like SWR_MESSAG,agents like swhactor occurs 1 with header line,MESSAGE_STRUCT like SWR_MSTRUC.
combined_so-TRANSDESCRIPTION1 = 'Main frames'.combined_so-TRANSDESCRIPTION2 = 'Laptops'.combined_so-SOLDTOPARTY1 = 'Olympic Achievements'.combined_so-SOLDTOPARTY2 = 'Mobile warriors'.
23
© SAP AG 2004, Combining Integration Processes with Human Workflows / Alan Rickayzen
More Information
Additional Sources of Information
Online http://help.sap.comOnline help and tutorials for SAP NetWeaverwww.sdn.sap.comNetWeaver Developer’s Cookbookhttp://service.sap.com/bpmsPresentations about the capabilities of BPM in SAP NetWeaver