<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>APM Scheduled Action running more than 24 hours and leaving locks</title><link>https://communities.bentley.com/products/assetwise/asset_performance_management/w/wiki/66026/apm-scheduled-action-running-more-than-24-hours-and-leaving-locks</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>APM Scheduled Action running more than 24 hours and leaving locks</title><link>https://communities.bentley.com/products/assetwise/asset_performance_management/w/wiki/66026/apm-scheduled-action-running-more-than-24-hours-and-leaving-locks</link><pubDate>Tue, 18 Apr 2023 17:57:56 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2bde63c7-942b-4461-97d6-c55b507467cb</guid><dc:creator>Joseph Marin</dc:creator><comments>https://communities.bentley.com/products/assetwise/asset_performance_management/w/wiki/66026/apm-scheduled-action-running-more-than-24-hours-and-leaving-locks#comments</comments><description>Current Revision posted to Asset Reliability | AssetWise APM Wiki by Joseph Marin on 4/18/2023 5:57:56 PM&lt;br /&gt;
&lt;table style="background-color:#dce5f0;border:0px solid #dce5f0;" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;" width="30%"&gt;&lt;strong&gt;Product(s):&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;APM Implementation and Performance Management&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;Version(s):&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;Environment:&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;Area:&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:right;"&gt;&lt;strong&gt;Subarea:&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;Problem Description&lt;/h1&gt;
&lt;p&gt;User noticed that several work orders slated to be automatically closed were still open. When&amp;nbsp;the user tried closing the work orders manually, APM would launch a dialogue indicating that the work order were still being edited by an automated service user.&lt;/p&gt;
&lt;h1&gt;Solution&lt;/h1&gt;
&lt;p&gt;There are many different times of scheduled actions: some focus on closing work orders, some&amp;nbsp;focus on generating new PMs, etc. Any one of these actions may hang for various reasons and when they hang the transaction in process may continue to keep locks on the objects being worked on and will hang indefinitely if there is no timeout set on the scheduled action. The section of the help file that shows where to set the timeout, the &amp;quot;Stop running after&amp;quot; attribute is:&lt;/p&gt;
&lt;p&gt;https://help-apm.bentley.com/7/en/eam/wwhelp/wwhimpl/js/html/wwhelp.htm#href=Creating_Scheduled_Actions.html&amp;lt;https://urldefense.com/v3/__https:/help-apm.bentley.com/7/en/eam/wwhelp/wwhimpl/js/html/wwhelp.htm*href=Creating_Scheduled_Actions.html__;Iw!!AwIW5cuGsw!dGFoCH2f54lTZvGUf0qCvNOu1eS5l_zOfkxs9TFcLNv9DoUp_3jlTVF88g2Agq8X8Asqkv-IIZfHUov-Y9aI$&amp;gt;&lt;/p&gt;
&lt;p&gt;You can find this on the enterprise level.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:469px;max-width:814px;" height="469" src="/resized-image/__size/1628x938/__key/communityserver-wikis-components-files/00-00-00-02-43/pastedimage1681840416034v2.png" width="814" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The &amp;quot;Stop running after&amp;quot; property should be set this for all scheduled actions, keeping in mind to lengthen and shorten the period for each based on previous history for that particular scheduled action. Most scheduled actions should be set to 1 hour and no scheduled action should need to be set to more than 8 hours.&lt;/p&gt;
&lt;p&gt;Note - We setting this, also consider the time that the scheduled action is set to run at and set the Stop running after time that will avoid the scheduled action running during a database back-up time as this can result in conflicts with scheduled services creating new objects at the same time a back-up is being taken.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-02-43/7674.NewLogo.png"&gt;&lt;img style="border-width:0px;" alt=" " height="60" src="/cfs-file.ashx/__key/communityserver-components-sitefiles/TSG-Logo.png" width="189" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>