PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 02/14/2017 1:59 PM by  Angela
Reading Landmark Files in Portal Form
 8 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Terry P
Private
Private
Veteran Member
(612 points)
Veteran Member
Posts:234


Send Message:

--
08/12/2015 9:49 AM

    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.

    David Williams
    Private
    Private
    Veteran Member
    (3055 points)
    Veteran Member
    Posts:1029


    Send Message:

    --
    08/12/2015 10:06 AM
    I've done this with PFI before and it was easy to do a DME lookup on the WFWORKUNIT table to see if an open WorkUnit existed before submitting it again.
    For IPA, you can't do a DME lookup like you want, but you could build that into your IPA flow so that if a new WorkUnit was created to just End if it sees that
    another WorkUnit already exists.
    David Williams
    Terry P
    Private
    Private
    Veteran Member
    (612 points)
    Veteran Member
    Posts:234


    Send Message:

    --
    08/12/2015 10:18 AM
    I'm trying to prevent it from even being created, but that approach might work. Thanks.
    Tim Cochrane
    Private
    Private
    Veteran Member
    (450 points)
    Veteran Member
    Posts:154


    Send Message:

    --
    08/12/2015 2:55 PM
    i'm confused...is it that PO20 lets users release multiple times, which in turn creates multiple workunits, OR, is it the custom code that's releasing & creating workunits. I'm confused because the client i'm currently working with is running delivered PO20, which won't let you release the same PO more than once...i had a Supply Chain owner test this for me. So, it sounds like the custom code is letting users bang away and create multiple work units.

    If so, i would focus on changing THAT code to prevent the multiple workunits.
    Tim Cochrane - Principal LM/IPA Consultant
    Terry P
    Private
    Private
    Veteran Member
    (612 points)
    Veteran Member
    Posts:234


    Send Message:

    --
    08/12/2015 3:33 PM
    It's the custom javascript code within PO20.1 that in the before transaction does not let the "release" occur. Instead it creates and triggers a Process Flow. The actual status of the PO stays as "unreleased". In the flow once the approvals are completed, then the PO is released and final issued.

    So yes, that was what I wanted was some way prior to triggering the flow to read the Landmark business class of pfiworkunit and see if there were any pending ones for the PO. Just don't know how to with javascript code to build the equivalent of a DME call.
    Tim Cochrane
    Private
    Private
    Veteran Member
    (450 points)
    Veteran Member
    Posts:154


    Send Message:

    --
    08/13/2015 10:11 AM
    as DW previously mentioned...there's no way to currently execute a Landmark query from within DS. It might be developed eventually, but with Infor trying to move everything to the Landmark platform, they're prob not going to spend the money/resources to build it...it would have to come from one of us.

    I understand that you're triggering directly into IPA, HOWEVER...
    if you were triggering the BPM service, which would in turn initiate the IPA service, then you could query WFWORKUNIT from within DS. If a work unit was found with those values, then throw an alert and prevent a new work unit from being released.

    Tim Cochrane - Principal LM/IPA Consultant
    Peter O
    Systems Analyst
    Independent
    Veteran Member
    (205 points)
    Veteran Member
    Posts:69


    Send Message:

    --
    08/13/2015 11:08 AM

    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

     

     

     

     

     

    Angela
    Private
    Private
    Basic Member
    (15 points)
    Basic Member
    Posts:5


    Send Message:

    --
    02/14/2017 1:52 PM
    Terry, a simpler solution is to use one of the user fields on PO20 as a flag when a WU has been triggered. Have a script that checks if the flag is set to blank when no WU exists and trigger, or if the field has a value return an error message that a WU already exists
    Angela
    Private
    Private
    Basic Member
    (15 points)
    Basic Member
    Posts:5


    Send Message:

    --
    02/14/2017 1:59 PM
    And BTW Terry, you can use web services to query or update LMK tables from the browser. It's not easy but is doable. Already done it.
    You are not authorized to post a reply.