Here is my issue: Running Portal 9.0.1, Landmark 10.0.6, and using Infor Process Automation (in the middle of converting from PFI). I have customized PO20.1 to prevent PO's from being released and instead trigger a IPA service (which then does some PO Approval processing).
In the existing flow the workunits created were only seen by our Purchasing Department. Now we are pushing the approval process out to 50+ users who will be going into their inbasket to review and take action.
My problem is the original users that are releasing the PO's in PO20.1 will click the release button multiple times for the same PO. This will create multiple work units for the same PO. In the past Purchasing could delete a work unit via an action when this occurred. No harm, no foul. But with this being pushed out to users who are not as savvy, I'd like to prevent these multiple work units from even being created.
My initial thought is within PO20 itself before I trigger a flow, is there away to look at any "pending action" work units with the same PO Number. If there is, alert the user and tell them there is an existing work unit for that PO and don't create a new one. I don't know how to construct a DME call though to the appropriate tables in Landmark where this is stored. Anyone do something similar before?
I posted this here instead of Process Flow because it's really how do I do this in my custom form.
Couple things -
1. Are you sure querying a Landmark WorkUnit from Design Studio is even the best route to go? If your DS view can trigger a Landmark query, it might be better to have the FLOW itself check for duplicates. A simple SQL query node to check the WU tables and then send Reject itself if it finds a duplicate would be relatively trivial functionality to add.
That being said - it is possible to query that information from a URL to your landmark server. The real question is are you ready for the mess of JSON that would be returned?
Structuring the URL is tricky, it will take some time for me to refresh my memory on how to query via a [servlet] list call to the landmark environment. Ill get back to you on that.
Better (as in simpler) solutions would be-
1. When the user submits a PO, have the Javascript clear all the fields after submitting the PO once, and/or have JS disable the submit button temporarily, and/or have an alert() popup that reads "Hey guy, you submitted your PO, stop clicking submit".
It sounds like you have a user feedback problem.
If your user goes through the effort of resubmitting AFTER you clear the form... then as a Drill Sergeant once told me, "You can't fix stupid".
2. Have your IPA flow check to see if it's a duplicate from the same user. If the originator is the same and the fields are the same - have your flow send them an email saying "stop it".
Both of those solutions will spare you from needing to shoot an SSO request to the landmark server from an invisible iframe, have it return the JSON to the hidden iframe in your DS screen, and then need a mess of Javascript to parse the return results. EVEN IF you do this the way you're theorizing, and DON'T disable the submit (at least temporarily after each click) then in the lag time between when the landmark server results are checked & processed by Javascript, they would still be able to click submit half a dozen times and negate the DS check anyways.
Just my 2 pence.
-Peter