Skip to content

Instantly share code, notes, and snippets.

@jmettraux
Created February 2, 2009 06:47
Show Gist options
  • Save jmettraux/56813 to your computer and use it in GitHub Desktop.
Save jmettraux/56813 to your computer and use it in GitHub Desktop.
# in reply to http://groups.google.com/group/openwferu-users/browse_frm/thread/96354a232e2cad8e
# let's assume the engine is accessible via the 'engine' variable and
# that the process instance id (wfid) is '20090119-biropoheku'
process_status = engine.processes_status('20090119-biropoheku')
sequence_expression = process_status.all_expressions.find { |fexp|
fexp.fei.expid == '0.0'
# or
#fexp.class == OpenWFE::SequenceExpression
}
sequence_expression.raw_expression = [
'sequence', {}, [
[ 'get_pictures', {}, [] ],
[ 'concurrence', { 'merge_type' => 'mix' }, [
[ 'user_alice', {}, [] ],
[ 'user_bob', {}, [] ]
] ],
[ 'show_pictures', {}, [] ] # <== adding this participant
]
]
engine.update_expression(sequence_expression)
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment