Get access to variables set in AIML in AIMLbot.dll - aiml

I'm just getting started using the AIMLbot.dll library with C#. I'm wondering if there is a way to access the variables that are set using <set name="foo">bar</set>. I'm hopefully looking for a way to set a callback function inside the <think> tags when just before displaying the response from the bot, check to see if the variable name callback contains any value and if so, perform that function before returning the result to the end user.
I've checked all the elements that makeup the active bot object in Visual Studio but I haven't seen anything that alludes to the place these variables are stored.

Figured this one out.
When you use <get> and <set> in your AIML, the value for the variable is set under the 'User.Predicates' option. Happy to report callbacks are working as they should.

Related

Cannot specify path variable on a Flow / Send Request

I was playing with Postman Flows, and I was trying to learn by using the Trello API. All requests work on their own if executed manually. I've also debugged values using the terminal to understand where the problem lies. Before that, here's a summary of what I'm doing.
Get all boards for a given trello workspace
For each board, delete that board.
The complete flow looks like this:
I've checked that on the last block Send Request, the looped value of /variable/id outputs the proper board id. I've done this by checking with a terminal block and a string block. I started suspecting that this is caused by a failure of Postman to understand that the variable I'm trying to use is a path variable and not a query parameter. As such I tried to pass a static value to the Send Request and it 404'ed as well (tech aside: in theory for n ids it should give me one 200 and n-1 404s since the variable is static and the board would not be able to be deleted multiple times).
My suspicion comes from the fact that when configuring the block for this request:
You do not get prompted to add the board variable. I've tried to type it in anyway, and even use combinations like :board, with no avail. In fact like I said above, if I use these variables with static values, it still 404s.
ignore the parsing message on the right hand side...
As you can see, board doesn't show up. Did I end up hitting a bug, or is this user error? One thing I do not know how to do, but would help clarify that the issue is that a null value is being passed on to the DELETE would be to output the request itself. On a terminal block I can only see the response.
Thanks in advance.
UPDATE:
After checking the Postman console on the app, I've noticed that in fact the path variable being used is whatever is set on the collection request. It's like it takes the URL as a static field and disregards the path variables. Any thoughts?
Path variables won't be available in your Send Request. Instead, define your path variable with an environment/collection/global variable (i.e. {{board}}) in the value of the path variable. Then it will show up the relevant block of your flow.

Couldn't able to find buit-in function $PMTargetName#numAffectedRows

Hi Iam novice to Informatica, I tried to get the count of inserted rows to target to WF variable, So that I can write a condition to a link to proceed to next session.
I went through few web guides and found $PMTargetName#numAppliedRows.
But I didn't able to find this property under Built-in properties in Post session on success variable assignment.
Even I tried to assign a variable in mapping level with this property, but I am getting error like Invalid symbol reference.
$PMTargetName#numAppliedRows is NOT listed anywhere among any variables. Neither in built-in nor anywhere else. Still - you can use it. Just remember to replace the TargetName with the name of your target transformation, e.g.: if you insert data to AccountList table, you'd need to use the condition $PMAccountList#numAppliedRows. Hope this helps.
Please use this link workflow variable :-
Name: TgtSuccessRows
Desciption: Rows successfully loaded
Datatype: integer
But issue is you can not track data loaded for multiple targets.

Salesforce: Can a Javascript Remoting Static Function Access ApexPages.CurrentPage Functions?

I was wondering, In a RemoteAction function in an apex class can or should this be able to access the current force.com site page? I would like to access and write to cookie parameters from within my static remote method but I'm guessing this may not be possible?
If not, any suggestions on how to get around this would be useful.
Thanks in advance.
Remote Action method runs in an.asynchronous mode.Hence accessing values from url parameter will get you null values.If you need any static values for your apex class to process use the parameters.pass from page to your apex method using parameter .
There is one way that i recently discovered to do this
Pass them in from the script on the page using {!$currentpage.parameters.something}
You still need to check for nulls in the code because it might legitimately be null

Cfdump component method values, not component structure

