My objective was to create a custom profile and target contents based on my custom properties.
The following are the steps done:
- I creates a java class CustomProfile with two custom properties (following KB:62008 "Extending the User Profile object" )
[left]
[/left]
package com.interwoven.livesite.p13n.model;
import com.interwoven.livesite.p13n.model.UserProfile;
public class CustomProfile extends UserProfile
{
private String designation;
private String businessCategory;
public void setDesignation(String designation)
{
this.designation = designation;
}
public String getDesignation()
{
return this.designation;
}
public void setBusinessCategory(String businessCategory)
{
this.businessCategory = businessCategory;
}
public String getBusinessCategory()
{
return this.businessCategory;
}
}
Packaged it into a jar and copied it over to iw-home/local/config/livesite_customer_src/lib and ran a build.bat
- [left]
Then followed the KB: 62887 , Setting Up Rules Project in ILog JRules Studio
[/left]
- [left]
Also Changed the value of “Type” of the “UserProfile” parameter to the above [color=#000000]CustomProfile class[/color]
[/left]
- [left]
Synchronized the Rules Project to Rule Team Server as said in the KB:62884
[/left]
- [left]
Also tagged the assests with taxonomies and deployed them using the OOTB PLC workflow.
[/left]
[left]
When I try to use the OOTB simple content rule component to fetch the targeted content, I get an error like the follwoing
[/left]
[HTML]
java.lang.RuntimeException: ilog.rules.bres.session.IlrRuleSessionException: Nested Message is
variable "UserProfile" : the variable type com.interwoven.livesite.p13n.model.UserProfile is not assignable to com.interwoven.livesite.p13n.model.CustomProfile
. Look at the XU files.
at com.interwoven.livesite.rules.ilog.RuleExecutionService.executeContentRules(RuleExecutionService.java:407)
at com.interwoven.livesite.external.ExternalContentRule.execute(ExternalContentRule.java:158)
at com.interwoven.livesite.runtime.model.component.Component.executeExternal(Component.java:359)
at com.interwoven.livesite.runtime.model.page.RuntimeComponent.transform(RuntimeComponent.java:222)
at com.interwoven.livesite.model.page.PreviewPage.renderHtmlComponent(PreviewPage.java:454)
[/HTML]
So whenever I set the Ruleset parameter UserProfile type to [color=#a0522d]com.interwoven.livesite.p13n.model.CustomProfile, I get the above error.[/color]
[color=black][/color]
[color=black][/color]
[color=black]But if I leave as the OOTB reference to ContentUserProfile, there is no error, which does not serve my purpose to custom user profile targeting.[/color]
Does anyone has implemented this scenario in their servers ?
[color=blue]What could be the reason for the error? 
[/color]
[color=#0000ff][/color]
[color=#0000ff]Kindly Advice..[/color]
[color=#0000ff][/color]
[color=#0000ff]Thanks in Advance..[/color]
[color=#0000ff]
--------------------------
Teamsite 6.7.2
Livesite 3.1
Windows 2000 server
---------------------------[/color]