Created
December 16, 2009 13:34
-
-
Save cbeer/257820 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2009-12-16 08:41:18.618013 20091216-bedogebumo ps launch name=test_xml | |
2009-12-16 08:41:18.675343 20091216-bedogebumo wi received 0_0_0 pp | |
2009-12-16 08:41:18.681364 20091216-bedogebumo wi dispatched 0_0_0 pp | |
2009-12-16 08:41:18.710371 20091216-bedogebumo wi received 0_0_2 pp | |
2009-12-16 08:41:18.715438 20091216-bedogebumo wi dispatched 0_0_2 pp | |
2009-12-16 08:41:18.725998 20091216-bedogebumo ps terminated 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2009-12-16 08:38:12.794249 20091216-sorunopo ps launch name=test | |
2009-12-16 08:38:12.852108 20091216-sorunopo wi received 0_0_0 pp | |
2009-12-16 08:38:12.856482 20091216-sorunopo wi dispatched 0_0_0 pp | |
2009-12-16 08:38:12.867134 20091216-sorunopo ps launch_sub _9227900 0_0_1_0 | |
2009-12-16 08:38:12.874196 20091216-sorunopo ps launch_sub _9227901 0_0_1_0 | |
2009-12-16 08:38:12.885101 20091216-sorunopo ps launch_sub _9227902 0_0_1_0 | |
2009-12-16 08:38:12.903571 20091216-sorunopo wi received _9227900 0_0_1_0 ci_pp | |
2009-12-16 08:38:12.908753 20091216-sorunopo wi dispatched _9227900 0_0_1_0 ci_pp | |
2009-12-16 08:38:12.909195 20091216-sorunopo wi received _9227901 0_0_1_0 ci_pp | |
2009-12-16 08:38:12.914168 20091216-sorunopo wi dispatched _9227901 0_0_1_0 ci_pp | |
2009-12-16 08:38:12.914567 20091216-sorunopo wi received _9227902 0_0_1_0 ci_pp | |
2009-12-16 08:38:12.919402 20091216-sorunopo wi dispatched _9227902 0_0_1_0 ci_pp | |
2009-12-16 08:38:12.965902 20091216-sorunopo wi received 0_0_2 pp | |
2009-12-16 08:38:12.970204 20091216-sorunopo wi dispatched 0_0_2 pp | |
2009-12-16 08:38:12.979917 20091216-sorunopo ps terminated 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
$:.unshift('lib') | |
require 'ruote/engine' | |
require 'ruote/log/logger' | |
require 'ruote/log/fs_history' | |
require 'ruote/part/fs_participant' | |
require 'ruote/part/block_participant' | |
require 'ruote/part/smtp_participant' | |
$engine = Ruote::FsPersistedEngine.new(:definition_in_launchitem_allowed => true, :s_logger => $logger) | |
$engine.add_service :s_logger, Ruote::FsHistory | |
fields = { :assets => ['a', 'b', 'c']} | |
require 'pp' | |
$engine.register_participant(:pp) do |workitem| | |
pp workitem | |
end | |
$engine.register_participant(:ci_pp) do |workitem| | |
pp workitem | |
end | |
definition = Ruote.process_definition :name => 'test' do | |
sequence do | |
participant 'pp' | |
concurrent_iterator :on_field => :assets, :to_field => 'v' do | |
participant 'ci_pp' | |
end | |
participant 'pp' | |
end | |
end | |
definition_xml = ' | |
<?xml version="1.0"?> | |
<process-definition name="test_xml"> | |
<sequence> | |
<participant ref="pp" /> | |
<concurrent-iterator on-field="assets" to-field="v"> | |
<participant ref="ci_pp" /> | |
</concurrent-iterator> | |
<participant ref="pp" /> | |
</sequence> | |
</process-definition>' | |
#li = Ruote::Launchitem.new definition, fields | |
li = Ruote::Launchitem.new definition_xml, fields | |
$engine.launch li | |
sleep 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment