The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Saturday, 9 March 2013

Build Sequence


This post is for the developers who will be engaged in created brand new applications or features. You will be creating many new records as part of the new application. The records will obviously contain many views. There is a hidden possibility of error in such situations which will be unlocked only when you migrate the project from development to testing or production environments.

When you migrate and do the build project option, often the build will error out stating table not defined in the database. The major reason for this issue is multiple level of views created. Say you have created  5 tables and 5 views as below.

Tables : TBL1, TBL2, TBL3, TBL4, TBL5

Views:

VW1 = select … from TBL1,TBL2 where …

VW2 = select … from VW1,TBL3 where …

VW3 = select … from VW2,TBL4 where …

VW4 = select … from VW5,VW3 where …

VW5 = select … from VW3,TBL5 where …


When you build the project, the views might be built in random order. So if your VW4 is built before VW5, then the system will throw error as there is no VW5 in the database at that time. There is nothing wrong with your coding, sql or project. But just because of the building order of the view the build process will get error out.

To overcome this situation PeopleSoft has provided an additional option in the record properties. If you open record properties and visit “Record Type” tab then you can see an option called “Build Sequence No:”. This property is to decide when to build the view if you use build project option.



This is how it works. When you do a build project action, the application designer will search for all the views with build sequence 1 and then build them. After this is completed, all the views with build sequence 2 is built and so on.

So when you are developing applications which have multiple level of views, make use of the build sequence property and give the correct sequence number so that you won’t face any issue while project migration.

No comments:

Post a Comment

Followers