Sha256: a4c1532d73b90cab5d1d0e72c738982ef616bd820ed7daecf63fbfd8f5ca3cdc

Contents?: true

Size: 700 Bytes

Versions: 34

Compression:

Stored size: 700 Bytes

Contents

require 'rubygems'

module Factor
  module Runtime
    class WorkflowInstance
      attr_accessor :id, :attributes, :start_message, :workflow
    
      def initialize(workflow,attributes)
        @id=SecureRandom.hex
        @attributes = attributes
        @workflow = workflow
        @start_message = Message.new(@attributes)
        @start_message.workflow_instance_id=@id
        @start_message.position=["start"]
      end
    
      def get_activity(position)
        last_position=@workflow
        position.each do |section|
          return nil if last_position[section].nil?
          last_position=last_position[section]
        end
        last_position
      end
    
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
factor-0.1.10 lib/runtime/workflow_instance.rb
factor-0.1.09 lib/runtime/workflow_instance.rb
factor-0.1.07 lib/runtime/workflow_instance.rb
factor-0.1.06 lib/runtime/workflow_instance.rb
factor-0.1.05 lib/runtime/workflow_instance.rb
factor-0.1.04 lib/runtime/workflow_instance.rb
factor-0.1.03 lib/runtime/workflow_instance.rb
factor-0.1.02 lib/runtime/workflow_instance.rb
factor-0.1.01 lib/runtime/workflow_instance.rb
factor-0.1.00 lib/runtime/workflow_instance.rb
factor-0.0.99 lib/runtime/workflow_instance.rb
factor-0.0.98 lib/runtime/workflow_instance.rb
factor-0.0.97 lib/runtime/workflow_instance.rb
factor-0.0.96 lib/runtime/workflow_instance.rb
factor-0.0.95 lib/runtime/workflow_instance.rb
factor-0.0.94 lib/runtime/workflow_instance.rb
factor-0.0.93 lib/runtime/workflow_instance.rb
factor-0.0.92 lib/runtime/workflow_instance.rb
factor-0.0.91 lib/runtime/workflow_instance.rb
factor-0.0.90 lib/runtime/workflow_instance.rb