Hi, apologize in advance, I will try my best to explain as brief as possible but it might be a little long. I have created dummy flows (as seen below) to help explain.
Essentially, I have a workflow that uses a macro to pull information from jira. I will explain the workflow logic, since it is relevant to my issue.
The Jira macro creates data in two different formats. The first format is summary data that is passed right into the flow from the output anchor. The second output is a file that is created by the macro and output to a folder. That file is brought back into the flow to combine with the summary data using a batch macro.
To explain further, the batch macro has 2 paths.The file output is not always created, so I do not always want to look for it. If the file is created, the macro pushes the data through a flow that has a dynamic input tool. If the file is not created, the Macro pushes the data through a flow that does not have dynamic input. This helps me to avoid errors with the dynamic input tool in the case that the file does not exist.
Getting into my issue, I have the two flows as shown above. The one on top with two Jira Macros is the current version that works, and the bottom one is a new version that I want to get working, but does not. My goal is get to the second flow to work. I don't want to have to run 2 of the same macro to make it work since they pass the same data.
The issue that I think I am having, is that the summary data is created first by the Jira Macro, followed by the file output. In the second flow, which is the one with issues, the summary data is passed through the flow and triggers the second macro before the file is created. Because of this, in the case that there is a file, the dynamic input tool searches for the file that has not yet been created. Basicially, the batch macro runs before the first one is even done creating both of its outputs.
For some reason, the flow on top works. Having a 2nd Jira macro passing into the flow makes it so that the 1st Jira macro create both the summary and file output before the batch macro runs.
I can just use that flow if there is no way to only use 1 Jira Macro, but I want to see if there is a way because using only 1 Jira Macro would be a lot cleaner.
Sorry if that is confusing, I know it is a lot. Please let me know if you need any clarification since something that may seem clear to me may not be clear to others.
Thank you!
Have you tried working with the Block Until Done tool? https://help.alteryx.com/20221/designer/block-until-done-tool
I think you would need to include this inside your Jira macro so that no data is output from the macro until the file written inside the macro is complete. Here is a screenshot of what that would look like generally:
I had a recent similar issue with a macro. I fixed the timing issue using the CReW macro Parallel Block Until Done.
In the #2 input and output anchors, I passed the full path to my "file that needs to be created/updated before it's read in, during the next macro iteration". Then the #2 output was passed to a Dynamic Input. I actually used 2 Parallel tools, because the macro had 3 inputs.
Chris
Hi Megan,
Thank you for getting back. Good to know thank you! I have never thought about using a block until done tool in that way. Unfortunately, I am trying to avoid changing the Jira macro. Creating a new version of the Jira Macro is not something that I should be doing without more of a business case, due to certain boxs that I would have to check.
Hi Chris,
Thank you for getting back! What needs to be completed before anchor #2 runs?
More specifically, what is going through input anchor #1 that verfifies that the file exists and input anchor #2 can now run through?
@tristan_jpmchase for my macro, I don't have a requirement to verify that a file exists. My comment was around the basic need to control sequencing. I know that an Alteryx Designer manager is aware they need a solution to control sequencing, but that won't help you today.
For my third M input, I create a file with [one record, a few fields, all Null values] early in the workflow, which could simulate a "file exists" condition. Could you possibly change your logic a bit, where you change the [file may or may not exist] to something like [file always exists, but a file with one Null record is considered a blank file]?
Guessing you've already considered the Detour tool?
Chris
Hi Chris,
I'm not sure I fully understand. Are you asking if I could change my logic for how the macro 2 decides if the file exists or not?
If that is what you are asking, I am currently using a detour tool, or detour tool equivelent where I am disabling containers based on control parameters.
Best,
Tristan
I was focused on this part:
The file output is not always created, so I do not always want to look for it
I thought that if you always had a file (even a file with one blank record, to represent a Null file), then you could overcome the problem "I do not always want to look for it".
At this point, I think I'm back to.... I don't fully understand the problem. I appreciate you've tried to describe the issue with words, but it's difficult to help without a sample workflow. Especially since you're calling a batch macro, I haven't seen the macro, and you mentioned use of detours and containers.
Any chance at all you could post a sample workflow and the batch macro? You may need to mock up a test version and test data, but that may be the best option at this point.
Chris
Hi Chris,
Yeah, I figured that might happen when I was writing up the problem. Thank you for trying to understand with what I had provided! I will have to do some work on a moc up of some sort.
Best,
Tristan
User | Count |
---|---|
18 | |
15 | |
13 | |
9 | |
8 |