<AttributeOperation> element

The <AttributeOperation> defines what action should be taken on an attribute.

XML Attribute NameDescription Allowed Values

operation

Required. The type of operation to perform on the attribute

See the operation types section on this page

name

Required. The system name of the attribute as it appears in the FIM Service Schema

Any valid FIM service system attribute name that is bound to the resource type specified in the parent ResourceOperation

type

Optional. Defines the type of value provided in the element | See the value types section on this page

Operation Types

The following operation types are supported for attribute values

Operation typeDescription

none

The 'none' operation is used when defining an [[anchor attribute

add

Add the value

replace

Replaces the value of the attribute with that specified in the element text

delete

Deletes the specified value

### Value Types

Value type

Description

---

---

If a value type is not specified, then the text contents of the element are used as the attribute value. The text will be searched for any [[variable

file

Specifies that the text content of the element refers to a file which should be imported and used as the attribute value. The file will be searched for any [[variable

xmlref

Specifies that the text content of the element refers to another object that has an existing [[ResourceOperation

filter

Specifies that the text content of the element is an XPath filter, and should be wrapped with the XML XPath descriptor. The filter text will be searched for any [[variable

ref

Specifies that the text content of the element is a reference to another object within the FIM service. Objects are referenced using the format ```ObjectType

### Example

The following example shows an attribute operation that sets the text of the attribute to that specified in the element

```xml

_Demo Set

```

The following example shows an attribute operation that constructs a filter attribute. Only the XPath is provided, and the XML wrapper gets added automatically

<AttributeOperation operation="replace" name="Filter" type="filter">/Person</AttributeOperation>

The following example shows an attribute operation that imports the text content of myworkflow.xml and saves that content to the XOML attribute

<AttributeOperation operation="replace" name="XOML" type="file">.\myworkflow.xoml"</AttributeOperation>

The following example shows an attribute operation that sets the value of the attribute to the display name of another object

<AttributeOperation operation="replace" name="ExplicitMember" type="ref">Set|DisplayName|_DemoSet</AttributeOperation>

Alternatively if the resource in question is already in the XML file, and has a [[ResourceOperation element]] with an id of setDemo

<AttributeOperation operation="replace" name="ExplicitMember" type="xmlref">setDemo</AttributeOperation>

Given a [][Variable element] with a name of #environment#, the following example shows how to use that variable in a text value The following example shows an attribute operation that sets the text of the attribute to that specified in the element

<AttributeOperation operation="replace" name="DisplayName">_Demo Set in #environment#</AttributeOperation>

Last updated