<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Programmatically updated Document status changing to Draft in DXP</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111658939" />
  <subtitle>Programmatically updated Document status changing to Draft in DXP</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111658939</id>
  <updated>2026-04-04T18:29:33Z</updated>
  <dc:date>2026-04-04T18:29:33Z</dc:date>
  <entry>
    <title>RE: Programmatically updated Document status changing to Draft in DXP</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111666409" />
    <author>
      <name>Kalai Arasan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111666409</id>
    <updated>2018-11-26T06:52:40Z</updated>
    <published>2018-11-26T06:52:40Z</published>
    <summary type="html">Finally I done this by updating the status for the Latest FileVersion
and it's working fine.</summary>
    <dc:creator>Kalai Arasan</dc:creator>
    <dc:date>2018-11-26T06:52:40Z</dc:date>
  </entry>
  <entry>
    <title>Programmatically updated Document status changing to Draft in DXP</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111658938" />
    <author>
      <name>Kalai Arasan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111658938</id>
    <updated>2018-11-24T15:38:51Z</updated>
    <published>2018-11-24T15:38:51Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I have updated the existing document programmatically by
  the DLFileEntryLocalServiceUtil. Below is code.&lt;/p&gt;
&lt;p&gt; DLFileEntryLocalServiceUtil.updateFileEntry(userId, fileEntryId,
  title, mimeType, dxpFileTitle, title, &amp;quot;Draft to save&amp;quot;,
  true,&lt;br /&gt;                 fileEntryTypeId, ddmFormValuesMap, file,
  is, size, serviceContext);&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;But the document status is changing to &lt;strong&gt;Draft instead of
  Approved&lt;/strong&gt;. Could you please suggest why the status changing to Draft?&lt;/p&gt;
&lt;p&gt;I want to update document with the status &lt;strong&gt;Approved.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;And tried to update the status like as below&lt;/p&gt;
&lt;p&gt;

  &lt;strong&gt;DLFileEntryLocalServiceUtil.updateStatus(folder.getUserId(),dlFileEntry.getFileVersion().getFileVersionId(),workFlowStatus,
    serviceContext,new HashMap&amp;lt;String, Serializable&amp;gt;());&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But the status is not changing and showing as Draft. Is there any way
  to update document with Approved status?.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Kalai&lt;/p&gt;</summary>
    <dc:creator>Kalai Arasan</dc:creator>
    <dc:date>2018-11-24T15:38:51Z</dc:date>
  </entry>
</feed>
