Adding a reviewer to a review stage using the Flex APIYou can add reviewers to an on-going review using the Flex API. package customsolution
{
import com.adobe.livecycle.rca.model.ReviewContext;
import com.adobe.livecycle.rca.service.ServiceProvider;
import com.adobe.livecycle.rca.service.core.IReviewCommentingAndApprovalService;
import com.adobe.livecycle.rca.token.IAsyncToken;
import mx.messaging.ChannelSet;
import mx.messaging.channels.AMFChannel;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.utils.ObjectUtil;
public class AddReviewer
{
public static var username:String;
public static var password:String;
public static var server_url:String;
public static var server_port:String;
public static var amfChannelURI:String;
public var _channelSet:ChannelSet = null;
public var rc : ReviewContext = null;
public var rcaService:IReviewCommentingAndApprovalService = null;
public function init():void
{
server_url="http://localhost";
server_port="8080";
amfChannelURI="/remoting/messagebroker/amf";
username= "administrator";
password = "password";
_channelSet = new ChannelSet();
_channelSet.addChannel(new AMFChannel('amf-channel', server_url+":"+server_port+amfChannelURI));
_channelSet.login(username, password);
rcaService = ServiceProvider.getReviewCommentingAndApprovalService(_channelSet);
}
public function AddReviewer()
{
init();
var reviewId: String = 'R-20100913-200300-700-3425';
var stageNo : int = 1;
var domainName : String = "DefaultDom";
var canonicalname : String = "apink";
var isOptional : Boolean = false;
var token:IAsyncToken = rcaService.addReviewer(reviewId, stageNo, domainName, canonicalname, isOptional);
token.addHandlers(handleResult, handleFault);
}
public function handleFault(event: FaultEvent):void{
trace(ObjectUtil.toString(event));
}
public function handleResult(event: ResultEvent):void{
trace(ObjectUtil.toString(event));
}
}
}
|
|
// Ethnio survey code removed