Skip to content

Instantly share code, notes, and snippets.

@kellyp
Created July 25, 2011 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kellyp/1103269 to your computer and use it in GitHub Desktop.
Save kellyp/1103269 to your computer and use it in GitHub Desktop.
[
"process_definition",
{
"name":"error retry all"
},
[
[
"sequence",
{
"tag":"main",
"on_error":"handle_error"
},
[
[
"concurrence",
{
},
[
[
"sequence",
{
},
[
[
"participant",
{
"composition_phase_id":32,
"command":"/error/error",
"ref":"test"
},
[
]
]
]
]
]
]
]
],
[
"define",
{
"name":"handle_error"
},
[
[
"sequence",
{
},
[
[
"sequence",
{
},
[
[
"set",
{
"value":"retry all",
"field":"fail_type"
},
[
]
],
[
"participant",
{
"ref":"on_error"
},
[
]
],
[
"set",
{
"value":true,
"field":"__retry__"
},
[
]
],
[
"_redo",
{
"ref":"main",
"unless":"$
{
f:__error__
}
== nil or $
{
f:__retry__
}
== false"
},
[
]
]
]
],
[
"concurrence",
{
},
[
[
"sequence",
{
},
[
[
"set",
{
"value":"There was an error!",
"field":"body"
},
[
]
],
[
"participant",
{
"composition_phase_id":30,
"command":"/irc/notify",
"ref":"irc"
},
[
]
]
]
]
]
]
]
]
]
]
]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment