ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianfranco Boccalon <gbocca...@tiscali.it>
Subject Re: Missing Variable value in VariableModificationEvent
Date Wed, 21 Nov 2007 16:30:44 GMT
Sure, if you provide the new variable value directly in the event, it 
should be ok for me.

Thanks
Gianfranco


Matthieu Riou ha scritto:
> On Nov 21, 2007 5:09 AM, Gianfranco Boccalon <gboccalon@tiscali.it> wrote:
>
>   
>> I solved my problem, but I think that this is an ODE bug or
>> misunderstanding about events.
>> The problem was that I receveid a VariableModificationEvent, but asking
>> for the variable value through the eventContext, I was getting null.
>>
>> The problem was that the variable for what I'm receiving the
>> VariableModificationEvent, was not in the current scope, but in a parent
>> scope: so the only solution I found was storing also the previous
>> contexts and when such situation occurs, I search also in the previous
>> scopes (the parent scopes).
>>
>> This workaround works only if the process is executed with "in-memory"
>> mode, and I think that this can be a problem in real world processes.
>>
>> Any suggestion ?
>>
>>     
>
> I'm now regretting the addition of this method on EventContext as there's no
> way it can be fixed for persistent processes. The problem is that when you
> receive an event, the transaction is usually not committed yet, so relying
> on a finder to get the variable value won't return anything from the
> database. The variable scoping problem can be fixed but not the
> transactional one.
>
> So I think I'm going to deprecate this interface and now include the
> variable new value directly in the event. Would that work for you?
>
> Cheers,
> Matthieu
>
>
>   
>> Gianfranco Boccalon
>>
>>
>>
>> Gianfranco Boccalon ha scritto:
>>     
>>> Hi all,
>>> I have a problem on a listener that I wrote for monitoring my processes.
>>> My process contains a Invoke activity, so the events that I receives
>>>       
>> are:
>>     
>>> .....
>>>
>>> ActivityExecStartEvent:
>>>        Type = activityLifecycle
>>>        ActivityType = OInvoke
>>>
>>> ProcessMessageExchangeEvent:
>>>        Operation = getOrder
>>>
>>> VariableModificationEvent:
>>>        Type = dataHandling
>>>        VarName = wsOutput
>>>
>>> ActivityExecEndEvent:
>>>        Type = activityLifecycle
>>>        ActivityType = OInvoke
>>> .....
>>>
>>>
>>> In correspondance of the VariableModificationEvent, I try to retrieve
>>> the variable value through the EventContext, but I receive null.
>>> I tried also to delay the retrieving of the value in the
>>> ActivityExecEndEvent, but I get always null.
>>>
>>> Is there a way to get the value of the response variable used in the
>>> invoke activity ?
>>>
>>> Thanks
>>> Gianfranco Boccalon
>>>
>>>       
>>     
>
>   


Mime
View raw message