John Mettraux schrieb:
> On Tue, Jan 26, 2010 at 11:17 PM, Torsten Schoenebaum
> <[email protected]> wrote:
>> Having a look in the work dir:
>> $ ls -la \
>> work_development/workitems/wa/wi_0_0_5_0\!\!20100126-bipupobawa.json
>> -rw-r--r-- 1 tsc tsc 0 2010-01-26 15:08
>> work_development/workitems/wa/wi_0_0_5_0!!20100126-bipupobawa.json
>>
>> The json file is empty. Is that correct?
>
> no this is not correct.
>
> I will investigate that tomorrow morning (GMT+9), if meanwhile you
> have a way of shortening the test that would be great.
Did some investigation.
To simplify the matter:
Register a storage participant:
storage_participant = engine.register_participant('step_.*',
Ruote::StorageParticipant)
Launch a simple process:
wfid = engine.launch(Ruote.process_definition{sequence{step_one; step_two}})
Now there is a workitem in the storage participant:
items = storage_participant.by_wfid(wfid)
=> [<...>]
Reply this workitem:
storage_participant.reply(items.first)
After some time, there should be a new workitem in the storage
participant, but there isn't.
storage_participant.by_wfid(wfid)
The error is done at writing time as you mentioned in #ruote. See line
91 of cloche.rb:
return true if cur.nil? && doc['_rev'] != -1
cur is nil in this case, as the expression is entered the first time;
the json file has just been touched and is therefore empty. But
doc['_rev'] is 0 (the attribute has been left in the workitem) so the
Cloche#put is left before any writing is done and the json file will be
empty forever...
A possible workaround would be to remove the _rev attribute from the
workitem before replying it to the engine. Should I do this in my
project or should it be done by Ruote itself?
Many thanks again,
Torsten
>
> (
> extra info copied from IRC :
>
> 23:19 tosch_le: ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
> 23:20 tosch_le: on karmic koala
>
> @storage_participant ||= Ruote.engine.context.plist.lookup('workflow_step_.*')
> )
>
> TTYL, thanks for the report,
>
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en