Skip to content

Instantly share code, notes, and snippets.

@anb
Created January 4, 2012 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anb/1559159 to your computer and use it in GitHub Desktop.
Save anb/1559159 to your computer and use it in GitHub Desktop.
class TaskParticipant < Ruote::StorageParticipant
def consume(workitem)
doc = workitem.to_h
doc.merge!(
'type' => 'workitems',
'_id' => to_id(doc['fei']),
'participant_name' => doc['participant_name'],
'wfid' => doc['fei']['wfid'])
doc['store_name'] = @store_name if @store_name
if workitem.lookup('params.options.continue_process')
reply_to_engine(workitem)
else
@context.storage.put(doc)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment