Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5...

92
Considerations when upgrading SAP Business Workflow from SAP R/3 4.6C to SAP ERP 6.0

Transcript of Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5...

Page 1: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

Considerations whenupgrading SAP BusinessWorkflow from SAP R/34.6C to SAP ERP 6.0

Page 2: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 2

Content Providers

Eddie Morris: SAP NetWeaver Tools Support, SAP Ireland

Carol Thomas: SAP NetWeaver Consultant, SAP America

Bob Duffy: SAP NetWeaver Consultant, SAP America

Thomas Kosog: Platinum SAP NetWeaver Consultant, SAPAmerica

Anna Hill: SAP NetWeaver Consultant, SAP UK

Mark Griffiths: SAP NetWeaver Consultant, SAP UK

Jocelyn Dart: SAP NetWeaver Consultant, SAP Australia

Nicole Fessler: Workflow Developer, SAP AG

Markus Kinateder: Senior Developer, SAP AG

Ginger Gatling: NetWeaver Product Manager, SAP Labs

Page 3: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

New workflow features since R/3 4.6c

Preparing for the workflow upgrade

During and after the upgrade

Summary and Appendices

Page 4: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 4

Before the upgrade

Complete all running workflow instancesCreate workflow test plansWF& T versus WS & TS

Not ‘required’ to switch (Workflow Tasks (WF) and Customer Tasks(T)) to workflow templates (WS) and standard task (TS).Recommend to copy from WF/T to WS/TS.Change can be done after the upgrade (done over time). You can usthe transaction PFTC and the copy functionality to do.

Page 5: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 5

Before the upgrade

Clean runtime tables before the upgradeIf the workflow runtime tables have less data in them then this will enable theupgrade to run faster. The best option is to archive as much workflow runtimedata as possible according to note 573656. If you have runtime data that is notneeded in the future then you can consider deleting this data via reportRSWWWIDE (See note 49545). Please be aware that once deleted that data isno longer available. Various workflow database tables may containunnecessary entries after you delete work items It is also a good idea to runreport RSWWWIDE_DEP which removes these unnecessary entries.573656 - Collective note relating to Archiving in workflow49545 - Deleting unnecessary work items738148 - Deletion report for superfluous work item entries (46C)

Page 6: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

New workflow features since R/3 4.6c

Preparing for the workflow upgrade

During and after the upgrade

Summary and Appendices

Page 7: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 7

During the upgrade

Conversion of event linkage tables1019080 - Poor RSWFEVTXPRA performance808790 - Poor RSWFEVTXPRA performanceIn release 4.6C, the instance linkage for workflow steps was stored in tableSWEINSTCOU. In WAS (Basis 620) onwards, this information is stored in tableSWFDEVINST. During the upgrade, report RSWFEVTXPRA moves the entriesfrom the old table into the new table.

NOTE: If you do the deletion of work items these tables will be cleaned up aswell.

Page 8: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 8

After the upgrade

Composite Upgrade note1068627 - Composite note about workflow upgradeThis note lists the notes concerning the workflow that you must refer to whenyou upgrade to 6.40 or 7.00. Please make sure all of the notes listed areapplied to your system and you have reviewed any recommendations withinthe notes.

Page 9: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 9

After the upgrade

Workflow Definition & BindingWorkflow definition

1060762 - Container operation with date fields and time fields (date check routine inworkflow builder)1058159 - Elements are missing in the workflow container (DDIC elements no longeractive)

Binding checks are much more strict in NW04 and 7.0. Binding definitionsthat did not error or cause problems may now cause problems. Your workflowtemplate containers may refer to DDIC data types that no longer exists in theupgraded system. Note 939489 discusses this issue and provides 2 solutions:

Solution 1: The easiest solution is to recreate the missing type definition in the ABAPDictionary.Solution 2: If Solution 1 is not feasible or useful, you can replace the data types in thecontainer definitions for the relevant processes with a report. Bear in mind that youhave to replace them with the same type. Apply note 939489 in order to have the reportRSWF_CNT_BOR_ELEM_REPLACE.

939489 - Workflow: Container elements are missing after an upgrade

Page 10: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 10

New Binding Editor

target container

source container

import binding

export bindingbinding

instructions

drag & drop

drag & drop

drag & drop

Page 11: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 11

Binding Expressions

Expressions now provide index access to multi-line elements

Second order of first customer&customers[1].orders[2]&

Projection to a single column&table[].columnName&

Access to a component of a table line&table[index].columnName&

Access to an entire table line&table[index]&

Expressions can contain functional method calls to BOR or ABAP ObjectsThe expression evaluates to the result value of the methodIt is possible to pass parametersMethods used in expressions must not have side effects

„Read only“ methodsNo database changes

