Skip to main content
10-Marble
December 28, 2017
Question

license_release doesn't always release the print composer license

  • December 28, 2017
  • 2 replies
  • 2713 views

In our Arbortext installation, we have a customized print command that preprocesses our XML files before generating a PDF. Once the PDF has been generated, the customized command issues the license_release( "PrintPublishing" ) command before it finishes.

 

Most of the time this works just fine, but occassionally (a few times each month), the print composer license will not be released. Since we only have one license, I will usually hear from our users that they haven't been able to get a license for and hour or two. When I check the license server log, I can see which user last checked out the license. If I ask them the manually release the license (I wrote a menu item just for this), the license is released when they do so.

 

Is there anything more I can do to ensure that the license is released when the release_license command is issued?

 

Thanks,

Rick

2 replies

24-Ruby III
January 11, 2018

Try to open a case with technical support: https://support.ptc.com/apps/case_logger_viewer/cs/auth/ssl/log

12-Amethyst
June 17, 2024

Hi RickSchoen,

 

Would you be able to share the script portion where you can release the license after publish. I am stuck now on being able to bring up the publish box.

10-Marble
July 3, 2024

This is the function I wrote to release the print composer license:

function ucp_release_print_composer_license() {

if ( license_release( "All" ) != 1 ) {

response( "Arbortext Editor did not release the Print License!\n\nPlease select 'UCP > Release Print License' again!\n\n", "OK!" )\

}
else {

response( "Arbortext Editor successfully released the Print License.\n\n", "OK!" )

}

}

18-Opal
July 10, 2024

It may be a race condition, where the composer engine isn't done with the license when the request to release it happens. You could try putting it into a timer callback that keeps trying until it's successful, something like this:

function release_license_callback(data) {
 # the callback wants data param, but we don't need it so ignore it
 if (license_release("All") != 1) {
 # didn't work, keep trying
 return 1;
 }
 else {
 # success, cancel the timer
 window_set(current_window(), message, "Print license released");
 return 0;
 }
}

function ucp_release_print_composer_license() {
 # try every 5 sec until we succeed
 timer_add_callback(500, "release_license_callback");
}