<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Versioning on lifecycle step</title><link>https://www.aras.com/community/f/development/5778/versioning-on-lifecycle-step</link><description>Hi Guys 
 I have a scenario where a user would like to keep record of a specific document type, namely pre-meeting and post-meeting to compare. 
 We have manual versioning enabled on our documents itemtype, but the user would like this to happens automatically</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Versioning on lifecycle step</title><link>https://www.aras.com/community/thread/2674?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2019 08:33:13 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:698a2f96-a6f8-4011-aada-69bb50cffdfa</guid><dc:creator>Wian le Roux</dc:creator><description>&lt;p&gt;Martin, thank you so much this works perfectly!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Versioning on lifecycle step</title><link>https://www.aras.com/community/thread/2670?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2019 16:37:03 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:baf69d93-dbb8-4a74-8526-50ae79c80224</guid><dc:creator>Meismart</dc:creator><description>&lt;p&gt;I found the code I am using (which maintains the document links).&lt;/p&gt;
&lt;p&gt;Item myThis = this.apply(&amp;quot;version&amp;quot;);&lt;br /&gt;if(myThis.fetchLockStatus()&amp;gt;0) {myThis.unlockItem();}&lt;/p&gt;
&lt;p&gt;return myThis;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Versioning on lifecycle step</title><link>https://www.aras.com/community/thread/2668?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2019 16:08:42 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:f680cd4e-a788-4bc9-8e32-20eeb4cf3364</guid><dc:creator>Meismart</dc:creator><description>&lt;p&gt;Hi Wian,&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t find the exact code we used to do this, I think you will&amp;nbsp;need to do the version of the item on the post transition, then&amp;nbsp;reattach&amp;nbsp;any attachments.&lt;/p&gt;
&lt;p&gt;Copy the relationships and set a new source_id.&lt;/p&gt;
&lt;p&gt;(also you should move &amp;quot;return resItem; to the finally statement).&lt;/p&gt;
&lt;p&gt;Many thanks,&lt;br /&gt;Martin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Versioning on lifecycle step</title><link>https://www.aras.com/community/thread/2632?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 12:13:20 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:8eb77aca-d705-48e8-a951-3fe40910ff5c</guid><dc:creator>Wian le Roux</dc:creator><description>&lt;p&gt;Hi Martin&lt;/p&gt;
&lt;p&gt;Its great news that I know its at least do able :D&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If i do this manually it works correctly by copying the file ect.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I gave ARAS PLM full permissions on the document classification type and still the same issue, it versions but without the &amp;quot;attachment&amp;quot;.&lt;/p&gt;
&lt;p&gt;If I put the method on the Pre transition it works but it stays within the initial work flow stage. Im not sure if im missing something in my script?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Wian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Versioning on lifecycle step</title><link>https://www.aras.com/community/thread/2631?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 11:55:49 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:30596865-c576-4a21-b836-863ad67e56e6</guid><dc:creator>Wian le Roux</dc:creator><description>&lt;p&gt;Hi Martin&lt;/p&gt;
&lt;p&gt;Thanks for the response. Correct i can version manually and the file copies.&lt;/p&gt;
&lt;p&gt;What i did notice is if i put the version script on the pre server method on the transition it works,the file versions correctly (copying the word file ect) but the document does not move to the next life cycle step it stays on the current one.&lt;/p&gt;
&lt;p&gt;I have given ARAS-PLM permissions in the script aswell. I have updated it as per below,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Innovator inn = this.getInnovator();&lt;/p&gt;
&lt;p&gt;// Grant &amp;#39;Aras PLM&amp;#39; permissions&lt;br /&gt;Aras.Server.Security.Identity plmIdentity = Aras.Server.Security.Identity.GetByName(&amp;quot;Aras PLM&amp;quot;);&lt;br /&gt;bool PermissionWasSet = Aras.Server.Security.Permissions.GrantIdentity(plmIdentity);&lt;/p&gt;
&lt;p&gt;try&lt;br /&gt;{&lt;br /&gt;// Version&lt;br /&gt;Item resItem = this.apply(&amp;quot;version&amp;quot;);&lt;br /&gt;resItem = resItem.apply(&amp;quot;unlock&amp;quot;); &lt;br /&gt;// Finish&lt;br /&gt;return resItem;&lt;br /&gt;}&lt;br /&gt;finally&lt;br /&gt;{&lt;br /&gt; // Revoke &amp;#39;Aras PLM&amp;#39; permissions&lt;br /&gt; if (PermissionWasSet) Aras.Server.Security.Permissions.RevokeIdentity(plmIdentity);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The only issue i still have is that this does not move on to the next lifecycle step when i add it on the pre.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Wian&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Versioning on lifecycle step</title><link>https://www.aras.com/community/thread/2608?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 15:58:07 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:ecf55f97-109d-4515-a1fb-b240a7a1cf67</guid><dc:creator>Meismart</dc:creator><description>&lt;p&gt;Hi Wan,&lt;/p&gt;
&lt;p&gt;We use the same technique as described, which works for us.&lt;/p&gt;
&lt;p&gt;Have you checked:&lt;br /&gt;1) You can version the item manually- Does the file get copied across on a manual version?&lt;/p&gt;
&lt;p&gt;2) if this is being run on promote, is ARAS-PLM performing the promotion, does ARAS-PLM have permission to modify the relationship item?&lt;/p&gt;
&lt;p&gt;Many thanks,&lt;br /&gt;Martin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Versioning on lifecycle step</title><link>https://www.aras.com/community/thread/2588?ContentTypeID=1</link><pubDate>Mon, 25 Feb 2019 08:47:25 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:823c339c-6bc1-48cc-b9cd-357d41aba991</guid><dc:creator>Wian le Roux</dc:creator><description>&lt;p&gt;Hi Angela&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for the response :)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Correct the Word file is not copied over to the new version of the file. Were using the default documents ItemType so the file is saved in the files relationship item. The rest of the form fields are carried over correctly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Il]l go through that PE_CreateNewRevision method and see if i can crack something there.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Currently there is no other methods running on the lifecycle i was also hoping it was just the form that wasn&amp;#39;t updating but unfortunate its not.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Wian&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Versioning on lifecycle step</title><link>https://www.aras.com/community/thread/2587?ContentTypeID=1</link><pubDate>Mon, 25 Feb 2019 07:13:51 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:6b4ccee7-85b9-4737-98ac-6e063001246e</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;What you describe should theoretically work. The Method PE_CreateNewRevision is a good reference for the &amp;ldquo;version&amp;rdquo; function. Maybe you can find anything useful there.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As far as I understood your post, the new item revision is created, but the word file is not copied from the previous version, right?&lt;br /&gt;Is your word file linked in an extra File relationship tab or directly as property in your main Itemtype? Are other properties copied correctly?&lt;/p&gt;
&lt;p&gt;Do you use other Methods, that may conflict with your current Methods? Maybe there is a second Method somewhere, that resets certain properties or relationship after a version event?&lt;/p&gt;
&lt;p&gt;Or to think it most simple &amp;ndash; maybe your Form is just not updated to show the latest values? When you close your item after version and open it again, will you see the missing values? In this case, I might work when you return newItem instead of this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>