Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Delegate approvals without using workflow

    Posted 2 days ago

    Hey guys,

    Is there a way by which a user can delegate PO approvals to another user (with the exact same set of privileges) without using workflows?



    ------------------------------
    Tom M
    ------------------------------


  • 2.  RE: Delegate approvals without using workflow

    Posted 2 days ago

    Hi, 

    many! 

    For example security restrictions, relationships. 

    How now you making PO approval ? 



    ------------------------------
    Andrey Ilinskiy
    Handz.on
    https://www.on.de/
    München
    ------------------------------



  • 3.  RE: Delegate approvals without using workflow

    Posted 2 days ago

    Hi Tom,

    as @Andrey Ilinskiy mentioned you would need to define "PO approval delegation" a bit more to receive more specific recommendations.

    Is it enough to enforce someone else to approve the PO? 

    What do you mean by saying "exact same set of privileges"? The same approval limits or literally the same security profile?



    ------------------------------
    If this post helps, please consider accepting it as a solution to help other members find it more quickly.

    Andrzej Więcław
    Maximo Technical SME
    ZNAPZ B.V.
    Wrocław, Poland
    ------------------------------



  • 4.  RE: Delegate approvals without using workflow

    Posted 2 days ago

    hello Andrzej and Andrey,

    I made a mistake in framing the question, it should have read - "  Is there a way by which a user can delegate PO approvals to another user (without the exact same set of privileges) and not using workflows? "

    So, basically User A has access to Purchase Orders application and has an approval limit of 5k, and User B too has access to Purchase Orders application but have no approval limits normally.

    User B will have an approval limit of 5k only when User A delegates it to User B.

    PO approvals are  done via UI by changing the status to APPR.  (single org-single site set up)

    Thanks & Regards



    ------------------------------
    Tom M
    ------------------------------



  • 5.  RE: Delegate approvals without using workflow

    Posted yesterday
    Edited by Andrzej Więcław yesterday

    Hi Tom,

    when talking about delegation I think of two things:

    1. how to make "the other person" aware that he's/she's expected to take action (handover for approval)
    2. how to enforce the rules you described.

    AD 1)
    With WF you can obviously either use Inbox (WF assignment) or trigger e-mail notification. 
    Without WF you will need to flag the record somehow that it's ready for approval (e.g. intermediate status, etc.)

    I guess this is not the key thing you're asking about and I will not elaborate more on that.

    AD 2)
    Approval limits are checked by Maximo business logic but they can be fairly easily suppressed by calling psdi.app.common.purchasing.PurchasingMbo#noLimitWhenApprove.
    Having said I would recommend something as follows:

    1. Add status change validation to prevent changing status to APPR by the same user who delegated the approval.
      NOTE: This can be cone in many different ways, depending on your UX expectations, starting from conditional APPR synonym domain value availability, data restrictions, ending with automation script custom validation.
    2. Add custom APPR status change validation logic in form of an automation script, which contains following key logic:
      // Acquire PO reference (may vary depending on the script launchpoint)
      var po = [...]
      // Acquire USERID of the person who delegated the approval.
      // Depends on how you understand "delegation". 
      var userDelegator = [...]
      
      // Disable approval limits check
      // NOTE: This is "in-memory" setting, specific for given PO instance.
      // You need to make sure this piece of code triggers before 
      // psdi.app.po.POStatusHandler#approve gets called.
      po.noLimitWhenApprove();
      
      // Validate approval limits against delegator profile
      var MXServer = Java.type('psdi.server.MXServer');
      var ss = MXServer.getMXServer().lookup('SECURITY');
      var uiDelegator = ss.authenticateUser(userDelegator, true);
      var limit = ss.getProfile(uiDelegator).getTolerance('POLIMIT', po.getString('ORGID')));
      
      var totalCost = po.getDouble('TOTALCOST') * po.getDouble('EXCHANGERATE');
      if (approvalLimit != Number.MAX_VALUE && totalCost > limit) {
          service.error('po', 'approveamountexceeded');
      }
      



    ------------------------------
    If this post helps, please consider accepting it as a solution to help other members find it more quickly.

    Andrzej Więcław
    Maximo Technical SME
    ZNAPZ B.V. (part of Naviam)
    Wrocław, Poland
    ------------------------------