解决方案
方案一 - 如何在上下文复制包导入期间标识目标系统中的匹配用户。
通过更改适当的服务委派配置来应用预设委派之一或通过写入自定义委派,可以实现预期的结果。
下图描述了已配置的 PrincipalMatchDelegate 服务实现在确定如何找到目标系统中的用户方面的作用。
解决方案元素
这些元素可确定如何在上下文复制包导入期间标识目标系统中的匹配用户。
* 
在以下内容中,selector 值是使用关系上下文的预确定的指定符,用于标识适用于特定使用关系的服务配置。不得修改 selector 的值 - 只能更改相应的 serviceClass
元素
类型
说明
service.properties.xconf
服务委派配置文件
位置:<Windchill>\codebase\service.properties
以下服务配置元素可确定在以下每种情况下将应用哪个 serviceClass:
如果源数据参考了未禁用的用户,则选择器为 UserInContextReplicationImport:
<Service context="default" name="wt.org.delegate.PrincipalMatchDelegate">
<Option cardinality="singleton" requestor="wt.org.WTUser" selector="UserInContextReplicationImport" serviceClass="wt.org.delegate.ImportedUserByUserNameMatchDelegate"/> </Service>
如果源数据参考了已禁用的用户,则选择器为 DisabledUserInContextReplicationImport:
<Service context="default" name="wt.org.delegate.PrincipalMatchDelegate">
<Option cardinality="singleton" requestor="wt.org.WTUser" selector="DisabledUserInContextReplicationImport" serviceClass="wt.org.delegate.ImportedDisabledUserMatchDelegate"/>
</Service>
ImportedUserByUserNameMatchDelegate
预设的委派 JAVA 类
位置:<Windchill>\codebase\wt\org\ImportedUserByUserNameMatchDelegate.class
此委派实现与选择器 "UserInContextReplicationImport" 配合使用。预设委派,这是默认情况下为此选择器配置的委派。
此委派仅用于在上下文复制导入中查找匹配的未禁用用户。其使用源用户的名称在目标系统中查找匹配的未禁用用户
ImportedUserByEmailIdMatchDelegate
预设的委派 JAVA 类
位置:<Windchill>\codebase\wt\org\ImportedUserByEmailIdMatchDelegate.class
此委派实现与选择器 "UserInContextReplicationImport" 配合使用。这不是默认情况下为此选择器配置的委派。
此委派仅用于在上下文复制导入中查找匹配的未禁用用户。其使用源用户的电子邮件地址在目标系统中查找匹配的未禁用用户
ImportedDisabledUserMatchDelegate
预设的委派 JAVA 类
位置:<Windchill>\codebase\wt\org\ImportedDisabledUserMatchDelegate.class
此委派实现与选择器 "DisabledUserInContextReplicationImport" 配合使用。这是默认情况下为此选择器配置的委派。
此委派仅用于在上下文复制导入中查找匹配的已禁用用户。其使用源用户的名称、电子邮件地址、全名和姓氏来查找目标系统中匹配的已禁用用户
PrincipalMatchDelegate
自定义者的委派 JAVA 接口
所有自定义委派实现都必须遵循此接口所建立的合约
过程
要更改行为,以便在上下文复制导入期间使用用户的电子邮件地址在目标系统上标识未禁用用户,请将与选择器 UserInContextReplicationImport 关联的配置元素中的 serviceClass 更改为使用 wt.org.ImportedUserByEmailIdMatchDelegate 实现:
<Service context="default" name="wt.org.delegate.PrincipalMatchDelegate">
<Option cardinality="singleton" requestor="wt.org.WTUser"
selector="UserInContextReplicationImport"
serviceClass="wt.org.delegate.ImportedUserByEmailIdMatchDelegate"/>
</Service>
* 
选择器 UserInContextReplicationImport 仅支持此配置。其不适用于选择器 DisabledUserInContextReplicationImport,原因在于除默认的预设配置外,没有其他选择器 DisabledUserInContextReplicationImport 的委派实现。
要更改行为以使用基于用户其他属性的更多自定义逻辑,请参阅自定义点和限制
这对您有帮助吗?