Node objects

 16 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
SAres
Basic Member
Posts: 16
Basic Member

    Landmark Infor Process Automation

    Background:

    This is a complex issue that requires a developer's inside look at the object oriented code used in Process Automation.

    I have an instance where several email addresses setup in LTM, either as actor records or employee contact records are bad.  This causes a 550 error when sending the email message through SMTP.  The error message returned does not indicate what the bad email address was.  The email server does not bounce the message back to the sender telling them the address was bad.  The only exposure we have is a log file which has to be searched to find the recipients of which the message was sent to.

    The email node, as well as just about every other node, has 4 identifiable objects within it at runtime.  They are:




    The email node itself is referred to as with an underscore as a separator and then the object name contained within the node and the remaining text.

    I am looking for more objects within the email node that I can pass to the error trapping routine within the email node's "On Error" tab.  Specifically, I'm trying to report on the email recipients:

    To
    CC
    BCC

    The plan is to pass this information in the "On Error" routine when the email node generates an error such as:

    Return message: Sending failed;
      nested exception is:
    class javax.mail.SendFailedException: Invalid Addresses;
      nested exception is:
    class javax.mail.SendFailedException: 550 No such recipient

    I may have to pass the information all the time instead of conditionally when the error is a 550, but that is acceptable.

    The email message can contain the returnMessage as while inside the node or as immediately after the execution of the node or as any time after the node execution.

    The last two options are available only because Process Automation has encapsulated those values as variables.  The first option can only be used while inside the node itself while it is running.  I need to know what other variables has to offer.

    Is there a or or

    I have tried some combinations with no success.

    Woozy
    Veteran Member
    Posts: 709
    Veteran Member
      Hi SAres - It appears that some screenshots or code or something was stripped from your post, so we can't see what you are referencing. You may want to put them in a document and attach it instead. FYI - the angle-brackets really confuse lawsonguru.
      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      SAres
      Basic Member
      Posts: 16
      Basic Member
        Thanks, I have saved the message as an attachment.
        Attachments
        Woozy
        Veteran Member
        Posts: 709
        Veteran Member
          OK, that helps.

          I don't think there are currently any other "this_..." variables available. I have previously submitted an enhancement request to add an additional "this_..." field that would hold what I call the "short error message" without the java stack, but I haven't seen this yet.

          However, every email that is sent has unique TO, FROM, CC, SUBJECT, and BODY values that are being passed in (or are static). You should be able to reference those input variables as the email node does. For example, if you have variable "vToEmailAddress" that is being passed into the email node, then that value is still available in the node and after the node, so you should be able to reference it.

          I regularly do this with nodes that I "expect" to fail due to data issues, so I'll just update the OnError "custom log message" node to include the input variables or keys or whatever so I can easily see what was "actually" called.


          Maybe I'm not understanding what you are trying to do?
          Kelly Meade
          J. R. Simplot Company
          Boise, ID
          SAres
          Basic Member
          Posts: 16
          Basic Member
            I think you are understanding the issue correctly. The problem I have with adding the variables used as the recipient in the body of the error message is that other developers also modify these process flows and if they don't know to update both the email recipients and the "On Error" tab email body, then the process and error traping will not be in sync. Then the error message (going to the network folks) will not be accurate and they will be chasing their tail as to why one of the email recipients is not spelled correctly when all the ones that were reported are actually correct and the one that fell through the cracks was incorrect. I think all the objects within the node should be accessible. I wonder if they are but just not published.

            On another related note, the user action node also send email messages, but the user action node does not have an "On Error" tab for error traping. Do you have any idea how to handle the errors from within that node? I know I can capture the error message after the fact and force an email message node to allert me but the object (user action node) will be destroyed by then.
            Woozy
            Veteran Member
            Posts: 709
            Veteran Member
              Hmmm. I can see the issue.

              I've discussed this with the IPA developers, and they've said that what-you-see-is-what-you-get. Unfortunately, we don't have access to the code in the background - only what is exposed by the application. The only solution I see is development standards - but those are easy to skip or forget.

              I don't know what to say about the UserAction errors either. Generally these errors are either because the action is no longer InProcess (i.e. cancelled or manually completed) or because a different actor took action already, so the person trying to take action is no longer a valid actor. Although those actions "error", they generally don't impact the flow because the flow has moved on. What errors are you seeing?
              Kelly Meade
              J. R. Simplot Company
              Boise, ID
              SAres
              Basic Member
              Posts: 16
              Basic Member
                I'm seeing invalid email addresses because the actor email address is not correct. The action still goes to the correct inbasket but the user never looks there unless they get an email.

                How did you get line breaks in your tagline?
                Woozy
                Veteran Member
                Posts: 709
                Veteran Member

                  That would do it.  Data errors like this are tough to address.  Sorry I haven't been much help! 

                  On my tagline, I just used html "br" tags.



                  Good Luck to you!

                  Kelly Meade
                  J. R. Simplot Company
                  Boise, ID
                  Kyle Jorgensen
                  Veteran Member
                  Posts: 122
                  Veteran Member
                    The email node has a property named "activityVariables" which contains an array of the To, CC, BCC and From values.

                    It can be accessed setting a value to the property like this:
                     var aryValues = EmailNodeName.activityVariables; 


                    This would give you the values of the variables used no matter what the variables are named.

                    Admittedly, I'm still in PFI9. But I bet this is the same in IPA.
                    Kyle Jorgensen
                    Veteran Member
                    Posts: 122
                    Veteran Member
                      I should have included this....
                      After the variable is set to the property; the value of aryValues is:
                       [aTo=Whatever@overthere.org, aCc=, aBcc=, aFrom=PFIAdmin@overthere.org] 

                      SAres
                      Basic Member
                      Posts: 16
                      Basic Member
                        Thank you Kelly
                        Woozy
                        Veteran Member
                        Posts: 709
                        Veteran Member
                          Hi Kyle,

                          I just tried your solution, and it doesn't appear to work in IPA. I've tried EmailNodeName.activityVariables and EmailNodeName_activityVariables without success. Any thoughts?
                          Kelly Meade
                          J. R. Simplot Company
                          Boise, ID
                          Kyle Jorgensen
                          Veteran Member
                          Posts: 122
                          Veteran Member

                            There is also a property named "getActivityVariables()".

                            It can be used in the same manner:

                             var aryValues = nodeName.getActivityVariables(); 

                            Kyle Jorgensen
                            Veteran Member
                            Posts: 122
                            Veteran Member
                              I found the property by iterating through the properties of an email node after the node had executed with this code:

                               var strText = "";
                              for (x in Email6590) {
                                  strText += "Proptery: " + x + "\n---\n" + Email6590[x] + "\n---\n---\n\n";
                              }
                              
                              //var a = Email6590.activityVariables;
                              var a = Email6590.getActivityVariables(); 


                              Then I wrote the variables "strText" and "a" to a text file to see what I got.

                              Perhaps try that in IPA.
                              Woozy
                              Veteran Member
                              Posts: 709
                              Veteran Member
                                Unfortunately, still no luck. Very clever, though. I wish it worked!

                                Are you using the Eclipse designer for LSF9, or the "original" designer?
                                Kelly Meade
                                J. R. Simplot Company
                                Boise, ID
                                Kyle Jorgensen
                                Veteran Member
                                Posts: 122
                                Veteran Member
                                  Eclipse. I dropped the 'original' as soon as the Eclipse was available. It's like the difference between dial-up and broadband. Looking forward to some of the new features in IPA!
                                  SAres
                                  Basic Member
                                  Posts: 16
                                  Basic Member
                                    I also tried these methods with no luck.
                                    I may have to create recipient_to, recipient_cc and recipient_bcc variables in the start and populate them during flow execution. Then I can dump the 3 variables every time there is an error. I won't have to worry about changes to the recipients not being in sync with the error routine since both sections will use the same variable. I can throw in some extra assign nodes to keep the recipients correct as they change within the flow.

                                    Thanks for everyone’s help. I really appreciate it.