User Action - operator id

 8 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Al Miller
Basic Member
Posts: 10
Basic Member
    I need to add an email alert to an existing flow that already contains a UserAction. The email should include the userid or name of the person that performed the UserAction. What would be the easiest way to determine the user (LSF9)?

    Al
    Roger French
    Veteran Member
    Posts: 549
    Veteran Member
      If it's a HR Personnel Action you can get it from a query node. Here's an example of one I used to retrieve the USER-ID.

      PROD=&FILE=PERSACTION&INDEX=PCTSET1&KEY=====&FIELD=USER-ID&OUT=CSV&DELIM=~&MAX=1
      Sam Simpson
      Veteran Member
      Posts: 239
      Veteran Member
        Please need more clarification. Do you need the email of the requester or approver? What version of processflow? What kind of flow is this? requisition approval, invoice approval etc? When do you want to send the email?
        Al Miller
        Basic Member
        Posts: 10
        Basic Member
          I'm using PFlow Standard, my environment is 9.0.0.5. The event flow is triggered by AP service: Inv Approval. The CFO would like an email that would include the approver in the body of an email. The email is sent after both the UserAction and the AGS (AP32) call are complete.
          John Henley
          Posts: 3353
            Couple of places to look (I don't have a concrete answer, but here are some ideas):
            1) You can look at the workunit itself (in LOGAN/WFWORKUNIT), there is an RM ID on the record--I seem to remember, however, that this is the ID of the initiator, not the last person to act on the workunit.
            2) Another place to look is the APINVOICE record, at the APPRV-OPERATOR id -- see if that *might* be the user who approved via ProcessFlow--I'm not sure if it's the 'lawson' username (i.e. user running PF server).

            Another option would be (if it's not there already) to add a variable to the workunit in your approval flow (i.e the one that does the AGS call) to add the username and/or email address for that user via ResourceQuery as a variable.
            Thanks for using the LawsonGuru.com forums!
            John
            Sam Simpson
            Veteran Member
            Posts: 239
            Veteran Member
              I forgot if you will need PF Professional version on this because you will need a resource query node to query your LDAP. Useraction already have an email function and you can use this to sent email to the approver.

              Here's a simple scenario of an invoice approval:

              1. You always get the email address (from ldap) of the requester (inv-operator) including it's rqparent (the approver).

              If REJECTED then sent an email to the requester.

              If Approved :

              1. Get the wf-rm-id of the approver from WFMETRICS using the workunit value.
              2. Get the email (from LDAP) of the approver using the WF-RM-ID this will also include
              the RQPARENT of the approver in case the workunit is escalated into the next approver.
              John Henley
              Posts: 3353
                ResourceQuery is included in all editions (Standard, Professional, Integrator). But he has Professional (at least) if he's using a UserAction.
                Thanks for using the LawsonGuru.com forums!
                John
                Al Miller
                Basic Member
                Posts: 10
                Basic Member
                  Thanks all - yes I do have Professional. I added the WFMETRICS query and it's working fine. I just think it's strange that the UA node does not have variables (including WF_RM_ID) like a transaction or query.
                  Michael Thedford
                  Advanced Member
                  Posts: 19
                  Advanced Member

                    The regular UserAction node in LSF9 can be acted upon by  users assigned the same TASK, a single user, by any single or percentage of a group of users, or a hard coded list or variable. The only way is to query the metrics for that node and gather the userid of the one or multiple users that acted upon that node.