Created
June 13, 2014 14:43
-
-
Save cfalzone/3ee8091ef36ee917a1ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## SET UP JOB FROM QUERY STRING | |
#if(!$UtilMethods.isSet($URLMapContent))## | |
#if( !$UtilMethods.isSet( $request.getParameter('jobId') ) )## | |
#set($jobID = $request.getParameter('jobId'))## | |
#set($jobQuery = "+structureName:aquentJob +aquentJob.jobId:${jobID}")## | |
#set($jobSort = "modDate desc")## | |
#else## | |
#set($jobQuery = "+structureName:aquentJob")## | |
#set($jobSort = "random")## | |
#end## | |
#set($list = $dotcontent.pull($jobQuery,1,$jobSort))## | |
#if($UtilMethods.isSet($list) && $list.size() > 0)## | |
#set($URLMapContent = $list.get(0))## | |
#end## | |
#end## | |
#if($UtilMethods.isSet($URLMapContent))## | |
## GRAB THE JOB AGENT AS WELL | |
#set($agentId = $URLMapContent.agentId)## | |
#if($UtilMethods.isSet($agentId))## | |
#set($agentQuery = "+structureName:Agents +Agents.isActive:true +Agents.agreeConditions:true +Agents.agentId:${agentId}")## | |
#set($list = $dotcontent.pull($agentQuery,1,'modDate desc'))## | |
#if($UtilMethods.isSet($list) && $list.size() > 0)## | |
#set($agent = $list.get(0))## | |
#end## | |
#else## | |
<!-- M: job has no agent --> | |
#end## | |
#else## | |
<!-- M: no job found --> | |
#end## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment