How to configure the JavaScript Task or JavaScript Component

How to configure the Javascript Task or JavaScript Component

COZYROC provides many prewritten JavaScripts that can be used in the JavaScript Task and the JavaScript Component.  You can also write your own JavaScripts from scratch using the JavaScript Task and JavaScript Component.

To locate and use the provided JavaScripts on the COZYROC website follow the screen capture and example below. Some of these scripts are for use in conjunction with the JavaScript Task and some are for use in conjunction with the JavaScript Component.  To find out which to use the provided Javascripts with, please read the particular documentation page for the specific JavaScript provided.

Note: While using the JavaScript Component is somewhat similar, this example is specific to a JavaScript used in the JavaScript Task.

Example using JavaScript Task:
  1. Download one of the COZYROC provided JavaScripts to your machine or write your own.  In this example we will be using the Javascript called "HTTP Upload Download Task" provided by COZYROC and located here:
  3. Drag a JavaScript Task to the Control Flow
  5. Double Click the JavaScript Task to open the Editor. A default script shell is shown in the Script tab.  Click the button in lower left to “Import JavaScript code from file”.
  7. The COZYROC provided JavaScript is populated into the JavaScript Task. Information is given directing you to enter values for parameters created from the script. You will enter the appropriate values for the parameters in the parameters tab, so click on it now.
  9. Change the “Action” to “Download File”. Enter a RemoteUrl for file to be downloaded.  In TargetFile create a File Connection Manager of Usage type: “Create File” and give path and filename where file will be downloaded to.
  11. After pressing the OK button the Connection Manager name will take on the name of the file name that was given.
  13. You should be able to run the package from here.  Variables could be added to this sample for properties such as the Action, RemoteUrl and properties in the TargetFile Connection Manager to create a more dynamic package.

    Book a Presales Call

    Are you new to COZYROC and evaluating our solutions? 
    Book a Presales Call with us now and get 5% off SSIS+.