I have recently started using a cfc component to store user information in the Session variable. I used to store them as individual variables in Session, such as Session.UserId, Session.Firstname, or Session.Lastname. This new component nicely wraps that all up for me into a component with get methods for each value I need (i.e. Session.User.getUserId(), Session.User.GetName(), etc).
But when I do a cfdump of the session variable for debugging, it displays the object structure's metadata. I'd like to see the values returned by the component's get methods. Any way of using a cfdump to output the function values with the object metadata?
<cfdump> isn't magic, all it does is output the value you give it. As your CFC instance doesn't expose any public properties reflecting these values, <cfdump> hasn't got any way of knowing what they are.
If you need to extract all the private properties reflecting your former session scope in one hit, then you need to create a method to do so, and then <cfdump> that. EG:
public struct function getVariables(){
return variables;
}
If you are abstracting the values you want further, eg into variables.sessionStuff (variables.sessionStuff.userId, variables.sessionStuff.name etc), then write a method getSessionStuff() which returns variables.sessionStuff.
Any way of using a cfdump to output the function values with the object metadata?
Yes, use accessors.
<cfcomponent accessors="true">
<cfproperty name="userID">
<cfproperty name="firstName">
<cfproperty name="lastName">
</cfcomponent>
Try to <cfdump> this object, you'll see the property values.
Not sure if Adobe continued support for this, but in ColdFusion 8 any variable within the THIS scope is automatically considered public (and thus visible in cfdump) while using VARIABLES scope explicitly is considered private (and thus invisible in cfdump). This way you can also avoid having stack overflows when you keep component references in your component (cfdump used to solve them recursively ending in an infinite loop). But then again: this was probably fixed in ColdFusion 9 and above.

retrieving 'pre windows 2000 logon' name from LDAPMessage object in win32api C++

I've been asked to look at windows service which retrieves data from an Active Directory tree using the win32 LDAP API and outputs JSON data to a text file. It works fine but I need to modify it so that the i get the 'pre windows 2000' login name. The service is written in c++.
The service already successfully retrieves various other attribute strings using:
PTSTR *pszValues=ldap_get_values(pLdap,pEntry,szAttribute);
and:
if (_tcscmp(szAttribute,TEXT("uUsnChanged"))==0) // uSNChanged is an example of an attribute
pItemInfo->uUsnChanged=_tcstoui64(pszValues[0],NULL,10); // pItemInfo is a struct defined elsewhere to hold the results for any given entry
i looked on http://msdn.microsoft.com/en-us/library/ms679021(v=VS.85).aspx to see if there is an attribute for 'pre windows 2000' login or something similar in the hope that I could just add this as another 'szAttribute' (to replace "uUsnChanged" in this example) and had no luck. Looking at the API i have been unable to come up with a way of getting this information.
i found the attribute 'sAMAccountName' which i thought would provide the information needed but it only gives me the name part of the DOMAIN/name format. Typical, it's the other part i want!
does anyone have any ideas on how to get the 'pre windows 2000' string from 'pEntry'?
#JPBlanc We are getting the correct nETBIOSName attribute now when running it on the test server. The app works on the assumption that there is a maximum of one nETBIOSName attribute per DC. It finds it by doing the following:
gets the default host using ldap_init(NULL,0)
get the 'configuration naming context' using ldap_search_s(pLdap,NULL,LDAP_SCOPE_BASE,NULL,pszAttrs,FALSE,&pResults); passing in the connection handle as the first parameter
retrieves the 'configurationNamingContext' attribute using ldap_get_values(pLdap,pEntry,TEXT("configurationNamingContext"));
concatenates "CN=Partitions," to the beggining of the string giving something like "CN=Partitions,CN=Configuration,DC=domain,DC=com,DC=au"
it then performs a search using ldap_search_s(pLdap,szPartitionNC,LDAP_SCOPE_SUBTREE,TEXT("(nETBIOSName=*)"),pszAttrs,FALSE,&pResults);
then it loops through the results looking for anything with a 'nETBIOSName' attribute and once it finds one it breaks out of the loop and returns the value.
Do you know if this is sufficient to work in any AD configuration?
Be careful, the Domain part of the 'pre windows 2000 domain' can be completly different from the user Principal Name (user#domain) use to logon onto Active-Directory. the DOMAIN is the Primary Domain Controleur name or the Netbios domain name. DOMAIN is created during domain creation, by default it's part of the DNS name, but it can be completly changed during domain creation.
You can find it with nETBIOSName attribute :
ldifde -f netbios.ldf -d "CN=Partitions,CN=Configuration,DC=your-DNS-Name" -r "(netbiosname=*)"
A best filter would be
(&(objectcategory=crossref)(dnsHostName=<DomainDNSName>)(netbiosname=*))
SAM-Account-Name Attribute (sAMAccountName)