`
evangxli
  • 浏览: 230235 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

转 Raising exceptions in a method and handling the same in the workflow

 
阅读更多

Raising exceptions in a method and handling the same in the workflow

By Suresh Kumar Parvathaneni, from link.

This document details the procedure in defining exceptions in a method and using the same in a workflow. 
Let us first look at raising exceptions in a method: 

Go to Business Object Builder (Transaction SWO1). 

Create a business object. 
 

Now create a method.

 

Now select the method you have created and click on button “Exceptions” available on the toolbar.

Following screen appears:

 

Now click on Create. Following popup screen appears: 

 

Enter the information as shown above. The error type “Temporary error” is chosen in the case wherein the record is locked by somebody else or some required resource is not available. The error type “Application Error” is to be chosen when there is no authorization for the document you are processing. The error type “System error” is to be chosen if there are no values passed for the mandatory parameters. 

Click on continue.

Go back to the main screen.

Now in the method, provide the following code:

 

Save the business object and release the same. 

 

Try executing the method by clicking on Test/Execute (F8). The exception would be raised as shown below: 

 

Capturing the exception raised by the method in the workflow: 

Go to Workflow Builder (TCode: SWO1). 

Create the step “Activity”

 

Create a task and provide the following details in the new task: 

 

Save your entries and return to the previous screen. 

 

Click on “Outcomes” tab. Here you can observe the exception you defined in your method:

 

As observed in the observe screen, the outcome is not active by default. If we do not handle the exception, the work item might go into the error status. Activate the outcome:

Save your entries and go back to the main screen of Workflow builder. Please ensure that you have done the agent assignment for this task. 

 

You can now observe a new branch when the exception is raised. You can define your steps whenever the exception is raised. 

References:

http://help.sap.com/saphelp_nw04s/helpdata/en/c5/e4ad98453d11d189430000e829fbbd/frameset.htm

分享到:
评论

相关推荐

    Delphi EurekaLog

    Web, etc.) the ability to catch all exceptions, even those raised by memory leaks, and generate a detailed log of the call stack with unit, class, method and line-number information as shown in the ...

    一本android的好书beginning android 2 和 源码

    In the Beginning, There Was the Root, And It Was Good Permissions, Instrumentations, and Applications (Oh My!) Your Application Does Something, Right? Achieving the Minimum Version=Control ...

    钟形曲线,The Bell Curve.pdf

    7 The Evolution of Affirmative Action in the Workplace655 Notes 665 Bibliography 775 Index 833 some Bigots and Enthusiasts, and through Fear assented to by some wiser and better Men; it is this. They ...

    python3.6.5参考手册 chm

    PEP 471 - os.scandir() function – a better and faster directory iterator PEP 475: Retry system calls failing with EINTR PEP 479: Change StopIteration handling inside generators PEP 485: A function...

    unidac64src 6.4.15

    6.4.15 01-Nov-16 Bug with raising 'Argument out of range' error on TCRDBGrid creating in RAD Studio Berlin with Update 1 is fixed ...Bug with handling comments in a SQL statement is fixed

    Python Tutorial 入门指南3.6英文版

    8.4. Raising Exceptions 86 8.5. User-defined Exceptions 87 8.6. Defining Clean-up Actions 88 8.7. Predefined Clean-up Actions 89 9. Classes 90 9.1. A Word About Names and Objects 91 9.2. Python Scopes...

    Agile模型驱动开发BorCon China- Raising the level

    在"Agile模型驱动开发BorCon China- Raising the level"这个主题中,我们探讨的是如何在中国的IT环境中提升Agile MDD的实践水平。 Agile开发,源自2001年的敏捷宣言,强调快速响应变化、团队协作和客户满意度。它的...

    【高考专题辅导】安徽省2014版高考英语 专题检测卷(三十二)书面表达

    In conclusion, addressing waste issues in schools requires a combination of awareness-raising, education, and practical actions. By promoting the "clear your plate" campaign, teaching financial ...

    我国节能与新能源汽车发展战略与对策 (1).pdf

    The shift towards electrification, diversification of energy sources, and cleaner emissions marks a pivotal point in the industry. Second, China's enormous market potential provides a fertile ground...

    Study on the Influence of Bank Raising Interest to the Amount of Chinese Private Cars

    Study on the Influence of Bank Raising Interest to the Amount of Chinese Private Cars,马丹,周圣武,Through the establishment of the Logistic regression model, and application circuit theory, ...

    Inventory, Speculators, and Initial Coin Offerings.pdf

    (aka, security token oerings, STOs)|in the presence of product risk and demand uncertainty, make predictions on ICO failure, and discuss the implications on rm operational decisions and prots. We ...

    Metasploit Bootcamp

    He is an M.tech in Computer Sciences and a thought leader who has contributed to raising the bar of understanding on cyber safety and ethical hacking among students of many colleges and universities ...

    Floor Plan Manager - ABAP Webdynpro

    Floor Plan Manager (FPM) is a powerful and flexible user interface (UI) framework available in SAP’s ABAP platform. It enables developers to create complex business applications with a high degree of...

    IT Baseline Protection Manual

    together in the IT Baseline Protection Manual are aimed at a protection requirement which applies to most IT systems. For the majority of IT systems, this considerably facilitates the task of drawing ...

    SOA with REST-Prentice Hall(2012).pdf

    When I rst heard about REST in early 2002, I was a strong believer in the value of the emerging Web services speci cations and standards. I was initially intrigued by the approach, particularly the ...

    信息安全_数据安全_Raising the Bar for the Attacker.pdf

    信息安全_数据安全_Raising the Bar for the Attacker 安全架构 区块链 安全对抗 安全人才 数据分析

    Matlab锁相环路代码phaselockedloopPLL-pll.m

    automatically raising or lowering the frequency of a controlled oscillator until it is matched to the reference in both frequency and phase. A phase-locked loop is an example of a control system ...

    Running Lean: Iterate from Plan A to a Plan That Works

    What we need is a systematic process for quickly vetting product ideas and raising our odds of success. That's the promise of Running Lean. In this inspiring book, Ash Maurya takes you through an ...

Global site tag (gtag.js) - Google Analytics