Redwood Documentation

Product Documentation

 

›Agent Definition Types

RunMyJobsPlatform Agents

External Platforms

  • Connecting Redwood Server to External Platforms

Credentials

  • Storing Credentials
  • Credential Protocols

Platform Process Servers

  • On-site Platform Process Servers
  • Cloud Platform Agents
  • Using the Wizard to Create Process Servers
  • Configuring Platform Agents
  • Spool Host Agents
  • The Environment of Platform Agent OS Processes
  • Processing Platform Processes
  • Process Server Services
  • Configuring Agentless Process Servers
  • Automatically Updating Platform Agents
  • Enabling TLS
  • Creating Monitoring Checks
  • Configuring Load Balancing on Platform Agents
  • Platform Agent Registry Entries
  • Monitoring Servers with Platform Process Servers

UNIX Agents

  • UNIX Process Servers
  • UNIX Process Server Configuration Data
  • File Events on UNIX
  • Creating UNIX Process Servers (Advanced)
  • Choosing a User Switching Security Mode
  • Controlling Unix Platform Agents
  • Uninstalling Redwood Server Platform Agents from UNIX

Windows Agents

  • Creating a Microsoft Windows Process Server
  • File Events on Microsoft Windows Process Servers
  • Configuration of a Microsoft Windows Process Server
  • Managed Services
  • Configuring Platform Agents on Microsoft Windows
  • Automating Windows tasks that require a desktop window
  • Uninstalling Redwood Server from Microsoft Windows

Agent Definition Types

  • Using the BASH Definition Type
  • Using the KSH Definition Type
  • Using the CSH Definition Type
  • Using the Perl Definition Type
  • Using the Python Definition Type
  • Using the PowerShell Definition Type
  • Using the Visual Basic Script Definition Type
  • Using the CMD Definition Type
  • Using the R Process Definition Type
  • Using the DCL Definition Type
  • Using Platform Definition Types
  • Using the OS Native Definition Type
  • Microsoft Windows Definition Types
  • Using the SQLPLUS Definition Type
  • Using the FTP Definition Type
  • Using the Groovy Definition Type

Command Line Tools

  • Command Line System Tools
  • jtool
  • jcat
  • jdescription
  • jevent
  • jecho
  • jftp
  • JFTP Return Codes
  • jgetcredential
  • jgetfile
  • jgetpar
  • jjoin
  • jlink
  • jlog
  • jmail
  • jmessage
  • jmonitor
  • jputfile
  • jregister
  • jrfc
  • jscp
  • jtool screenshot
  • jscript
  • jsecret
  • jsleep
  • jsplit
  • api-tool.jar

OpenVMS Process Servers

  • Creating HP OpenVMS Process Servers
  • Installing the Platform Agent on HP OpenVMS
  • Configuring HP OpenVMS Process Servers
  • File Events on HP OpenVMS
  • HP OpenVMS Definition Types

AS/400 Connector

  • IBM AS/400 Connector Architecture
  • Setting up the IBM AS/400 Connector
  • Creating an IBM AS/400 Process Server
  • Files on AS/400 Raise Events
  • Using the AS/400 Definition Type
  • Redwood Server OS Support
  • IBM z/OS Definition Types
  • Using the JCL_FTP Definition Type
  • IBM z/OS System Tools

Reference

  • Balancing the Load
  • Credential Protocols
← Using the FTP Definition TypeCommand Line System Tools →

Using the Groovy Definition Type

Groovy is a programming language that runs on the Java platform. It needs the groovy runtime, which requires a JVM. Groovy is especially recommended for data processing.

Variable and Parameters

Variables that you require to hold intermediary values are defined in the same way as you would normally define variables in Groovy, using the standard syntax int myVar or myVar = "initial value".

Process definition parameters are available directly in Groovy as Java variables, as shown in the examples below.

note

When a process reaches status Error, the Out values of parameters are not set. You can use a Post Running action to set them if required.

Get the sample XML music catalog from w3schools, parse the XML, print some information from it and store the number of CD's in the out parameter OutParameter1.

println "Getting Music Catalog"

catalog = "http://www.w3schools.com/xml/cd_catalog.xml".toURL().text

cds = new XmlSlurper().parseText(catalog)

cds.CD.each {
println it.ARTIST.text()+":  " + it.TITLE.text()
}
// One is missing

println "Simon & Garfunkel: 'The 59th Street Bridge Song'"

//Store number of CD's found in OutParameter1, defined on the process
OutParameter1 = cds.CD.size()

Create an XML directory listing of a directory path specified in the Parameter1 process parameter

//Parameter1 is a String parameter defined on the process
def xml = new groovy.xml.MarkupBuilder()
File dir = new File(Parameter1)

xml.files(type:"current dir list")
{

  dir.eachFile
  { f ->
    file(f.getName())
  }
}

See Also

Groovy's Home

← Using the FTP Definition TypeCommand Line System Tools →
  • Variable and Parameters
  • See Also
Docs
Getting StartedInstallationFinance InstallationConcepts
TroubleshootingArchiving
Learn and Connect
Support Portal
BlogEventsResources
ISO/ IEC 27001 Information Security Management
Automate to be human

2023 All Rights Reserved |

Terms of Service | Policies | Cookies | Glossary | Third-party Software | Contact | Copyright | Impressum |