Sending parameters to next workflow children/detours

Hi

How could I pass parameters from a failed workflow to a new dynamically generated workflow. Ie, current code:

fail = True

if fail:

return FWAction(update_spec={‘fail_retries’: 0}, detours=[failed_check_workflow])

else:

return FWAction(update_spec={‘response’: fw_spec[‘RESULT’]})

Basically I want to be able to dynamically generate a failed workflow at any point during my current workflow. At the moment I can do this but the child workflow has no idea about it’s parent who failed. Is there any way that I could pass data to the next workflow, kind of like I would when I update the spec between tasks?

Or maybe I’m looking at this wrongly?

Thanks again

Zac

Hi Zac,

I am not sure how you are defining the failed_check_workflow, but I assume you are creating it from scratch. When creating that workflow, you can put into it any information you want inside the spec. e.g.:

failed_check_workflow = Workflow.from_Firework(Firework([my_tasks], spec={“old_job”: <YOUR_INFO_HERE>}))

For example, you could put the directory name of the old job, or some string identifier of what that job was. Then the spec of failed_check_workflow contains your needed information.

Best,

Anubhav

···

On Tue, Mar 8, 2016 at 5:58 AM, Zachary Ball [email protected] wrote:

Hi

How could I pass parameters from a failed workflow to a new dynamically generated workflow. Ie, current code:

fail = True

if fail:

return FWAction(update_spec={‘fail_retries’: 0}, detours=[failed_check_workflow])

else:

return FWAction(update_spec={‘response’: fw_spec[‘RESULT’]})

Basically I want to be able to dynamically generate a failed workflow at any point during my current workflow. At the moment I can do this but the child workflow has no idea about it’s parent who failed. Is there any way that I could pass data to the next workflow, kind of like I would when I update the spec between tasks?

Or maybe I’m looking at this wrongly?

Thanks again

Zac

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

Visit this group at https://groups.google.com/group/fireworkflows.

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/0b4d29d0-e36d-4fd3-b094-d95e20a37206%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.