Jump to content

Recommended Posts

Posted

Hi

I have a ProCap (HRA Query v3.0) where customers can enter 3 x emails addresses if they want to cc in someone on the request confirmation.  The business process  (HRA Query Process v2.0) then sends auto emails to these emails addresses if entered.   This works fine if email addresses are entered in the procap but if they are left blank it sends emails to the answers to questions in other custom forms e.g. employee number, directorate (see screen shot of timeline example for SR00009100).  Obviously emails aren't actually sent but I was wondering why it was doing this?  

Sam

 

image.png

Posted
13 minutes ago, SJEaton said:

but if they are left blank it sends emails to

@SJEaton could be because how the BP checks if the fields are left blank... I'll have a look and get back to you...

Posted

@SJEaton so, looking at your current BP configuration, for CC email you are using this variable: &[global["flowcode"]["answerX"]] (where X is one of the three answers). In the BP,  in the "assignment" stage, you are capturing answers in these "global flowcode" variables twice:

  • first time in the "Get empdetails form content" node - answers from "empdetails" form;
  • second time in the "Get ccemail Form details" node -  answers from "ccemail" form.

As the variable name suggests, these variables are global. Which means they are not "local" to a node (so to speak), I'll try to explain what this means: so, when the first node is reached, the variables are populated with values (4 answers from "empdetails"). When the second node is reached, the variables (which now have a value from the first node) are overwritten. But because as you said there was no answer for CC addresses, the answers from 3-5 are not overwritten, instead they will keep the value from the first node. This is how you end up with a tentative email to employee number or directorate (these are values from the first node). Hope this makes sense.

Two, actually three, options to overcome this scenario:

A. Since you are mapping the CC email addresses to a custom filed, use the custom field instead of answer
B. Before each CC email node, have a decision node to check the value in the "answer" variable. For example, since an email address must contain the "@" character you could have the decision check for the presence of this character in the answer. If it does exist send the email, if not then don't.
C. In the "Get ccemail Form details" node, do not use the deprecated  "Request Questions", instead switch to "Get Request Information" -> "Progressive Capture Answers". Then in each CC email node, in the "Variable Picker", you will have the option to select as a variable a specific form and answer.

My suggestion would be option C as I believe is the most elegant and less prone to issues due to changes (e.g. you might remove custom fields mapping and checking for a character presence is not always reliable) 

Posted

Hello,

I would say option C too - i just wanted to chip in and say how amazing this feature is in Hornbill :wub:

Wiki: https://wiki.hornbill.com/index.php/Request_Variables
To add on to what Victor said, if you don't see the "Variable Picker" then you will need to hold CTRL and Left Click in a text box to bring it up.

The beauty is that you can put a single "Get Request Information" -> "Progressive Capture Answers" node at the very front of each stage of the Business Process and you will be able to use the Variable Picker for it anywhere in the BPM. This has totally cleaned up my BPM's, particularly the ones where I had to use loads of Get Request Questions nodes in a single stage.

Thanks,

Samuel

Posted

Hi @samwoo, I agree this is a great feature but just wanted to ask what happens if you create a new version of a ProCap which you have selected and used the Get Request Questions nodes?  We are already on version 3 of the particular ProCap I want to use and am pretty certain that we will copy and  create a version 4 and so on in the future if we make significant changes to it.  Will the Get Request Questions node be clever enough to know that it need to get the questions from the newer version???  If not then Option C may not be right for us after all.

Sam

Posted

Hi @SJEaton,

I've not actually thought about it and I have made changes to some ProCaps while using this node so will assume that it still works as normal?

I think as the as the question description remains the same then it works? If you add in new questions then it should still work provided the original question remains unchanged... UNLESS the system is smart enough to know that when renaming a question it's actually reflected in the BPM. (This may or may not be true, but from my perspective, it looks like it is)

I cannot give a definite answer here but maybe @James Ainsworth and/or @Victor can provide some insights into how this works?

Thanks,

Samuel

Posted

@samwoo question does not matter, is the form ID ... and answers to these questions... so if you change the questions like reorder, add or remove then you might want to adjust your BP.... so to answer your second question, there is no "active" relation between ProCap and BP, other than what the BP pulls from ProCaps configurations when the Variable Picker present the options in the UI...

EDIT: if you just change the question text for example or type, then you don't need to amend the BP as the form ID and answers (i.e. order) remains the same...

Posted

Hmmmm, I'm not convinced option C won't mean an error occurs later down the line if we amend a ProCap ad I don't really want to be having to consider if a change may impact variable pickers. I'll have a think about it but I may have to go for option A.  @Victor if I do go for option A do I just have to enter the customer field in the flowcode eg.  &[global["flowcode"]["customfield"]]    ?

Sam  

Posted

@Victor I'm not doing very well here.  Have configured option A by entering the custom fields in the 'Email Confirmation to CC nodes' (new version HRA Query Process v3.0)  but when tested, I entered my email address in the cc fields but its saying 'undefined' - see timeline extract attached.

Sam

Capture.PNG

Posted

@SJEaton so, if you went for the custom fields option then there is no more need for "Get Request Questions" node... so, change the configuration for  "Get ccemail Form details" node and "Get Request Information"  - "Request Details" instead...

Posted

Thanks @Victor that's better :) .  So one final question, is there an easy way to tell the BPM not to update the timeline with "An email has been sent to undefined" if an email address isn't entered by the customer (i.e. I only want the timeline updated if an address is entered in the custom field)?

Sam 

Posted

@SJEaton

3 minutes ago, SJEaton said:

is there an easy way to tell the BPM not to update the timeline with "An email has been sent to undefined" if an email address isn't entered by the customer

I'm afraid not... but you can bypass the email node altogether if you put a decision node right before the email one and check if you have a value in that field... two birds in one stone: no email attempt and no timeline update ;) 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...