Using RegEx in POJO j2ee_parameter: s3.FileName parameter for File Monitor job
search cancel

Using RegEx in POJO j2ee_parameter: s3.FileName parameter for File Monitor job

book

Article ID: 368402

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

Is it possible to specify RegEx, like asterisk (*) in a POJO file monitor job to monitor for multiple files?

Resolution

Yes, RegEx is supported in the j2ee_parameter: s3.FileName parameter.
Enclose the file name in double-quotes.

Example JIL:

/* ----------------- POJO_TEST_FM ----------------- */


insert_job: POJO_TEST_FM   job_type: POJO
machine: machine.example.com
owner: XXXXXX@admin
permission: ge,gx,we,wx
date_conditions: 0
description: "Autosys S3 test job - file monitor"
term_run_time: 10
alarm_if_fail: 1
alarm_if_terminated: 1
method_name: create
j2ee_parameter: s3.Endpoint=https\://s3.us-east-1.amazonaws.com
j2ee_parameter: s3.AccessKey=$$sec_profile^s3@tstreports@<k>accesskey</k>
j2ee_parameter: s3.AccessKeySecret=$$sec_profile^s3@tstreports@<k>accesskeysecret</k>
j2ee_parameter: s3.Region=us-east-1
j2ee_parameter: s3.BucketName=tstbucket-java-s3-poc-test
j2ee_parameter: s3.FileName="tst_reports/my_test_file*.xlsx"
j2ee_parameter: s3.SteadyState=20S
j2ee_parameter: s3.FileSize=100
j2ee_parameter: s3.SleepInterval=2
j2ee_parameter: s3.QueryParam="max-keys=100"
j2ee_parameter: s3.UseRegex=false
j2ee_parameter: s3.Strategy=""
j2ee_parameter: s3.RoleARN=arn\:aws\:iam\:\:296415919992\:role/test-java-s3-poc
j2ee_parameter: s3.RoleSessionName=tstusr
j2ee_parameter: s3.LogLevel=16
j2ee_parameter: s3.FailureInterval=3
j2ee_parameter: s3.ReturnFileURI=true
class_name: com.broadcom.pojo.s3.S3AWS