Hi,
I am reconciling two input files and looking to get my workflow to do the following:
1. If dates from the two input files are not the same ---> Stop the workflow and send an email to notify users
2. If dates from the input files are the same ---> Continue to run the workflow with the following conditions:
- If records from the two files are completely matched, send an email to relevant recipient to let them know there is 0 exceptions
- If any unmatched records found between the two files, output both matched and unmatched records (as presented in the attachment) and send an email with output file attached to inform recipients of the unmatched records.
Any idea is very much appreciated!
Many thanks
Hey there,
An idea for a solution is using a batch macro where the control parameter is a boolean that activates/deactivates containers inside the macro.
So you would have:
1. Your normal workflow that reconciles the input and checks cases 1 and 2. If case 1 = Create a bool field with value 0, If case 2 = Create a bool field with value 1. After this column, call the batch macro and pass the bool as a control parameter.
2. In your batch macro, create the logic for your second case and add it all inside 1 container. Here you can check the matched numbers and simply use a Filter tool to separate between the 0 exceptions and 1+ exceptions emails.
Still inside the macro, create another container that'll just send the email for your first case results (Files not the same). Then you'll need to connect the control parameter to both containers. One of them will be activated when the parameter = 1 and the other will be !=, so they don't overlap.
Edit: I set up an example here: You'll have 1 workflow that just has the names of the files and the number of matches and then another one that'll check the results and send out emails.
Let me know if you have any questions.
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |