Skip to content

Instantly share code, notes, and snippets.

@ericsmith66
ericsmith66 / ruote
Created May 25, 2011 12:52
onit workflow participant
class OnitParticipant < Ruote::StorageParticipant
include NewRelic::Agent::Instrumentation::ControllerInstrumentation
def get_corporation_id(workitem)
corp_id = RuoteKit.engine.process(workitem.wfid).root_expressions.last.attribute('corporation_id') if workitem
corp_id || -1
end
def consume (workitem)
WorkItem.transaction do