lib/ruote/exp/fe_subprocess.rb in ruote-2.1.11 vs lib/ruote/exp/fe_subprocess.rb in ruote-2.2.0

- old
+ new

@@ -1,7 +1,7 @@ #-- -# Copyright (c) 2005-2010, John Mettraux, jmettraux@gmail.com +# Copyright (c) 2005-2011, John Mettraux, jmettraux@gmail.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -144,9 +144,31 @@ # subprocess 'inventory_check' # inventory_check # # The latter may make process definitions quite readable (but blur the # distinction between expressions, call to participants or to subprocesses). + # + # + # == subprocess trees bound at engine level + # + # It's OK to place a process tree directly in an engine variable : + # + # engine.variables['inventory_check'] = Ruote.process_definition do + # cursor do + # manager :task => 'hire inventory team' + # floor_manager :task => 'lead inventory' + # manager :task => 'check results' + # rewind :unless => '${inventory_successful}' + # end + # end + # + # Then, from the main process : + # + # sequence do + # # ... + # inventory_check + # # ... + # end # class SubprocessExpression < FlowExpression names :subprocess