%my_class.static_method( param1=&exp2& )%Static method&my_object.methodA( param1=&exp1&; param2=17 )&Instance method w parameters&my_object.get_value( )&Instance method w/o parameters

No more restrictions concerning data typesABAP-OO object referencesStringsNested structures

Page 12: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 12

Binding Instructions

Source and Target of a binding instruction are expressionsAssigning a table line to a structure component is now possible (if compatible)

Several binding operators are availablefor expression to expression binding (as above)for container to container binding

The button lets you choose the right binding operator

source expression binding operator dataflow direction target expression

Merge (Copy all elements)Container to container

Assign value

Expression to expression Append to table

Programmed Binding (SWCONT)Programmed Binding (Container-IF)

XSLT TransformationInitialize

see Appendix for further cofiguration possibilities

Page 13: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 13

After the upgrade

Tables SWW_CONTOB & SWW_CONTTables SWW_CONTOB & SWW_CONT are used in Basis 640 onwards, butonly if you choose the 'old' container persistence. When using XMLpersistence in your workflow no entries will be written to these tables. Youcan change the settings for the persistence profile of a workflow via thebuilder => Basic Data => Version Dependent => Control tab. Look in the'Persistence profile' tab and you can change the settings.Entries with XML persistence are stored in table SWWCNTP0. This should nothave any affect on the system at all. Only issue will be if the customer hassome custom code that reads from tables SWW_CONTOB & SWW_CONT.

Page 14: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 14

Re-implementation of the Container

Complete reimplementation of container technology

No restrictions concerning data typesDDIC types with arbitrary lengthsBinary dataStructures with arbitrary depth and complexityABAP OO references

Container is by default stored as XML documentFacilitates diversity of supported data typesSaves storage space (especially for large containers/structures)

No database entry for each structure field required anymoreEntails serialisation / deserialisation effort

Old container persistence (SWCONT, SWCONTOB) still supportedCompatibility modeWorkflow Builder setting ( Appendix)Old container persistence (SWCONT, SWCONTOB) still supported

Page 15: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 15

Parameter Container Interface

The old container was represented as an internal tableManipulating the container meant using awkward container macros

The new container implementation is ABAP Objects based

A (released) API is provided for reading an manipulating container datathe ABAP Objects interface IF_SWF_IFS_PARAMETER_CONTAINER

This interface represents the container already in a number of workflow APIs(and will get more ubiquitous from release to release)

IF_SWF_IFS_PARAMETER_CONTAINER contains the following methods:

Delivers a list of names of all elementsLIST_NAMES

Sets the value of an elementSET

Delivers a reference to the value of an elementGET_VALUE_REF

Delivers the data type of an elementGET_TYPE

Delivers the value of an elementGET

Resets an element to its type-based initial valueCLEAR

DescriptionMethod

Page 16: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 16

After the upgrade

WEBBWSP -> Integrated ITSUniversal Worklist (Recommended)SBWP, inbox in SAPGui

When moving to Unicode:775111 - Unicode problem in BOR container1019850 - Contents of WI_Creator field967414 - Error in binding editor with double-byte characters after upgrade

Page 17: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 17

After the upgrade

SAPGUIIf you experience short dumps relating to MESSAGE_TYPE_X it may be due toyour SAPGUI Release and patch level. It is a good idea to also upgrade youSAPGUI to the latest release and patch level available on SAP ServiceMarketplace.

Deadlines1092157 - Deadline issues

Hanging Workflow215753 - Upgrade: Old workflows hang

Transports571302 - Collective note relating to transports in workflow850556 - Workflow: Report for deleting the shared buffer980834 - Buffering of workflow definitions982352 - Updating workflows in the test system (only needed if using both WFand WS tasks)

Page 18: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 18

After the upgrade

Business Object IssuesIf you experience short dumps with DATA_UC_STRUCT_C_LENGTH orASSIGN_LENGTH_0 then this may be due to the business object(s) beingused in your workflow.

Solution: Generate the object and any subtypes associated with the object via SWO1Transaction SWO_ASYNC

After upgrade some users find that they can no longer display the object method byclicking the link in the preview pane of SBWP. This also may affect the users ability toview work item attachments or secondary methods. This is due to missingauthorization of transaction SWO_ASYNC which is detailed in note 1006235 -Authorization check for transaction SWO_ASYNC.

Custom codeRUNTIME HANDLES (TYPE SWC_OBJECT) versus PERSISTENT OBJECTREFERENCES (TYPE SWOTOBJID).

SAP ERP 6.0 is more stringent in enforcement of ABAP syntax. Example:“We had a macro call which was coded swc_refresh_object "ZECM". I don't know howthey ever got away with using the object name in quotes. All of the documentationpointed to defining a field to hold the object values so the call should have beenswc_refresh_object self (self being a field holding the value in the correct format)”

Page 19: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

New workflow features since R/3 4.6c

Preparing for the workflow upgrade

During and after the upgrade

Summary and Appendices

Page 20: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

Design Time Changes and SAP_WAPI at runtimeDelivering work itemsReporting

New workflow features since R/3 4.6c

Note: We only provide overview of changes in thispresentation. There is an appendix we will not cover that hasmore details and there is a delta class, DBITWF.

Page 21: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 21

SAP_WAPI

Page 22: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 22

Step Conditions

READY

CHECKED

SELECTED

STARTED

COMPLETED

CreateWork ItemConditionInstantiation

Execution

CompleteExecutionCondition

CompleteWork ItemCondition

see Appendix for further details

Page 23: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 23

SWITCH: The New Multiple Condition Flavor

1. Double-clickon multiplecondition icon

2. Select Multiple Condition Flavour

3. Enter Branches and Conditions

4. Name Default Branch

Each branch of the SWITCH carries a conditiondefinition

The conditions are evaluated in the given order

The first branch whose condition evaluates to TRUEis taken

If none of the conditions evaluates to TRUE, a defaultbranch is taken

ConditionEditor

Condition 1 is TRUE

Condition 2 is TRUE

Default branch

Page 24: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 24

Blocks: Basic Features

Blocks…

are modeling elements

can contain other modeling elements

represent a data sub-contextall modeling elements within the block refer tothis data context (binding, conditions, …)

have a data interface

have one start and one end node

are represented by block work itemsnew work item type

can be deadline monitored (latest end only)

can catch exceptions ( see Appendix)

Start node

Block

End node

Page 25: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 25

Blocks: Work Item Hierarchy

Block items introduce new levels in workitem hierarchies

Blocks can contain dependent work items

Blocks are represented as folders in theworkflow log

Block structure is sustained at runtimeBlock is completed only if dependent workitems are in a final stateIf a block is cancelled, all its dependent workitems are cancelled, too

Page 26: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 26

Local Workflows

Local workflows…are control flow snippets

not part of the main processsequence

are just special blocksrepresented by block work items

are started via local eventsdata binding event – local flow

have full access to process datacan be instantiated an arbitrarynumber of timesare cancelled if still active whenmain process completes

3. Local eventis raised

2. Exception iscaught by block

1.Exceptionis raised

4. Local workflowis started

Page 27: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 27

Local Workflows

3. Local event is raised

2. Exception is caughtby block

1.Exception is raised

4. Local workflow is started

Page 28: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 28

Workflow Header Events (1)

1. Select„Basic Data“

2. Select „Version-Dependent“

3. Select „Events“4. Enter event data

5. Choosereceiver type

Conditions „Create Work Item“ and „Complete Work Item“ are evaluatedEvaluate Pre- andPostconditions

Agent determination of all active dialog work items is repeatedReevaluate Rules

The workflow instance is set to status CANCELLEDA new instance is started with the same data

Cancel and RestartWorkflow

The workflow instance is set to status CANCELLEDCancel WorkflowReaction of Workflow to EventReceiver Type

The workflow instance can listen to eventsEvent couplings only exist if the corresponding object exists in the workflowcontainerThe receiver type tells you how the workflow processes the event

Page 29: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 29

Workflow Header Events (2)

A specified local event is triggeredThis local event could

start local workflowscomplete wait steps (event items)

see one of the next slides for the extended wait step!

Trigger Local Event

Event is delivered to existing appropriate wait step (event work item)If no active event work item exists, the event is parkedsee one of the next slides for parked events and the extended wait step!

Wait Step EventReaction of Workflow to EventReceiver Type

WAS 640 (NW04) offers you two new receiver types

Page 30: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 30

Parked Events (1)

event

Problem/Feature 1:

Workflow can only react on events ifappropriate wait step has already beeninstantiated

If event is raised „too early“, it is lost forthe processwait for

event

event

Problem/Feature 2:

Events always complete all correspondingactive wait step instances (event items)

token

Page 31: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 31

Parked Events (2)

event

parked eventsevent

parked eventsevent

consumeparked event

The process instance can act as an intermediate event storage

If active receiver event items exists, the one created first receives the event

If no active receiver event item exists, the event is parked

The first matching event item created consumes the first event parked

In any case: One event is delivered to exactly one event item

See Appendix for further details

Page 32: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 32

Wait for condition

SWWCOND

Wait for local eventWait for event using workflow

Wait for event

Wait Step: Four Different Flavours

Conventional wait step

Wait for global event

Correlations can be used

Condition specified in wait step

Evaluated by periodic background jobSWWCOND

Wait for global event

received by workflow instance

dispatched to event item

Correlations can be used

eventevaluate condition

workflow instance

event

workflow instance

Localevent

Wait for local event raised by triggerstep within the same workflowinstance

Page 33: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 33

Using ABAP Objects in Workflows (1)

SAP Business Workflow now supports two object repositoriesBOR (Business Object Repository)SE24 (ABAP Objects)

Persistent object keys now have three componentsObject category (CATID) ( BOR or ABAP Objects)Object type (TYPEID) ( BOR object type or ABAP Objects classname)Object key (INSTID)

Both repositories equally well supportedBut: No delegation feature in SE24

SE24 support covers the same aspects as BOR supportContainerExpressionsMethodsEvents

Page 34: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 34

Using ABAP Objects in Workflows (2)

Container can reference ABAP OOobjectsobject category

classname

ABAP OO objects can be used inexpressions

just as BOR objects are used

ABAP OO object methods can beused in standard task definitions

just as BOR object methods are used

object category

classname

method

Page 35: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

Design Time Changes and SAP_WAPI at runtimeDelivering work itemsReporting

New workflow features since R/3 4.6c

Note: We only provide overview of changes in thispresentation. There is an appendix we will not cover that hasmore details and there is a delta class, DBITWF.

Page 36: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 36

Universal Worklist

Give users a unified and centralized access to theirwork and the relevant information

Aggregate task items from multiple and differentsystems of the system landscape -in one list for one-stop access

Business WorkflowCollaboration TaskAlert Management SystemKM Content Management Notifications

Enable users for direct decisions and actions

Support users in personalization of the presentation

Allow extensive customization for specialized worklists in Work Centers, including custom attributes,actions and bulk processing

Page 37: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 37

UWL 7.0 – Task list

Page 38: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 38

UWL 7.0 – Launch Work Transaction

Parameterized launching for• BSP• iView• URL• Web Dynpro• SAP GUI (for HTML)

Page 39: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 39

UWL 7.0 – Standard Task Views & Filters

Page 40: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 40

Launch Work Transaction

Parameterized launching forBSPiViewURLWeb Dynpro (Java or ABAP)SAP GUI (for HTML)

Page 41: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 41

Launch Customization: ABAP Web Dynpro

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

Launches anABAP WebDynpro

1

2

3

Page 42: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 42

Boosting SBWP Performance

Means to improve SBWP performance have been provided

Scenarios that benefit most are

Many agents work on large pools of work items (e.g. call centerscenario)

Large, slow work listsNecessity to often refresh the work list (due to work item „overlaps“)

Extensive usage of dynamic columnsparticularly with large work lists

Grouping of work items in large work lists using container dataGrouped according to contentGrouped according to content typeGrouped according to sort key

To mitigate SBWP performance issues, BAdIs have been defined

Page 43: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 43

Email Notifications

Replacement for SAP MAPI is providedClient-based MS Outlook integration of SAP Business WorkflowSupport ends 10/2005

New solutionsServer-based (zero footprint)Mail client independentCovers 90% of workflow-related MAPI customer scenarios

Different replacements for different SAP releases

Report RSWUWFML2Polling report sending email notificationsReleases 4.6C – 620

Extended NotificationsServer notification frameworkReleases > 640

Page 44: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 44

Extended Notifications: Overview

SAP Business Workflow

send e-mails

ExtendedNotifications

process workitem

collect workitems

Email

End user

Email client

SAP GUI or Portal UWL

Page 45: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 45

Extended Notifications: Basic Features

Notify users about work items that need to be processedSend workitems to groupware (e.g. MS Outlook or Lotus Notes)carrying direct callbacks to backend transactions

Execution of web-based work items (Web Dynpro, People centric UI, …)Execution of work items via SAP GUI for Windows

Page 46: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

Design Time Changes and SAP_WAPI at runtimeDelivering work itemsReporting

New workflow features since R/3 4.6c

Note: We only provide overview of changes in thispresentation. There is an appendix we will not cover that hasmore details and there is a delta class, DBITWF.

Page 47: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 47

BI Integration for SAP Business Workflow (1)

The Workflow Information System (WIS) has become obsolete withWAS release 610

Customers do their reporting using BI

Workflow projects with BI requirementscould not use standard workflow-related data extractionhad to implement their own extraction logic for workflow data

This gap has now been closedTechnical work item data is available in BI as infocubeHow many workflows of type ‘xy’ were executed?What is the average processing time for a given workflow (step)?How many steps of type ‘xy’ were executed by org unit ‘abc’?

Workflow and Business Objects worlds are linked by work item toobject relation information available

Page 48: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 48

BW Integration for SAP Business Workflow (2)

Page 49: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 49

Further information

Practical Workflow for SAP from SAP Press

Classroom Education:DBITWDF – 2 day workflow delta class,BC401 – 3 days ABAP objects classhttp://www.sap.com/usa/education

SDN workflow forum and important blogshttp://sdn.sap.com Forums -> SAP NetWeaver -> BPM and workflowWhy use ABAP OO with workflow?https://weblogs.sdn.sap.com/pub/wlg/3858

Getting started with ABAP OO for workflowhttps://weblogs.sdn.sap.com/pub/wlg/3907

SDN workflow wiki FAQ maintained by Mike Pokraka (and you)http://sdn.sap.com Wiki -> Wiki (home) -> BPM and Workflow -> SAPBusiness Workflow FAQhttps://wiki.sdn.sap.com/wiki/display/HOME/SAP+Business+Workflow+FAQ

Page 50: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 50

Q&A

Questions?

Page 51: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 51

Please complete your session evaluation.

Be courteous — deposit your trash,and do not take the handouts for the following session.

Feedback

Thank You !

Page 52: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 52

Appendix

Appendix

Page 53: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 53

Blocks: Data Context Properties

Every block has a containerNested blocks form nested datacontexts

Parent relationships betweencontainersWorkflow is the top level block

Parent context is visible within subcontextBindings can be defined from

the parent context to the sub context(Import binding at block instantiation)the sub context to the parent context(Export binding after block completion)

Blo

ck C

onta

iner

Wor

kflo

w C

onta

iner

Visi

bilit

y of

data

Impo

rtB

indi

ngEx

port

Bin

ding

Pare

ntC

onta

iner

6.40

Page 54: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 54

Blocks: Dynamic Parallel Instantiation

Block instantiation can be dynamically controlled by multilinecontainer elements (ParForEach)

Similar to the „ParForEach“ dynamic parallel processing for activities!

For each entry in the multiline element, one block instance is createdCorresponding line data transported to the block context via binding

Process continues after the ParForEach block if eitherall instantiated parallel blocks are completed ora special join condition evaluates to TRUE after completion of a block

Block definition

+

Multilinecontainerelement

:objectN

object2object1

= :

N parallel blockinstances

N

2

1

6.40

Page 55: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 55

Blocks: Dynamic Sequential Execution

Block execution can be dynamically controlled by multilinecontainer elements (ForEach)For each entry in the multiline element, the sequence of steps definedwithin the block is executed once

Only one block item is created!ForEach loop semantics

Process continues after the ForEach block if eitherall table entries are processed ora special condition evaluates to TRUE after completion of a loopsequence

Block definition

+

Multilinecontainerelement

:objectN

object2object1

=

N block sequence cycles

…1 2 N

6.40

Page 56: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 56

Container: Workflow Persistence Profile

Each Workflow instance has a persistence profileIt is set in the basic data of the workflow definitionThe default value is

„XML Persistence“ for new workflow definitions„Compatibility Mode“ for legacy workflow definitions

1. Select„Basic Data“

2. Select „Version-Dependent“

3. Select „Control“

4. Select„Persistence Profile“

5. Set „PersistenceProfile“

6.20

Page 57: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 57

Binding Instructions: Configuration

Every binding instruction can be configured

The available configuration options depend on the operator

Assign, Merge, XSLTOverwrite empty target elements only

Assign, XSLTNo action if source is initial

Assign, XSLTNo action if source is empty

Assign, AppendMove-corresponding

All binding operatorsHandle errors as warnings

Available forOption

The set of binding operators is extensible

You can program your own binding operatorsUse IF_SWF_IFS_BIND_TRANSFORM for expression to expression operatorsUse IF_SWF_IFS_BIND_TRANSFORM_CONT for container to container operators

6.20

Page 58: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 58

Step Conditions: Condition Types

This condition is evaluated on the step container itselfCondition is evaluated after work item executionIf the condition evaluates to TRUE, the work item is set toCOMPLETED

If the condition evaluates to FALSE, the work item remains INPROCESS or is even set back to READY ( see slide notes fordetails)

Complete Execution

This condition is evaluated on the surrounding containerWork item is immediately set to COMPLETED when conditionevaluates to TRUE

Result branch „Complete condition true“ is taken

Complete Work Item

This condition is evaluated on the surrounding containerWork item remains in WAITING state until condition evaluates toTRUE

It can not be executed until condition is fulfilled

Create Work Item

BehaviorCondition Type

6.20

Page 59: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 59

Step Conditions: Definition

1. Double-clickon activity icon

2. Select Conditions Tab

3. Select Condition Type

4. Enter conditionexpression

Step conditions areformulated on the surrounding container (data context) or the step containerevaluated either by the workflow engine, a periodic background job (SWWCOND) or

event drivenavailable for the following step types (with work item representation)

ActivitiyUser DecisionWait StepWeb Activity

The state of the corresponding work item can be influenced bythe fact that a condition is definedthe result of condition evaluation

6.20

Page 60: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 60

Blocks: Exception Handling (1)

Blocks can handle exceptions (TRY-CATCH mechanism)Exceptions can be raised by a Process Control step ( workflowexceptions)For every workflow exception defined within the process, exceptionhandlers can be defined on every blockA generic (CATCH ALL) exception handler is also available

Main block sequenceGeneric exception

handler (CATCH ALL)

Handler for exceptionexceptionA

Process control toraise workflow

exception

6.40

Page 61: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 61

Blocks: Exception Handling (2)

Exceptions are propagatedFrom their origin up the block hierarchy

Blocks either catch exceptions…in case appropriate handler is defined

… or propagate them furtherin case no appropriate handler definedorblock already caught exception

If exception is caughteverything inside block is cancelledexception handler is executedblock is completed normally afterwards

If exception is not caught, process is setto an ERROR state

1. Exceptionis raised

3. Caught byouter block

2. Propagatedby inner block

4. Contents ofouter blockcancelled

5. Exceptionhandler executed

6. Outer blockcompleted

6.40

Page 62: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 62

workflow

Correlations (1)

Event couplings are created using

event name (design time information)

event object instance (run time information)

The object instance has to be known to theprocess

6.40

container

A

A

A

Problem: How to wait for events of yet unknown objects?

Knowing an object means knowing its key ( unique identifier)

But: objects can also be identified using semantic information

Goal: Wait for events of objects semantically coupled to objects known

knownobject

instantiateevent item

Page 63: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 63

Correlations (2) 6.40

B

A

Correlations are objects which groupother objects by semantic criteria(correlation key)

“objects having to do with each other”

correlationinstance

correlatedobject

instance

known object instance

Event couplings can also be created using

event name (design time information)

event object type (design time information)

correlation instance (run time information)

The object instance does not have to be known to the processbut at least one correlated object instance has toExample: know order to identify correlated invoice

Page 64: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 64

workflow

Correlations (3)

Correlations are instantiated using oneparticipating object instance

(semantic) correlation key has to be determined

Example: order ID

Wait step (event item) is instantiated using

correlation instance (semantic key)

object type

event

Example: wait for creation of invoice referring toknown order

6.40

container

A knownobject

instantiateevent item

Correlationinstance

A

instantiatecorrelation

B event

Event of unknown, yet correlated object is delivered to event item via thecorrelation instance

see Appendix for further details

Page 65: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 65

Parked Events: Concept (1)

When a wait step is instantiated,an event work item is created acting as event listeneran event instance coupling (subscription) is written for this event workitem

Every event triggered completes all active event work itemssubscribed to itThe process (workflow instance) plays no role here

workflow instance

1

2

3

event

workflow instance

1

2

3

both event itemscompleted

event receiveddirectly by event

items

6.40

Page 66: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 66

Parked Events: Concept (2)

The workflow instance can act as an event dispatcherThe workflow instance acts as the event receiverIt dispatches those events to its dependent event items

Event work items receive events via the workflowOnly one event work item is completed per event

If more than one event work items in question exist, the oldest is takenThis mechanism implements an event item queue within the process

workflow instance

1

2

3

event

workflow instance

1

2

3

only one eventitem completed

event received byworkflow instance

event dispatchedto event item

6.40

Page 67: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 67

workflow instance

Parked Events: Concept (3)

If no active event items exist when workflow receives event, theevent is parked

Event waits for the next corresponding event item to be created withinthe processThis mechanism implements a queue of parked events

New event items consume corresponding parked eventsimmediately after their creation

event 1

workflow instance

event 1

workflow instance

event 2event 1

workflow instance

event 1

event 2

workflow instance

event 1

event 2

1

workflow instance

event 2 1

no activeevent item

event isparked

event itemis created

parked eventis consumed

6.40

Page 68: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 68

Correlations: Principles (1)

Conventional event couplings:Wait steps are instantiated for existing and known object instancesThe object key is used to connect event and wait step (coupling)

Requirement:Wait for events of unknown objects

Object key is not available at wait step creation time

Object key cannot be used to link event to wait step

Solution:Use semantic coupling between object instances (correlation)

One object instance leads to several correlated object instances

Define wait step not by object key but by object type + correlationinstance

6.40

Page 69: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 69

Correlations: Principles (2)

Correlation instances group object instances by semantic criteriaThe objects are pulled together by a specially defined correlationkey

Those object instances fulfill the correlation instanceThey can have different object types

A correlation instance can not be created until at least one fulfillingobject instance exists

A correlation does not make sense without its objects!

Object type AA1

Object type B

B1

B2

B3B4

A2

A3

correlation instance

object instances

object does notfulfill correlation

object fulfillscorrelation

6.40

Page 70: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 70

Correlations: Definition

Every correlation instance is based on a correlation definitionThe correlation definition consists of

A set of key fields (key definition)A set of object types that shall be correlated with each other (correlationcomponents)A set of assignment rules between object type data and correlation keyfields (one for each correlation component)

