Print Post Generating Workflow Files Part 2

One of the services that I’ve done for a while now through my company, is running design and implementation reviews – spending time with customers getting to understand what they are expecting their Workflow system to do, and then looking at their workflow functional and / or technical design document, or their code that has been written, and providing a detailed analysis of the strengths, weaknesses and opportunities for improvements.  One thing that comes up time and time again is that generally the code that has been written to support a Workflow has been written without reference to the Workflow build standards that Oracle wrote some years ago – these have been out there for some time now, but here’s a brief list of what I normally find:

  • Procedure signature does not conform to the recommended signature from Oracle;
  • Use of hard-coded values for function mode and results rather than using WF_ENGINE constants;
  • No logging, or if any is in place, it doesn’t use the Workflow supplied logging package;
  • Missing or incorrect error handling.

One thing that this has really got me thinking was about how great it would be if there was some kind of framework that made it easier to write good Workflow code.

So, I sat down and put together a utility to provide well-formatted code, which provides a framework that you can plug in your specific logic.   The most important thing that a workflow developer should be focusing on is getting the flow of the process right – here’s where the developer should be devoting their efforts

  • Determining what activities are needed in the process; 
  • Deciding what level of granularity is needed
    • Should you have an activity that does lots of processing, a sub-process, or a couple of activities in one process?
    • Should you build a series of activities that perform simple steps, or use one activity which has a series of IF conditions in it?
    • etc.
  • Putting the right activities in the right order;
  • Determining error conditions;
  • Determining revisit conditions;
  • Deciding whether business events can and should be used;
  • Deciding whether to defer the process or not.

Instead of which, developers tend to be spending time on writing the PL/SQL to support the Workflow, and not enough time focusing on getting the process(es) right.

I wrote a utility which is designed to help shift this effort from PL/SQL developer onto becoming a Workflow developer.  If you install the package attached to this post, a PL/SQL package is installed which can then be used to generate code to support your Workflow.  You should define the Workflow process, and this code will then look for a specific Item Type and pick up the PL/SQL activity which you have defined and generate code for you.  If you have left any of the activities blank, then the code will create a PL/SQL package with the name of your item type, and procedures within the package named as the internal name of the activity.  The code adds logging to the procedures, error handling, and if the activity uses lookup codes, it will also generate the results at the end of the code for you.

It can also update your Workflow for you, if you set it to.  So for each Activity where you have not defined the Activity function, the code will generate the code for you to amend to support the business logic, and then update the Workflow with the name of the package and procedure which has been generated to support the process.

The code is copyright TS Fifteen Ltd (the parent company of WorkflowFAQ.com), but I’m prepared to make the code available free for use.  If you install the code, then it must include the module header which is supplied with the code.   If you make any changes to the code, or have any suggestions for extra functionality, please contact me or add comments below.  I will be writing a fuller user guide to add to the module, but here’s the current version.

Package Specification

Package Body

This entry was posted on Saturday, January 24th, 2009 at 1:27 pm and is filed under Oracle, Technical. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« Generating Workflow Files
Most useless enhancement in R12? »

Leave a Reply

  • Pages

    • About Us
    • Services From WorkflowFAQ
    • Training
    • Workflow Book
    • Careers
    • Forum
    • Blog
  • Oracle 11i Workflow Certified Expert
    Oracle 11i System Administrator Certified Expert

  • Search


  • Blog

    Archives

    • January 2012
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • July 2011
    • June 2011
    • April 2011
    • February 2011
    • January 2011
    • December 2010
    • October 2010
    • September 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • October 2009
    • August 2009
    • July 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
  • Categories

    • General Computing (30)
    • Non-Oracle (18)
    • Oracle (77)
      • Functional (20)
      • Technical (68)
    • Personal (2)

  • Links

  • General Computing

    • Computing Magazine
    • Download.com
    • SourceForge.net
    • The Daily WTF
    • The Register
  • Non-Computing

    • BBC News
    • Burnley-based professional photography
    • Cuteable
    • My wife’s shop
  • Oracle Related

    • AppsDBA
    • Oracle
    • Oracle Apps Blog
    • Oracle Magazine Interactive
    • Oracle Support
    • Oracle Technology Network
    • Oracle UK
    • Oracle Workflow Forum on OTN
    • Oracle WTF
    • OraFAQ
    • Steven Chan
    • Steven Feuerstein


Copyright © 2012 TS Fifteen Ltd. All rights reserved.