Wednesday, June 26, 2013

Dude, where's my flow?

Got burned by FIM's wacky function behavior again, so I thought I'd actually create some documentation on it.

I set up a pretty common flow: Name = First Middle Last

However, when the middle name is empty, I don't want two blanks between first and last name.  So, how's this for a custom expression?  (Note that I'm assuming that first and last name are always present.)

Trim(givenName+" "+HR_MIDDLE_NAME)+" "+sn

Submit, import, sync.  Now I run a full sync from my target MA.  No errors.  We're good, right?  Not so fast; let's check the attribute flow.  No flow into Name.

Okay, so let's run a full sync preview on one of the connectors.  The status of the flow is Error.  (Good luck finding an error message.)
  • Full sync preview
    • Connector updates
      • Export attribute flow
        • Outbound sync rules
Status
MV attribute
Mapping type
Data source attribute
Initial value
Final value
Error

sync-rule-mapping - expression
NAME

(Unchanged)

So what happened?  Evidently, FIM doesn't like it when you concatenate an attribute that isn't present on the metaverse object.  (Has a funny way of showing it though, doesn't it?)

For my reference and yours, here are the results of other experiments that I ran on this flow.
  • HR_MIDDLE_NAME is not present in MV
  • (Assume givenName and sn are always present)

Description
Function
Flow definition
Result/status
MV attribute not present, embedded expr in Trim
CustomExpression
Trim(givenName+" "+HR_MIDDLE_NAME)+" "+sn
Error
Same expression but using concat feature in portal interface
Concat
Trim(CustomExpression(givenName+" "+HR_MIDDLE_NAME))+" "+sn
Error
Added IsPresent check and removed Trim
CustomExpression
givenName+IIF(IsPresent(HR_MIDDLE_NAME)," "+HR_MIDDLE_NAME,"")+" "+sn
Success
Trim function with no assumptions
CustomExpression
Trim(
""+
IIF(IsPresent(givenName),givenName,"")+
" "+
IIF(IsPresent(HR_MIDDLE_NAME),HR_MIDDLE_NAME,"")+
" "+
IIF(IsPresent(sn),sn,"")
)
Parse failure:
Parameter of function Trim does not match
(Test embedded expr in Trim)
CustomExpression
Trim(givenName+" "+sn)
(Success)
(Test MV attribute not present in Trim)
CustomExpression
givenName+" "+HR_MIDDLE_NAME+" "+sn
(Error)

4 comments:

  1. These are really a superb showcases here I am glad to have a review of it and feel to roll on its steps for my benefit always.friv jogos online
    jogos online 2019
    friv jogos 4 school online

    ReplyDelete
  2. วันนี้จะมาแนะนำ ทดลองเล่นสล็อต megagame กับเว็บไซต์เราได้เเล้ววันนี้ที่ MEGA GAME ทุกท่านจะพบ กับเกมสล็อตออนไลน์ รูปแบบใหม่มีมากกว่า 1000 เกมที่เราได้คัดสรรมาให้นักเสี่ยงโชค

    ReplyDelete
  3. วันนี้ เรา betflix888 ทางเข้า เว็บสล็อตออนไลน์ ชื่อดังอันดับหนึ่ง betflix มีเกม ให้สมาชิก ทุกท่านได้เลือกเล่นอย่างล้นหลาม โดยเฉพาะเกมสล็อต และ เกมคาสิโนออนไลน์

    ReplyDelete
  4. Hand-hammered metallic sheets have been used since ancient times for architectural functions. Water-powered rolling mills changed the manual process in the late seventeenth century. The process of flattening metallic sheets required massive rotating iron cylinders which pressed metallic pieces into sheets. The metals suited to this have been Heated Blanket lead, copper, zinc, iron and later steel.

    ReplyDelete