<stream-monitor-process>

Purpose/Function

Extension to <simple-process> which allows one to attach a monitor to the stdout and stderr streams.

Attributes

NAME

TYPE

DEFAULT VALUE

DESCRIPTION

dumpEnvironment

boolean

false

print the environment to a file before executing (for debugging purposes)

executionDir

java.lang.String

user.dir system property

execute in this directory

inFile

java.lang.String

null

redirect stdin to process from this file

inheritEnvironment

boolean

true

run process in parent's environment

Elements

TAG

TYPE

COUNT

DESCRIPTION

<command-line>

java.lang.String

0:1

command to execute

<environment>

java.util.List

0:1

list of environment variable definitions (name=value); if inheritEnvironment is true, these are added to the parent environment; if not, they constitute the new environment

<err-monitor>

ncsa.tools.ogrescript.process.types.StreamMonitor

0:1

attach this monitor to the error stream

<out-monitor>

ncsa.tools.ogrescript.process.types.StreamMonitor

0:1

attach this monitor to the output stream

ReturnValues

None.

NOTES

For further explanation of triggers and triggered actions on streams, see under StreamMonitorTrigger and StreamSegmentTriggeredAction.

Examples

<ogrescript>
...
   <stream-monitor-process execution-dir="${runtime.dir}">
   	<command-line>${runtime.dir}/testprocess.sh</command-line>
   	<out-monitor>
   	   <trigger>
              <filter pattern=".*.DATA"/>
   		 <actions>
   		     <stream-file-write-action path="${runtime.dir}/simple.log" append="false"/>
   		 </actions>
   	   </trigger>
   	</out-monitor>
   </stream-monitor-process>
...
</ogrescript>
  • No labels