Avatar

Level 3

Hi @sarrankanp50398,

Steps:
1. Create a workflow
2. Save name of file(whole location) in a variable(like varFile)
3. In javascript activity, Read the file and save in a variable( you an use below code)

//read package file
var f = new File("varFile")
f.open("r", File.CODEPAGE_UTF8)
var readFile
var line
while( line = f.readln() )
readFile=readFile+line;
f.close()

 

var elementsToImport = <entities schema="xtk:srcSchema"/>;
elementsToImport.appendChild(readFile);
var wholePackage = <builder><package buildNumber="*">{elementsToImport}</package></builder>;
xtk.builder.InstallPackage(wholePackage);


Above code is just for reference, I haven't tested it, so you might need to make some changes.

Hope it will help.