Peter Clough Posted July 5, 2024 Posted July 5, 2024 I am in the process of building a workflow for when an employee is suspended. The process pulls any significant hardware owned by the employee, specifically laptop, phone, and radio, before later splitting into a number of parallel processes generating human tasks to suspend each item. The workflow does a check on the linked assets, and if it matches the type it's looking for, it proceeds. The issue I have encountered is this. When the check runs to find any radio attached to the job, if there is a radio, it works as expected. If there isn't a radio, it still triggers, instead finding the attached phone. If there is no attached phone, neither triggers. This does not happen in reverse (if there is a radio attached but no phone). The phone and radio are both listed as mobile devices, but have separate Types of Smartphone or Radio, as appropriate. I have so far been unable to find any reason why this would be picking up this way, I'd be grateful for any advice as to where I might be going wrong, or if I've actually found a Hornbill error.
Steve Giller Posted July 5, 2024 Posted July 5, 2024 47 minutes ago, Peter Clough said: When the check runs to find any radio attached to the job What is this check, how is it performed, what nodes are configured and in what way? It's difficult to troubleshoot something at arms length without the details of what's being done.
Peter Clough Posted July 5, 2024 Author Posted July 5, 2024 (edited) I'm unable to add screenshots unfortunately, however.. The seek for a radio is a Requests>Assets>Get All Mobile Device, with the Assets type set to Radio. The decision then just looks to see if assets is set, and if it is, it creates the task. The seek for a phone (and laptop) is the same, but with the type set to Mobile Phone. I added in a diagnostic to print exactly what the node returned, and it's definitely returning the asset ID of the phone if there's no radio attached. Edited July 5, 2024 by Peter Clough Corrected a typo and added more info.
Steve Giller Posted July 5, 2024 Posted July 5, 2024 23 minutes ago, Peter Clough said: The decision then just looks to see if assets is set I suspect that this is the problem. An empty value is not the same as an unset value - "Is Set" means something is there, that includes an empty String. I would suggest using a condition on the branch of "==" with nothing in the value field.
Peter Clough Posted July 8, 2024 Author Posted July 8, 2024 I believe I have identified the issue. Unsure if this is just a me issue, or a thing in need of a fix. On each parallel path, there was the Get All Mobile Device Assets, and I left the default output of this unchanged (it's only used once in a direct line, so it shouldn't matter, right?). But it ended up meaning that the result reference assetsGetMobileDevice showed up twice separately in the same workflow, even though they were in parallel, which seems to be what was causing the issue. Changing the result reference to be unique to each side of the path (and correcting all the follow-up references) seems to have resolved this with testing. Of note, the check for IsSet does still actually work, because the output on the Get doesn't return any string at all, empty or otherwise, best I can tell. Thank you for all your help, would never have worked it out otherwise.
Steve Giller Posted July 9, 2024 Posted July 9, 2024 22 hours ago, Peter Clough said: it's only used once in a direct line, so it shouldn't matter, right? No, that's not correct - and you should never assume that it is even outside of a Parallel Process. If you are relying on a value to be the output from a specific node, you need to ensure that the node has a unique result reference. 1
Peter Clough Posted July 9, 2024 Author Posted July 9, 2024 Mm, that was the problem. Worked it out eventually.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now