Showing posts with label Clarity Gel. Show all posts
Showing posts with label Clarity Gel. Show all posts

Friday, September 4, 2015

Clarity GEL Best Practices

1. Persist Session Id.

−It’s a waste of resources to login/execute/logout whenever you need XOG.
−Login at the beginning of your process (Start Step)
−Use to hold on to your SessionID during the entire process
−Execute whatever you need in the intermediate steps
−Logout at the end (Finish Step)

2. Read from Properties.XML

 It’s not good practice to hardcode URLs, folder paths, usernames and passwords, etc
- Use the ConfigurationManager class to read from properties.xml (parameters such as the entryURL or the Clarity home folder)
- Use to hold on to the variables you need during the entire process


3. Set and use Debugging

- Use to enter messages to the Process Manager Log Messages.
- Set up a “DebugLevel” variable and persist it for later use

DebugLevel 0 generates no message
DebugLevel 1 generates Simple messages
DebugLevel 2 generates Variable Content messages
DebugLevel 3 serializes XML Documents

4. Coding Level
1.All SQL and SOAP tags should be wrapped in gel exception handling.
2.All SQL tags should utilize bind parameters.
3.All debug statements should be controlled via a parameter that is optional when needed.
4.All complex sql statement need to be analyzed for performance implication. This can be done via EXPLAIN PLAN in a SQL tool.
5.IF the GEL script is performing XOG read/write actions in a loop, the XOG login and log out actions must be outside the loop.
6.SQL update statements should not be utilized against anything other than custom tables or ODF_CA_ tables.
7.SQL Insert/delete statements should only be used on custom tables.