LPA Messages

Sort:
You are not authorized to post a reply.
Author
Messages
Sarah
Basic Member
Posts: 21
Basic Member

    We use ProcessFlow for approval of requisitions.  Based on value, ReqLoc, and other factors.  If the requisition is unreleased or rejected back to the requester, the approver adds a comment for the requester just prior to taking the unrelease/reject action as to why the action was taken.

    The Flow then sends an email to the requestor, with some basic information from the requisition, such as total requisition value, description, and requisition number as long with the message (comment). 

    As there may be more than one message attached to a workunit from different approvers along the way.  The system is attaching the first message to the workunit, not the last message which is intended for the requester.

    When looking at the AssgnNode, we can see that it is pull all comments:

    CommentIn = <_messages> Procurement being ran. DLS Mini Bid awarded to Henderson All Contracts have been executed.Evaluating JavaScript expression if (CommentIn != '') { var b1 = CommentIn.indexOf(">") var b2 = CommentIn.indexOf(">",parseInt(b1+1)) var e1 = CommentIn.indexOf("<") var e2 = CommentIn.indexOf("<",parseInt(e1+1)) var e3 = CommentIn.indexOf("<",parseInt(e2+1)) CommentOut = CommentIn.substring(parseInt(b2+1),parseInt(e3)) };; to value Procurement being ran. DLSVariables: CommentIn(Type=String) = <_messages> Procurement being ran. DLS Mini Bid awarded to Henderson All Contracts have been executed.Activity completed

    But when looking at the EmailNode, only the first comment is desplayed in the email:

    Email Email6100: Executing Email activity nodeEmail Email6100: Email properties before variable substitution and expansion: To: Cc: Bcc: From: processflow@rgrta.com Subject: Requisition has been rejected.Email Email6100: Email content before variable substitution:Your requisition has been rejected.Requisition Number: Requisition Description: Requester: Request Amount: Comments: Email Email6100: Email properties after variable substitution and expansion: To: XXX@XXX.com Cc: Bcc: From: processflow@XXX.com Subject: Requisition 0004740 has been rejected.Email Email6100: Email content after variable substitution:Your requisition has been rejected.Requisition Number: 0004740Requisition Description: FY16 Pension & OPEB Benefit PlRequester: XXX XXXRequest Amount: $XX,000.00Comments: Procurement being ran. DLSActivity completedEmail6100_errorCode = 0Email6100_informationCode = 0Email6100_returnMessage = CompletedEmail6100_outputData =

    The message in the email should have read "Comments: All Contracts have been executed."

    Any help you can provide will be greatly appropriated.

    Thank you!

     

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      It would be easier query the Workunit Message table and append to your comment variable using a MsgBuilder in order to capture all of the messages added.
      David Williams
      Sarah
      Basic Member
      Posts: 21
      Basic Member
        Could you provide more details of how that would look and work.  Also where are the Messages Tables located?
        David Williams
        Veteran Member
        Posts: 1127
        Veteran Member
          If you are using PFI then the messages are stored in LOGAN - WFMSGDTL
          If you are using IPA then (I think) the message are in PfiMessage
          David Williams
          John Henley
          Posts: 3352
            Since your subject says "LPA", assuming you are using LPA/IPA.
            You will need to add a Landmark query against the Landmark IPA product line
            The query will look something like this, and will contain the messages for the workunit.

            _dataArea="" & _module="pfi" & _objectName="PfiMessage" & _actionName="Find" & _actionOperator="NONE" & _actionType="MultipleRecordQuery" & _runAsUser="" & _pageSize="30" & _relationName="" & _setName="SymbolicKey" & _asOfDate="" & _effectiveDate="" & PfiWorkunit="" & Message & Subject 


            Inside the query loop, use a message builder node to capture the contents of each message using the XXX_Message variable returned from the query node (e.g. XXX).
            Thanks for using the LawsonGuru.com forums!
            John
            Sarah
            Basic Member
            Posts: 21
            Basic Member

              I am sure that there are many ways to achieve the same end result.  However, we are newer to this process and are trying to work with what was originally designed.

              With that being said,what we think is happening is that the below parsing function is formatting and returning only the first comment in the string array "_messages" and we need it to return the last comment.  Can someone help us with this?

              if (CommentIn != '') { var b1 = CommentIn.indexOf(">") var b2 = CommentIn.indexOf(">",parseInt(b1+1)) var e1 = CommentIn.indexOf("<") var e2 = CommentIn.indexOf("<",parseInt(e1+1)) var e3 = CommentIn.indexOf("<",parseInt(e2+1)) CommentOut = CommentIn.substring(parseInt(b2+1),parseInt(e3)) }

              You are not authorized to post a reply.