Driver multi values attribute rather than overwrites

Perplexing one here, we have a JDBC driver that pulls certain info from
our HR app and populates it into our IDM based on matching CN and
workforceID, works pretty well depending on SQL statement driving it.
What we are finding in implementation is that several of the attributes
are becoming multivalued. (i.e. ou, L, title and givenName all have two
entries, the new one and the old one) . What I want to do with the
driver is set it up so it overwrites the existing value, not
multivaluing it.

Not sure how to accomplish this.....

existing driver

'<?xml version=\"1.0\" encoding=\" - JDBC Driver - K1e2cfRP -
Pastebin.com' (http://pastebin.com/K1e2cfRP)


-- 
dbgallo
------------------------------------------------------------------------



0
dbgallo
10/12/2010 1:06:02 PM
novell.id-manager.drivers 10360 articles. 2 followers. Follow

7 Replies
458 Views

Similar Articles

[PageSpeed] 38
Get it on Google Play
Get it on Apple App Store

On 10/12/2010 9:06 AM, dbgallo wrote:
>
> Perplexing one here, we have a JDBC driver that pulls certain info from
> our HR app and populates it into our IDM based on matching CN and
> workforceID, works pretty well depending on SQL statement driving it.
> What we are finding in implementation is that several of the attributes
> are becoming multivalued. (i.e. ou, L, title and givenName all have two
> entries, the new one and the old one) . What I want to do with the
> driver is set it up so it overwrites the existing value, not
> multivaluing it.
>
> Not sure how to accomplish this.....
>
> existing driver
>
> '<?xml version=\"1.0\" encoding=\" - JDBC Driver - K1e2cfRP -
> Pastebin.com' (http://pastebin.com/K1e2cfRP)
>
>
Try to set the merge authority of the above attributes to be the 
application.
0
jinchaka
10/12/2010 1:46:35 PM
Try issuing a "do-clear-dest-attr-value" on the attribute before adding
the new value. Where it gets a bit complicated is if you want the dest
attribute to stay multivalues and just update some attrs... Then I
imagine you'd want to read all teh values into a node set and process
them.


-- 
jimc
------------------------------------------------------------------------
jimc's Profile: http://forums.novell.com/member.php?userid=6130
View this thread: http://forums.novell.com/showthread.php?t=423311

0
jimc
10/12/2010 2:06:02 PM
merge authority was already set to be Application on those attributes


-- 
dbgallo
------------------------------------------------------------------------
dbgallo's Profile: http://forums.novell.com/member.php?userid=5418
View this thread: http://forums.novell.com/showthread.php?t=423311

0
dbgallo
10/12/2010 2:36:02 PM
Can you show us an example of the SQL in the driver when a modification
is done?

We use the same sort of setup. We have an indirect triggered setup. 

We used to have modifications come as event type 2 which is a modify,
but if the old value isn't provided or different in your vault it
becomes multivalued. 

So we now use event type 3 which will clear the attribute and add the
new one. 



If your using direct triggerless..then disregard what I said.


-- 
Eric Veysey
CNA 6, CNE 6
Eric@VEYSEY.ca
------------------------------------------------------------------------
EricVeysey's Profile: http://forums.novell.com/member.php?userid=14349
View this thread: http://forums.novell.com/showthread.php?t=423311

0
EricVeysey
10/12/2010 3:36:03 PM
On Tue, 12 Oct 2010 13:06:02 +0000, dbgallo wrote:

> Perplexing one here, we have a JDBC driver that pulls certain info from
> our HR app and populates it into our IDM based on matching CN and
> workforceID, works pretty well depending on SQL statement driving it.

Are you correctly associating the JDBC entity with the eDirectoy object?


> What we are finding in implementation is that several of the attributes
> are becoming multivalued. (i.e. ou, L, title and givenName all have two
> entries, the new one and the old one) . What I want to do with the
> driver is set it up so it overwrites the existing value, not
> multivaluing it.

Let's see a level 3 trace of the update transaction. That should reveal 
why you're seeing what you're seeing.


-- 
---------------------------------------------------------------------------
 David Gersic                                            dgersic_@_niu.edu
 Novell Knowledge Partner                         http://forums.novell.com

 Please post questions in the newsgroups.   No support provided via email.

0
David
10/12/2010 5:14:20 PM
EricVeysey;2032989 Wrote: 
> Can you show us an example of the SQL in the driver when a modification
> is done?
> 
> We use the same sort of setup. We have an indirect triggered setup. 
> 
> We used to have modifications come as event type 2 which is a modify,
> but if the old value isn't provided or different in your vault it
> becomes multivalued. 
> 
> So we now use event type 3 which will clear the attribute and add the
> new one. 
> 
> 
> 
> If your using direct triggerless..then disregard what I said.

direct and triggerless is what it is, just a table that we hit every
11hrs and then process it all


-- 
dbgallo
------------------------------------------------------------------------
dbgallo's Profile: http://forums.novell.com/member.php?userid=5418
View this thread: http://forums.novell.com/showthread.php?t=423311

0
dbgallo
10/12/2010 8:36:03 PM
wanted to post the solution to this, been rather busy, but getting
around to it today....


so it needs to be a command transfrom policy, an event tp doesn't do
it. Basically you set a local variable based on the incoming value, blow
away the existing ones and insert the new one, jimc's post above got me
looking in the right direction and then tried it as a command instead of
an event....


The code looks like this...

<policy>
	<rule>
		<description>SET LOCALVARIABLE for GN</description>
		<conditions>
			<and>
				<if-src-attr name="Given Name" op="available"/>
			</and>
		</conditions>
		<actions>
			<do-set-local-variable name="lwsgn" scope="policy">
				<arg-string>
					<token-src-attr class-name="User" name="Given Name"/>
				</arg-string>
			</do-set-local-variable>
		</actions>
	</rule>
	<rule>
		<description>REMOVE GN and REPLACE WITH lwsgn</description>
		<conditions>
			<and>
				<if-local-variable name="lwsgn" op="available"/>
			</and>
		</conditions>
		<actions>
			<do-for-each>
				<arg-node-set>
					<token-dest-attr class-name="User" name="Given Name"/>
				</arg-node-set>
				<arg-actions>
					<do-set-dest-attr-value class-name="User" name="Given Name">
						<arg-value type="string">
							<token-local-variable name="lwsgn"/>
						</arg-value>
					</do-set-dest-attr-value>
				</arg-actions>
			</do-for-each>
		</actions>
	</rule>
</policy>


-- 
dbgallo
------------------------------------------------------------------------
dbgallo's Profile: http://forums.novell.com/member.php?userid=5418
View this thread: http://forums.novell.com/showthread.php?t=423311

0
dbgallo
1/3/2011 9:36:08 PM
Reply: