Skip to Content
Author's profile photo Murali Krishna

Dr. Workflow :)

Hello all…..

Couple of points is based on my experience and some of them are collected on workflow testing.

The best way of ensuring a smooth and trouble-free introduction of your new or changed workflow into your production environment is to vigorously test and comprehensively document the development work in advance. This is particularly true of workflow where trouble shooting is more complicated than traditional programs.

Testing new or changed workflows:

                There are many test utilities in the web flow engine and you should take an advantage of them where you can.

You can use the following sequence as a general process for testing a typical, brand new workflow from scratch.

Business Objects Test:

Use the Business Object (BO) test option (accessible from BO builder or from the diagnosis tool test environment by choosing the relevant BO) to check that all new and changed attributes are working correctly.

Test Methods:

Use the BO test option to test any new or changed object methods. This includes testing that exceptions are raised by methods in the appropriate circumstances. Unless you are testing an instance independent method (such as Create or Find) you will need to create an object instance first. This is simpler than it sounds. You simply create the BO equivalent of the application object you want to test by choosing “Create Instance” and specifying the key of object. This reads the table in the SAP database for this object key to build a virtual business object equivalent that you can then test. Bear in mind that the methods tested are not simulated they will really do what they are meant to do. E.g. method “Purchase Order.Delete” really deletes the Purchase order.

  • Ø If you need to debug a method, it is easiest to put a breakpoint statement into the method itself, prior to running the test. Do not forget to remove the breakpoint after words. Make sure that you turn on the debugging switch in ‘setting’ menu before you start to debug the method.

Test Task/ Workflow Consistency:

Perform a consistency test (this is like a syntax check in the program) on the workflow and all related tasks and event using Tcode SWUD.

pic 1 swud.png

Test the Agent Determination Rules:

Simulate the Agent determination rules used in the workflow by using the rule simulation in the rule editor (Tcode PFAC). You can also check the results in the _RULE_RESULT container element if you have defined a return binding for the agent determination rule (it is available from release 6.10). It can be useful to define this binding just so that you can easily track any problems in that productive environment.

Test the Workflow and Sub workflows:

            Use the start task tool to test each sub workflow and then the workflow as a whole. If you are having binding problems, turning on the workflow trace can be useful. Do not forget to turn them off when you are finished.

Useful link on workflow trace: http://scn.sap.com/thread/3179666

Test the Event Linkages:

                Use “Simulate Event (SWU0)” to check that event linkages for triggering  and terminating events you are using are defined correctly and activated.

pic 2 swu0.png

Test the triggering events manually:

                Use ‘Create Event’ to trigger the event manually and the Event Trace to check that they affect your workflow in the way you expect. Simulate any start conditions (or check function modules or receive type function modules) used to trigger the workflow.

Test the Authorizations:

Most developers in the development and QA systems have more authorization than the users in the production environment. It is essential that before going live, you test the workflow with authorization profiles that the operational users will have.

Test Error Scenarios:

                Once everything is working correctly, do not forget to test all possible workflow paths, including simulate error solutions to make they behave as expected. You do not need to model a response to every possible error in your workflow but it is vital that serious errors throw an exception so that if one does occur the default Webflow Engine  error handling andthe administrator can catch the errors and resolve it. Be particularly careful to simulate any error situation that might be caused by neglected or incorrect data maintenance.

                If you need to test deadlines in workflow, avoid putting short deadlines in your workflow step, which you may forget to remove later, it is better to put the real deadline times in your workflow steps. You can then check that the correct deadline time is calculated, and change the deadline (from work item display, choose Work Item —-More Functions—-change Deadlines) to verify that escalation process is working. Do not forget to check that dead line background job has been activated

Thanks & Regards,

Murali Krishna.


Assigned Tags

      25 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Nice Information krishna,will expecting more from you

      Author's profile photo Murali Krishna
      Murali Krishna
      Blog Post Author

      Thanks DhanaRaju......

      Author's profile photo Modadugu Hemanth Kumar
      Modadugu Hemanth Kumar

      Useful information Murali

      Author's profile photo Murali Krishna
      Murali Krishna
      Blog Post Author

      Thanks Hemanth...

      Author's profile photo Jocelyn Dart
      Jocelyn Dart

      Nice and succint summary Murali.  You might also want to try transaction SWUS ... a very useful tool!

      Author's profile photo Murali Krishna
      Murali Krishna
      Blog Post Author

      Thank you Jocelyn Dart for your valuable suggestion.

      Author's profile photo Former Member
      Former Member

      Hi Murali,

      Very useful information. Good job bro. Consider Jocelyn's feedback also because most of the times I use SWUS transaction for testing purpose.

      Regards,

      Raju K. Rao

      Author's profile photo Former Member
      Former Member

      G8 work Mr. Murali. it is informative.

      Nice presentation too.

      Bijoy

      Author's profile photo Former Member
      Former Member

      Hi Murali,

      I liked the title very much

      Nicely written!

      Good Job! Keep it up!

      Regards,

      Hari Suseelan

      Author's profile photo Ajay Bose
      Ajay Bose

      Useful information. Thanks for sharing.

      Author's profile photo Mahesh kumar
      Mahesh kumar

      Good info muralli 🙂 .

      Regards

      Mahesh 🙂

      Author's profile photo Murali Krishna
      Murali Krishna
      Blog Post Author

      Thank you All....... 🙂

      Author's profile photo Former Member
      Former Member

      Nice Content.... 🙂

      Author's profile photo Former Member
      Former Member

      Great Job 🙂

      Thanks for sharing 🙂

      Cheers,

      Akberhusain

      Author's profile photo Former Member
      Former Member

      Useful info..., thanks for sharing.

      Regards,

      rajakala.

      Author's profile photo Tejas Joshi
      Tejas Joshi

      Good Info ..

      Use SWU_OBUF before testing workflows ..

      Author's profile photo Murali Krishna
      Murali Krishna
      Blog Post Author

      Thanks Tejas for your information...

      Author's profile photo Former Member
      Former Member

      Good Document Murali... Thanks for Sharing .. ...

      Author's profile photo Murali Krishna
      Murali Krishna
      Blog Post Author

      Thanks Pavan....

      Author's profile photo Former Member
      Former Member

      Thanks for the info

      Author's profile photo Perumalraj Karunanidhi
      Perumalraj Karunanidhi

      Thanks for taking out the time to prepare this article.

      Very useful information shared Murali.

      Author's profile photo Murali Krishna
      Murali Krishna
      Blog Post Author

      Thanks Perumal

      Author's profile photo Former Member
      Former Member

      Nice and very useful !!

      Author's profile photo Former Member
      Former Member

      Hi Murali,

      Good document....Thank you

      Author's profile photo Sri Hari Anand Kumar
      Sri Hari Anand Kumar

      Hi Murali,

      Thanks for providing good information, keep rocking.

      Regards,

      Sri Hari.