Perl SDK Module: ZoomVantage


ZoomVantage – Helper methods to interact with Vantage


Ensure the Perl SDK is setup.


use ZoomVantage;
my $jobId = ZoomVantage::submitFileToVantage($wfId, $in, $jobName, $outpathkey, $params_href); 



Usage: getVantageWorkflowId($workflowName)

Given a valid vantage workflow name, returns the corresponding workflow id

my $workflowId = ZoomVantage::getVantageWorkflowId('Hires Ingest');


Usage: submitFileToVantage($wfId, $in, $jobName, $outpathkey, $params_href)

Submits the input file to Vantage for processing. On successful submission returns the job id, otherwise undef

my $jobId = ZoomVantage::submitFileToVantage($wfId, $in, $jobName, $outpathkey, $params_href);
$wfid - Vantage Workflow id
$in - Input file path
$jobName - Job Name which will be displayed in Vantage job monitoring
$outpathkey - Variable name used by Vantage to determine the output file path
$params_href - Hashmap reference to a table of variables with key matching Vantage variable name


Usage: getJobState($jobId)

Given a vantage job id, returns the status of the job. Job status can be any of Active | Failed | StoppedByUser | Complete | WaitingToRetry | Waiting

my $jobId = ZoomVantage::submitFileToVantage($wfId, $in, $jobName, $outpathkey, $params_href);
my $jobStatus = ZoomVantage::getJobState($jobId);


Usage: getSessions($jobId)

Given a job id, returns a map of all the sessions specific to the job and its session id. Use this subroutine to lookup session id by description

my $sessionDesc2Id_href = ZoomVantage::getSessions($jobId);
  my $sessionId = $sessionDesc2Id_href->{'Zoom-deploy'};


Usage: getSessionVariables($sessionId)

Given a session id, returns a map of the session’s variables and its corresponding values. This includes the list of variables set while submitting file to vantage along with its values


Usage: getWorkflowVariableRequirements($workflowId)

Returns the variables required for the input workflow in the form of XML DOM that can be manipulated using XPath and DOM API

my ($dom,$xc) = ZoomVantage::getWorkflowVariableRequirements($workflowId);


Usage: setWorkflowVariables($workflowId, $params_href)

For a given workflow, sets vantage variables with its respective values required for processing a file. Used with getWorkflowVariableRequirements before submitting a file to Vantage

my $ctxDom = ZoomVantage::setWorkflowVariables($workflowId, $params_href);


Usage: extractSingleValueFromXMLResponse($namespace, $xpath, $response)

Given a XML response and xpath as input, returns the first matching value. Used when the xpath is expected to return a single value


Usage: extractValueListFromXMLResponse($namespace, $xpath, $response)

Given a XML response and xpath as input, returns a list of matching values

my $sids_aref = ZoomVantage::extractValueListFromXMLResponse($namespace, $xpath, $response);


Usage: pathForVantage($inPath)

Translates the given path relative to vantage mount

my $vantagePath = ZoomVantage::pathForVantage($inPath);
Below fields should be set in config.ini
inPathPrefix = Prefix to $inPath
outPathMount = Prefix to Vantage Location


Usage: executeRestURL($requestType, $url, \%request_params)

Given a URI and its parameters, queries the vantage REST server and returns response in XML format. If required, use extractSingleValueFromXMLResponse and extractValueListFromXMLResponse to parse the response.

my %params = (identifier => $jobId);
my ($rv, $response) = executeRestURL("GET", "/JobRest/GetSessionsForJob",\%params );

Leave a Comment