cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the published/approved date in workflow

Former Member
0 Kudos

Hi All,

I have a KM folder to which the approval process has been enabled. The requirement is to add the published date of the documents in the layout.

I can have a custom metadata to store the publish date and add this metadata in layout set. But I could not see any direct api to get the published date of a document.

Is there any way to retrieve the published date or approved date of documents under workflow.

Thanks & Regards,

Yoga

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

Did you find a solution or workaround?

My code only displays who released the document:

IPropertyName propertyName = new PropertyName("http://sapportals.com/xmlns/cm", "state");

   IProperty prop = oVersion.getProperty(propertyName);

   if( prop != null ){

  out.println(prop.getValueAsString()+":");

   if ( prop.getValueAsString().equals("Released") ||  prop.getValueAsString().equals("Liberados") ){

  //ultimaLiberada=i;

   oVer1 = oVersion;

   iVersion ++;

  

  IRepositoryServiceFactory factory =  com.sapportals.wcm.repository.ResourceFactory.getInstance().getServiceFactory();

     IStatemanagementManager statemanager = (IStatemanagementManager)factory.getRepositoryService(oVersion.getRepositoryManager(),com.sapportals.wcm.IWcmConst.STATEMANAGEMENT_SERVICE);

  IStatemanagementResource stateResource =statemanager.getStatemangementResource(oVersion);

  IStepList lista=stateResource.getUtils().readApproverList();

  if(lista!=null)

  {

  out.println("Version:"+iVersion+": Approve by:"+lista.getStepListString()+"<br/>");

  }

  

   }

   }

Example:

In progress: In progress: In progress: In progress: Released: Version:1: Approve by:Do you approve?;true;1{user[false

Regards,