Update-Objects
The Update-Objects webject updates one or more attribute values of Windchill objects.
When updating objects, the working copies of the objects must be specified and the objects must already be checked out. If any objects cannot be updated, an exception is thrown and no objects are updated.
Individual objects are updated by specifying OBJECT_REF and one or more FIELD parameters.
Multiple objects can be updated by specifying FIELD and one or more OBJECT_REF or TYPE and WHERE parameters.
The value of the FIELD parameter applies to all objects being updated.
FIELD parameter values do not apply to objects updated using GROUP_IN. As a result, specifying GROUP_IN allows for the most robust way to update multiple objects at one time.
Syntax
<ie:webject name="Update-Objects" type=ACT>
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FIELD" data="field"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="MODIFICATION" data="[ADD | REPLACE | DELETE]"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>
Parameters
Required
Interdependent
Optional
INSTANCE
AUTHORIZATION
ACCEPT_LANGUAGE
CONTAINER_REF
ATTRIBUTE
DBUSER
CONNECTION_ATTEMPTS
DESCRIPTOR
CONNECTION_ATTEMPT_INTERVAL
FIELD
FORMAT
GROUP_FILTER
GROUP_OUT
GROUP_IN
MODIFICATION
INCLUDE_ARGS
REFERENCE_DELIMITER
INCLUDE_CONSTRAINTS
REFERENCE_OUTPUT_DELIMITER
INCLUDE_DESCRIPTORS
SESSION_ID
NEXT_OP
UNFORMATTED
OBJECT_REF
PASSWD
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_SENSITIVITY
* 
If a parameter is listed in the table but is not defined below, then it has a common parameter definition. For descriptions of those parameters, see the Common Webject Parameters section in Adapter Webjects Overview.
CONTAINER_REF
A Windchill context to apply the webject against. This parameter accepts the following types of input:
The UFID of a Windchill context. Multiple UFIDs can be specified for this parameter.
MEMBERSHIP—The query finds only those contexts of which the user is a member.
When this parameter is specified, the scope of queries executed against the TYPE and WHERE parameters are restricted to the associated context.
FIELD
This parameter specifies an attribute and associated value to be included in the requested operation. The attribute and associated value are separated by an equal sign. For example:
<ie:param name="FIELD" data="source=wt.part.Source.make"/>
The attribute and value are dependent on the object and operation being performed. This parameter can have multiple values.
* 
When MODFICATION = DELETE, the value portion of the name=value pair is ignored and all values for the attribute specified are removed.
For example, if MODIFICATION = DELETE and FIELD = a = b, then “a” is the attribute and “b” is the value. The value is ignored and is not needed as all of the values for attribute “a” are removed. All that is required from the FIELD parameter when MODIFICATION = DELETE is FIELD = a.
GROUP_IN
The objects to be updated. The OBID attribute of each element selects the object to be updated. The other attributes in each element specify values to be replaced or added in the selected objects. This parameter can be specified instead of or in addition to FIELD parameters.
If FIELD parameters are specified, they define attributes of a single object (selected by TYPE and WHERE or OBJECT_REF) that is updated, while each element of the GROUP_IN group defines an object to be updated, allowing multiple objects to be updated at one time.
GROUP_OUT
The name of the output group containing the results. If this parameter is omitted, then the name of the output group is constructed by appending the string “-Output” to the webject name. This parameter is optional.
MODIFICATION
Specifies whether attribute values are replaced, deleted, or added. The supported values of this parameter are:
REPLACE—Attributes specified in FIELD parameters or in elements of the GROUP_IN parameter replace attributes in the updated objects.
ADD—Attributes specified in FIELD parameters or in elements of the GROUP_IN parameter are added to attributes in the updated objects. Adding is only allowed when the specified attributes do not have values already, or when the specified attributes are allowed to have multiple values.
DELETE—Any specified value in the name=value pair in the FIELD parameter are ignored and all values for the attribute specified are removed.
For example, if MODIFICATION = DELETE and FIELD = a = b, then “a” is the attribute and “b” is the value. The value is ignored and is not needed as all of the values for attribute “a” are removed. All that is required from the FIELD parameter when MODIFICATION = DELETE is FIELD = a.
The default for this parameter is REPLACE. This parameter is optional.
TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For more information, see Specifying the TYPE and WHERE Parameters.
WHERE
A query expression identifying the objects for which to query. This parameter can be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is specified, TYPE must also be specified. For more information, see Specifying the TYPE and WHERE Parameters.
Est-ce que cela a été utile ?