For every correlation component, those assignment rules have tofully specify the correlation key!

Object type B

Object type AattributeA1attributeA2attributeA3attributeA4

attributeB1attributeB2attributeB3

key structurecorrelation

componentsassignment rules

correlation definition

6.40

Page 71: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 71

Correlations: Run Time

apply bindingrule and

compare keys

B3 B3

B3

correlationfulfilled

correlationnot fulfilled

Correlations are activated with the help of an object instanceObject type has to belong to the correlation components

object instance active correlationinstance

apply assignment rulesA1

correlationdefinition

+

Work items listening to events can use correlations

wait step definition active correlationinstance

+ instantiate wait step

event item withcorrelation

Object type B

object type

+event 1

event name

+

If the event is raised by any correlation component, the correlationis checked

B3 event 1object instance

raises event

6.40

Page 72: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 72

Extended Notifications: History

Report RSWUWFMLPolling reportUses SMTP/SAPconnect mail connectionUses SAP Office‘s auto-forward addressAvailability: Release 3.1I

E-Mail Notifications for Business WorkflowReport RSWUWFML2Successor of RSWUWFMLWinGui shortcuts instead of R3F attachmentsAvailability: Release 4.6C

Extended Notifications for SAP Business WorkflowServer notification frameworkAvailability: WAS 6.40

6.40

Page 73: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 73

Notification Concepts: Release Dependencies

>6.40

6.40

6.20

6.10

4.6

<4.6SAP MAPI RSWUWFML

RSWUWFML2

ExtendedNotifications

6.40

Page 74: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 74

Extended Notifications: Individual Notifications

Individual mailspossible on awork item bywork item basis

Or….

6.40

Page 75: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 75

Extended Notifications: Aggregation

Index ofwork items

Generic Decision

ShortcutAttachmentspossible

WorkitemDescription

Shortcut links

6.40

Page 76: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 76

Extended Notifications: Redefinition of Text

Redefinable Text

6.40

Page 77: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 77

Workflow

Extended Notifications: Notification Framework

User 1 User 2

Application Object(Workitem)

Application Object(Workitem)

Application Object(Workitem)

User 1

User 2

User 2

Application Notification Framework

6.40

Page 78: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 78

Extended Notifications: 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 handling

XX--Enhanced address determination

XX--Prefix AND suffix text (surrounding workitemdescription)

XX--SAP Shortcut attachments

XXX-Deliver workitems to any e-mail client

ExtendedNotificationsRSWUWML2RSWUWFMLSAP MAPIFeature

6.40

Page 79: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 79

How To Use ABAP OO Objects in Workflow (1)

ABAP OO classes are built with the class builder (SE24)ABAP OO classes used in workflows have to implement theinterface IF_WORKFLOWIF_WORKFLOW includes two interfaces

BI_PERSISTENT (methods for object persistence)BI_OBJECT (methods for object runtime)

Methods needed forpersistence handling

Standard methodsused by runtime

Application specificmethods

6.40

Page 80: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 80

How To Use ABAP OO Objects in Workflow (2)

The methods of BI_PERSISTENT implement persistence handling

Tells the object to reload its state from the database(synchronization)

REFRESH

Returns the persistent object reference (POR) of the ABAP OOobject instance

LPOR

Factory methodConverts a persistent object reference (POR) to a ABAP OO objectinstance

FIND_BY_LPORExplanationMethod

Tells the object instance that it is no longer neededPossibility for controlled cleanup

RELEASE

Tells the object instance to call its default methodNormally, this is a method which displays the object

EXECUTE_DEFAULT_METHOD

Returns the value of the default attribute used for displaying theobject instance

DEFAULT_ATTRIBUTE_VALUE

ExplanationOption

The methods of BI_OBJECT are needed by the workflow runtime

6.40

Page 81: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 81

How To Use ABAP OO Objects in Workflow (3)

All public attributes of an ABAP OO class can be accessed directlywithin workflow

Method parameters can be of any datatypeParameters of BOR object types had to be character basedXML Persistence profile has to be used for container

6.40

Page 82: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 82

How To Use ABAP OO Objects in Workflow (4)

All public events defined for the ABAP OO class can be used likeBOR object events

as start eventsas completion eventsas workflow header eventsin wait stepsin event trigger steps

6.40

Page 83: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 83

SBWP-BAdI: Filtering Work Lists

BAdI WF_BWP_SELECT_FILTER enables the reduction of the numberof work items displayed in the Business Workplace workflow inbox

It imports the entire work list (work item header information)It exports the (reduced) work list to be displayed as inbox

Custom filtering algorithms can be implementedExample implementation based on random numbers available

Performance critical operations applied to reduced work listDefault attributes, dynamic columns, work item text in differentlanguages, …

