How to Execute a Workflow From Another Workflow?

Options
DomoDork
DomoDork Contributor

I have a workflow that does some data validation and outputs some rows of data to a result object. I want to take that result object and execute a second separate workflow that accepts that result object as an input parameter. But I can't find any documentation on executing a workflow from a workflow and passing around parameters. Does anyone have any samples showing the way to do this?

Tagged:

Best Answer

  • JosephMeyers
    JosephMeyers Domo Employee
    Answer ✓
    Options

    Are we talking workflows or dataflows here? Workflows have a service task to start another workflow called START WORKFLOW. You can find this in function library when you go to select a service task.

Answers

  • MarkSnodgrass
    Options

    You can take your result object of your first workflow (which would be your output dataset) and make it the input dataset of your second workflow. To use these objects as "parameters" against your main dataset in your second workflow, you can set a constant of 1 on both datasets and join on that value. This will make it so your input parameter is repeated on every row of your main dataset. You can then use a filter tile to filter against your parameter.

    Hope that make sense.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • DomoDork
    DomoDork Contributor
    Options

    Hey Mark,

    That part makes total sense (how to pass parameters about between workflows). The part thats not clicking for me is how to execute the second workflow from the first. I assume you do it with a code engine package and hit an API but maybe I'm misunderstanding how workflows interact with one another.

  • MarkSnodgrass
    Options

    Each workflow has a settings tab which is where you can schedule how it should be kicked off. Your 2nd workflow can be kicked off by when your input dataset is updated. Choosing the Trigger of When Datasets Update and then selecting the appropriate datasets will cause your 2nd dataflow to once any of the selected datasets are updated.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • JosephMeyers
    JosephMeyers Domo Employee
    Answer ✓
    Options

    Are we talking workflows or dataflows here? Workflows have a service task to start another workflow called START WORKFLOW. You can find this in function library when you go to select a service task.

  • DomoDork
    DomoDork Contributor
    Options

    @JosephMeyers - that was it, thanks! I dont know why but I somehow missed 'Start Workflow' when scrolling through the list of service tasks. It was at the very bottom and I guess I didnt scroll far enough. Before that I kept looking in the code engine area and since it wasnt listed there, I figured it wasnt something built in unless I create a function for it myself.

    Thanks for the solve. Much appreciated.

  • DanHendriksen
    DanHendriksen Domo Employee
    Options

    @DomoDork - it also isn't visible until you have a workflow deployed, so it could have been that you simply hadn't deployed your first workflow yet.