The process itself writes one or more files. I would like to filter the files
for relevant messages and print them to STAXMon. So I think about
some lines of Jython that work similar to "tail -f FILE | grep XXXX" and
use Jython 'print' to bring the output to STAXMon. Does it make
sense to do it in <process-action>?


You said:
If a block is terminated and the block contains one or more <process> elements, 
then STAX will attempt to stop the process(es) before terminating the block 
(but if a process cannot be terminated, it terminates the block anyway).
I tried some small scenarios. There, when a process catched the
termination signal (e.g. SIGINT), STAX waited for the process'
postprocessing and termination. Did I miss something?
What is the criteria for STAX to suppose that the process cannot be
terminated? Does STAX continue processing behind the block while
the process still is running?

Bodo




________________________________
From: Sharon Lucas [mailto:luc...@us.ibm.com]
Sent: Wednesday, July 08, 2009 5:58 PM
To: Strösser, Bodo
Cc: 'staf-users@lists.sourceforge.net'
Subject: Re: [staf-users] How to stop "process-action"


What is it you want to do within a <process-action> element?  If you told me 
that I think I could answer your questions better.

The reason you'd want to use the <process-action> element is if you wanted to 
interact with the process while it is running.  To do that you can use the 
STAXProcessHandle variable to obtain the process' handle (if the process was 
not started using the 'shell' mode).  Note that the STAX User's Guide contains 
an example of how to use the <process-action> to send a message via the QUEUE 
service to the process (just an example of one thing you can do to interact 
with a process via a <process-action>).

Note that if you simply want to know when a process completes, you'll know this 
after the <process> element completes and you don't need a <process-action> 
element.

If a block is terminated and the block contains one or more <process> elements, 
then STAX will attempt to stop the process(es) before terminating the block 
(but if a process cannot be terminated, it terminates the block anyway).

I think if you simply try using the <process-action> element, you'll better 
understand how it works (if you really have a need to use it).

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313



Strösser, Bodo <bodo.stroes...@ts.fujitsu.com>

07/08/2009 09:58 AM

To
"'staf-users@lists.sourceforge.net'" <staf-users@lists.sourceforge.net>
cc
Subject
[staf-users] How to stop "process-action"





Hi,

I would like to have a Jython-<script> running in parallel to a process using 
<process-action>.
STAX User Guide tells me 'If the process completes before the task completes, 
the process
will remain in a non-complete state until the task completes.'
So, how can the script observe the process to make sure that it exits after the 
process has
exited?
And what will happen if the process is killed by a block termination from 
STAXMon? AFAICS,
STAX waits for the process to exit after sending the signal. Does it also wait 
for termination
of <process-action>?

Best regards
Bodo

 ------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: 
http://p.sf.net/sfu/Challenge_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to