Back to Index |

Code Store - reusable code objects

BlueSky Integration Studio's Code Store lends to re-usable code throughout the system! Code Store gives you the capability to create and test global functions on the fly that can be used in any job. The functions are easy to create and test because you get immediate feedback on whether your function works. Due to the incredible power built into the .NET framework, BlueSky Integration Studio can literally compile your function, pass it your test data and return the results back to you, allowing you to unit test the function before putting into production!

Test Code on the fly!

Building a CodeStore Function

CodeStore is located on the Administrator screen (View->Administrator). When you click the CodeStore icon the CodeStore administrator screen will pop up. This is where you can manage all of your functions including adding new functions, editing existing functions and deleting unused functions.

Each function has an icon next to it. The check mark indicates that the function has been successfully compiled and is available to use in your BlueSky Integration Studio jobs. If the function has an 'X' icon, it means the function has not been successfully compiled and will not be included in your job at compile time.

Because each CodeStore functions code is embedded into your job at compile time, the status of any function used in your job must be a check mark, otherwise it will be ignored and you will get a compiler error indicating it cannot find the function you referenced in your job. You will then need to go back and fix the function and compile it. Note though, that the actual code for the function is embedded directly into your job, it is not referenced as object code. The main reason for compilation is simply to ensure that the function syntax is correct and will compile correctly when it is embedded into a job. Given this, you could have a function that is compiled and used in a job, and say you break it later and it becomes invalid ('X'), it will have no effect on your job until you attempt to compile your job again. This ensures that you can alter a function at any time, even when a job using that function is currently running because it will not be embedded again until the job is recompiled. The reverse is also true: a job will not use the new functionality of an edited function until the job is recompiled.

Creating a new CodeStore Function

- Click the add button on the CodeStore administrator window.

- The first tab is for defining the general attributes of the function such as the functions name, return value and any parameters you want to pass into it. The function name entered is used to create a VB.NET function header, so you must follow standard VB.NET syntax requirements such as no spaces, etc...

- The Code tab is where you will fill in the code for your function. You can code any standard VB.NET code including referencing any valid .NET Framework class or external components (see References).

- The Test tab allows you to test your function by passing in test parameter data. This allows you to unit test your function to ensure it works as expected prior to referencing it in a job. It also ensures the code's syntax is correct and will compile correctly. Enter test values into the parameter fields and click the 'Run Function' button.

Compiler Errors

If you function code contains errors, the Compiler Results window will pop up and give you as much information as possible to assist you in locating and fixing the errors. For instance, let's put a semi-colon after the statement Return 0.

BlueSky Integration Studio will show all of the information from the .NET Framework's CodeDom CompilerResults, as well as the functions code with the appropriate line highlighted showing you immediately where the error occurred. If the error is not related to the code's syntax, but rather a missing reference or other error, it will show those errors in the output window under the Output tab.

© 2003 - 2007 Relational Solutions, Inc. - All rights reserved