Availability: WAS 620 SP 44, WAS 640 SP 9 (see note 765783)

end user standard worklist selection

entirework list

filtering

BAdI

work listsubset

preparationfor display

BusinessWorkplace

WF_BWP_SELECT_FILTER

6.20

Page 84: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 84

SBWP-BAdI: Accelerating Dynamic Columns

Dynamic columns can be customized on task levelDisplay work item container information in Business Workplace inbox

Usage of dynamic columns is performance criticalRead container for every single work itemInstantiate objects and read object attributesContainer and Business Object Repository are not mass-enabled

BAdI WF_BWP_DYN_COLUMN can help to improve performanceThe BAdI implementation facilitates

custom bufferingmass selection from database

Availability: Future Support Packages for WAS 620 and WAS 640see note 848382 (not released yet)

work listto be

displayed

1st stage(determination

by BAdI)

WF_BWP_DYN_COLUMNBAdI

dynamiccolumns partly

determined

subset withdynamiccolumns

2nd stage(standard

determination)

work listto be

displayed

6.20

Page 85: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 85

Work Item Programming Exits (1)

Work item exit classes have to implement the ABAP Objects interfaceIF_SWF_IFS_WORKITEM_EXIT

Exit classes can be attached toSteps (activity, decision, wait, web activity) corresponding work itemsBlocks block itemsWorkflows flow items

Exit classes are called at particular times in the work item lifecycle

work item exitimplementation

BEFORE_CREATIONAFTER_CREATIONAFTER_RULE_EXECSTATE_CHANGEDBEFORE_EXECUTIONAFTER_ASYNC_INVOKEAFTER_EXECUTIONBEFORE_REMOVE

IF_S

WF_

IFS_

WO

RK

ITEM

_EXI

Twork item

6.20

Page 86: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 86

Work Item Programming Exits (2)

The workflow runtime provides the work item exit withthe name of the lifecycle eventa work item context object (reference to IF_WAPI_WORKITEM_CONTEXT)

The work item context provides methods toread work item data (header, task, agents, texts, …)get container handles (IF_SWF_IFS_PARAMETER_CONTAINER)

of the work item itselfof the super ordinate workflow

read properties ( see next slide)write messages to the workflow log

work item exitwork item eventnameeventname

work

item

context

6.20

Page 87: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 87

Properties

Properties are custom labels for workflow definition entitiessteps (activities, decisions, wait steps, web activities)blocksworkflows

Properties can be used tocategorize stepsmark process states (milestones)

Properties are just name value pairsThey can be queried in work item exits ( custom process reporting)

„Is the current work item an approval work item?“„Is the current process still in negotiation phase?“

6.20

Page 88: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 88

Application Specific Workflow Reporting

Reporting tool

Application specific reportingdatabase

Work item exit

Workflowdefinition

workflowcompleted

workflowstarted

activity

activity

activity2

1

Work item context

step with workitem exit

step property

6.20

Page 89: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 89

Testing Workflows: Start Options (1)

Workflow test transaction (SWUS)offers start options

Select „Goto“ „Options“

Switch on workflow trace and set trace levelTrace Level

Use aRFC instead of tRFCDebug Mode

Switch off synchronous dialog chainsStart Dialog Automatically

Background steps are executed synchronously, not via tRFCValuable for debugging background steps

Simulate backgroundprocessing

The workflow instance is started via aRFCStart Workflow AsynchronouslyExplanationOption

Start options can be specified when testing workflows (SWUS)Options enable better error analysis

DebuggingTracing

6.40

Page 90: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 90

Testing Workflows: Start Options (2)

Extended start options with release 700

Specify container persistence profile for single step tasks (TS…)The persistence profile for workflows (WS…) is specified in theworkflow definition

Persistence ProfileInstantiate and start workflow a specified number of timesRepeated Starts

ExplanationOption

7.00

Page 91: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 91

Further Information

Public Web:www.sap.comNetWeaver Developer‘s Guide: www.sdn.sap.com/sdn/developersguide.sdnSAP Customer Services Network: www.sap.com/services/

Related SAP Education Training Opportunitieshttp://www.sap.com/education/

Page 92: Considerations when upgrading SAP Business …¤SAP AG 2007, Upgrading SAP Business Workflow 5 Before the upgrade Clean runtime tables before the upgrade If the workflow runtime tables

SAP AG 2007, Upgrading SAP Business Workflow 92

Copyright 2007 SAP AG. All Rights Reserved

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 bechanged without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Excel, 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, System i, System i5, System p,System p5, System x, System z, System z9, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, POWER5+, OpenPower and PowerPC aretrademarks or registered trademarks of IBM Corporation.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated 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 registeredtrademarks 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 priorwritten 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 thisdocument 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 itemscontained 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. Thislimitation 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 inthese materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.