Hi @sarrankanp50398 ,
you may do it on this way:
- Convert XML package to JSON (open XML package with text editor, copy content and convert it to JSON via online converters)
- Add content to mentioned method and execute it in Java Script node.
Below is example how to import one dummy workflow package (consist of start and end node only) on my test environment.
var params = { "builder": {"package": {"entities": {"workflow": {"activities": {"start": {"transitions": {"initial": { "name": "initial","target": "end"}},"label": "Start","name": "start","x": "117","y": "2510"},"end": {"label": "End","name": "end","x": "257","y": "2509"}},"scenario": {"operation": "none","internalName": "notifySupervisor"},"desc": "Empty template to create a new workflow","folder": {"operation": "none","name": "sunFolder221"},"form": "xtk:workflow","internalName": "WKF4660","label": "test","modelName": "newWorkflow","scenario-cs": "Notification of the workflow supervisor (notifySupervisor)","schema": "nms:recipient"},"schema": "xtk:workflow"},"author": "Milan Vucetic (vucetic)","buildDate": "2020-05-31 17:22:54.563Z","buildNumber": "8981","buildVersion": "6.7"} } }
NLWS.xtkBuilder.InstallPackage(params);
Of course, you should explore options how to automate this.
Regards,
Milan