Script Element not moving files through
Posted: Wed Jan 18, 2012 3:59 pm
I have a script element that seems to be running ok in testing, but the files are not being passed through.
This is my first scripting attempt. Is there something obvious i'm missing that says pass data along?
My entire code is below.
Thanks
// Is invoked each time a new job arrives in one of the input folders for the flow element.
// The newly arrived job is passed as the second parameter.
function jobArrived( s : Switch, job : Job )
{
var myFile = new File("C:/Users/macprep/Desktop/log.txt");
myFile.open( File.WriteOnly | File.Append );
myFile.writeLine( job.getVariableAsString("[Metadata.Text:Path="/Orders/Order/OrderNumber",Dataset="Xml",Model=XML]", s) );
myFile.close();
}
// Is invoked at regular intervals regardless of whether a new job arrived or not.
// The interval can be modified with s.setTimerInterval().
function timerFired( s : Switch )
{
}
This is my first scripting attempt. Is there something obvious i'm missing that says pass data along?
My entire code is below.
Thanks
// Is invoked each time a new job arrives in one of the input folders for the flow element.
// The newly arrived job is passed as the second parameter.
function jobArrived( s : Switch, job : Job )
{
var myFile = new File("C:/Users/macprep/Desktop/log.txt");
myFile.open( File.WriteOnly | File.Append );
myFile.writeLine( job.getVariableAsString("[Metadata.Text:Path="/Orders/Order/OrderNumber",Dataset="Xml",Model=XML]", s) );
myFile.close();
}
// Is invoked at regular intervals regardless of whether a new job arrived or not.
// The interval can be modified with s.setTimerInterval().
function timerFired( s : Switch )
{
}