Skip to content

Instantly share code, notes, and snippets.

@cfalzone
Created June 13, 2014 14:25
Show Gist options
  • Save cfalzone/09540b01df2573697e95 to your computer and use it in GitHub Desktop.
Save cfalzone/09540b01df2573697e95 to your computer and use it in GitHub Desktop.
## SET UP JOB FROM QUERY STRING
#if($URLMapContent || $UtilMethods.isSet($request.getParameter('jobId')))##
#set( $jobID = $!URLMapContent.agentId )##
#if( !$UtilMethods.isSet( $request.getParameter('jobId') ) )##
#set( $jobID = $!URLMapContent.agentId )##
#end##
#if($UtilMethods.isSet( $jobID ))##
#set($jobQuery = "+structureName:aquentJob +aquentJob.jobId:${jobID}")##
#set($URLMapContent = $dotcontent.pull($jobQuery,1,'').get(0))##
## GRAB THE JOB AGENT AS WELL
#set($agentQuery = "+structureName:Agents +Agents.isActive:true +Agents.agreeConditions:true +Agents.agentId:${URLMapContent.agentId}")##
#set($agent = $dotcontent.pull($agentQuery,1,'').get(0))##
#else##
<!-- M: no jobID found -->
#end##
#end##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment