Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
8 replies
Subscribers
7 subscribers
Views
2137 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Given a comparison between CDT_A (a:"richard",b:"nolan", c:&
Mark
over 8 years ago
Given a comparison between CDT_A (a:"richard",b:"nolan", c:"Adam Smith",d:"(555) 334-7810") and CDT_B(first_name:"richard",last_name:"nolan",supervisor:"John Hancock",office_phone: "(555) 334-8761") where I consider one of these an authoritative source and the other local Appian data, is there a simple function I can use to compare these 2 CDT's and return a Boolean value on weather they're in sync or not?
OriginalPostID-210052
OriginalPostID-210052
Discussion posts and replies are publicly visible
0
Tom Ryan
Appian Employee
over 8 years ago
It should be straight forward to use apply() to compare each of the fields and either return a boolean or update the appropriate CDT. For the update, the CDT Manipulation plugin might help:
forum.appian.com/.../summary
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 8 years ago
Tom, I work with Mark. The problem may actually be a little more complex. What we're actually trying to achieve is keeping our user profiles updated in the face of organizational change.
So CDT A really represents our Appian User Profile, and CDT B represents the organizations HR information system. There are fields we'd like to respond to changes on (last name due to marital status changes, supervisorname for organizational changes, office information for moves,etc ) So we have these two dissimilar data sources which have some fields in common and we'd love to have an elegant solution rather than some batch MNI, or Java API process.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sonalk
over 8 years ago
Hi Mark,
Along with the above, the post below will be helpful as it provides few examples for how to compare two cdt's and replace value if need be :
forum.appian.com/.../e-186559
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tom Ryan
Appian Employee
over 8 years ago
If your source system supports it, you should be able to use the LDAP tools plugin to sync users' details. If not, I would suggest creating a process model that queries the source system, and then leverages the Update User Profile smart service where necessary. If neither of these approaches work, then I suspect that creating a custom smart service or function using the API would be the best approach.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sagarl511
A Score Level 2
over 8 years ago
I would recommend approach suggested by tom.ryan to use looping function. But use any() or none() inplace of apply() function as it works like for loop with break condition.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 8 years ago
This is precisely what Mark is intending, a periodic query from the source system to collect an array of user profiles to check, then use one of the looping functions to determine which records should feed an update user profile Smart Service. The question is largely related to the rule that will be called to do the comparison.
We can craft something that uses a series of nested if statements to determine if a field has changed, and trigger a subsequent update. What we're hoping is that there's a more elegant solution using some other functions (e.g. some combination of choose() and wherecontains() or ...?
Cheers
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tom Ryan
Appian Employee
over 8 years ago
Actually I meant to use the Ldap Sync Smart Service that will take care of all of this. Check the documentation here:
forum.appian.com/.../o
The typical approach is to schedule a process to run each night or as required
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 8 years ago
Ah, cheers Tom, but we're not using LDAP. We authenticate against an SSO system, but our user records are actually source from a hybrid database that federates many, many internal systems.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel