Hello,

Indeed, you're right, but i can't use this.

Suppose that i want to store the value and print it five minutes later
with a rule with window (whatever which one).
Suppose that i receive two message which match the same pattern.

Like

<id>0</id><name>N1</name> I'm fine
<id>1</id><name>N2</name> I'm fine again

So i'm going to create 2 dynamic contexts C_<name> with value <id> So,
i will have

C_N1 contains 0
C_N2 contains 1

So, i can't use "copy <variable>" action because <variable> can't be
created dynamically. And i can't have the same variable for the two
messages.

And it's not to upset you :-D but i can't use report because in
reality i need to make some treatment with this id. My first try was
to create a script and to call it from sec.pl. But i must keep the
message order and with the script, it was not possible so i modified
sec.pl and add an action. So my action looks like :

action=send_ack <context>;

For the moment in this action function, i get the element into
<context> but i would like to have an action like this :

action=send_ack <id>;

Best regards,

Antonin.

2009/11/29 John P. Rouillard <rou...@cs.umb.edu>:
>
> Hello Antonin:
>
> In message <4a4916a50911281346q73955150gbd255a9210065...@mail.gmail.com>,
> antonin mora writes:
>>with sec.pl, after adding a value into a context with command "fill",
>>i would like to print this value with the command write, how can i do
>>it ? And if it's not possible how can i do it differently ? (without
>>using report and a script)
>
> Try:
>
>  action =  fill context ...; copy context %{myvar}; write filename %{myvar}
>
> this should copy the content of the context into a variable (myvar)
> and then write the variable value into a file.
>
> Also the action
>
>  report context cat >> filename
>
> will work fine. No need for a script. I am not sure which is faster
> however.
>
>
> --
>                                -- rouilj
> John Rouillard
> ===========================================================================
> My employers don't acknowledge my existence much less my opinions.
>

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to