body { margin: 0 0 0 0; padding: 0 0 0 0;}td, div { font-family: Segoe UI; font-size: 9.0pt; vertical-align: top;}body { margin: 0 0 0 0; padding: 0 0 0 0; overflow: hidden;}*.transcript { background-color: rgb(210,210,210);}*.messageBlock { padding-left: 10.0px; padding-right: 10.0px; margin-bottom: 3.0px;}*.message { padding-left: 20.0px; margin-left: 95.0px;}*.messageCont { padding-left: 20.0px; margin-left: 95.0px;}*.other { font-size: 11.0px; color: rgb(57,87,122); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95.0px;}*.myself { font-size: 11.0px; color: rgb(218,129,3); font-style: normal; font-weight: bold; font-style: normal; float: left; width: 95.0px;}*.otherCont { font-size: 8.0px; text-align: right; color: rgb(57,87,122); font-family: Arial , Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95.0px;}*.myselfCont { font-size: 8.0px; text-align: right; color: rgb(218,129,3); font-family: Arial , Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95.0px;}*.system { font-size: 11.0px; color: rgb(218,129,3); font-style: normal; font-weight: normal;}*.showTimestamp { padding-left: 20.0px; font-size: 11.0px; float: right; color: rgb(153,153,153); font-style: normal; font-weight: normal;}*.other1 { font-size: 11.0px; color: rgb(172,32,0); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95.0px;}*.otherCont1 { font-size: 8.0px; text-align: right; color: rgb(172,32,0); font-family: Arial , Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95.0px;}*.other2 { font-size: 11.0px; color: rgb(60,159,168); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95.0px;}*.otherCont2 { font-size: 8.0px; text-align: right; color: rgb(60,159,168); font-family: Arial , Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95.0px;}*.other3 { font-size: 11.0px; color: rgb(226,86,20); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95.0px;}*.otherCont3 { font-size: 8.0px; text-align: right; color: rgb(226,86,20); font-family: Arial , Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95.0px;}*.other4 { font-size: 11.0px; color: rgb(11,106,200); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95.0px;}*.otherCont4 { font-size: 8.0px; text-align: right; color: rgb(11,106,200); font-family: Arial , Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95.0px;}*.other5 { font-size: 11.0px; color: rgb(178,50,144); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95.0px;}*.otherCont5 { font-size: 8.0px; text-align: right; color: rgb(178,50,144); font-family: Arial , Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95.0px;}*.other6 { font-size: 11.0px; color: rgb(2,231,199); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95.0px;}*.otherCont6 { font-size: 8.0px; text-align: right; color: rgb(2,231,199); font-family: Arial , Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95.0px;}*.other7 { font-size: 11.0px; color: rgb(91,50,132); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95.0px;}*.otherCont7 { font-size: 8.0px; text-align: right; color: rgb(91,50,132); font-family: Arial , Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95.0px;}*.highlight { background-color: rgb(190,214,248);}*.datestamp { padding-right: 0.0px; font-size: 11.0px; cursor: default; margin-bottom: 1.0px; background-color: rgb(192,192,192); width: 100.0%; float: left; text-align: right; color: rgb(255,255,255); font-weight: bold; font-style: italic;}*#chatAlert { float: left; border-bottom: 1.0px solid rgb(232,208,145); padding: 6.0px; width: 100.0%; color: rgb(165,117,76);}*#chatAlertImage { float: left;}*#chatAlertText { float: left; margin-left: 6.0px;}*#chatAlertClose { float: right; margin-right: 10.0px; padding-right: 6.0px; margin-top: 0.0px;}*#chatAlertText a { color: rgb(165,117,76);}*#chatAlertText a:hover { color: rgb(165,117,76); text-decoration: none;}*.tsDisplay { display: block;}*.dsDisplay { display: none;}
Hello,
I am using the following code snippet to publish a File type content instance.
code snippet:
//publishing start
if(!stfl.getManagedObjectStatus().isApproved()){
stfl.setManagedObjectStatus(ManagedObjectStatus.getInstance("approved"));
stfl.commit();
}
JobType type = JobType.PUBLISH;
DeploymentJobDefinition jobDef = new DeploymentJobDefinition(PublishUtils.autogenerateJobName(site.getName()), type );
jobDef.setRequestor("TestPublish");
jobDef.setDescription("Job created by TestPublisher on " + new Date());
ContentInstancePattern pattern = new ContentInstancePattern(new ManagedObjectVCMRef[] {stfl.getContentManagementId()});
ApprovalPolicy policy = new ApprovalPolicy();
policy.setUnapprovedDescendentAction(JobConst.getPolicyFromName("MODERATE"));
pattern.setApprovalPolicy(policy);
jobDef.setContentPattern( pattern, false);
DeploymentClient dc=new DeploymentClient(siteRef);
JobReport jr=dc.createJob2(jobDef);
ObjectId jobId=jr.getJobData().getId();
if(jr.isJobValid()){
dc.launchJob(jobId);
} else {
dc.releaseJob(jobId);
}
//publishing end
The ci gets Published and Approval status is showing as Approved, but the Published status of the ci is not getting updated to Published. It remains in stale state. Can anybody please assist regarding this and suggest how to modify the Publish status in WEM.
Many Thanks,