Sha256: 6c2e7a7c7a839194d6e1496befe70040444121509029856d28e4a8a0ac83b36c
Contents?: true
Size: 485 Bytes
Versions: 2
Compression:
Stored size: 485 Bytes
Contents
# frozen_string_literal: true $LOAD_PATH.unshift(File.expand_path("../../lib", __dir__)) require "dev_suite" # Create a workflow with a looping step engine = DevSuite::Workflow::Engine.new(iteration_count: 0) # Add a loop step loop_step = DevSuite::Workflow.create_loop_step("Repeat Task", 3) do |context| iteration = context.get(:iteration_count) + 1 context.update({ iteration_count: iteration }) puts "Iteration #{iteration}" end engine.add_step(loop_step) engine.execute
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dev_suite-0.2.9 | examples/workflow/loop_workflow.rb |
dev_suite-0.2.8 | examples/workflow/loop_workflow.rb |