Jobs are not updating Vault files randomly
Sometimes the file conversion jobs are not updating the target Vault file, but terminate without error
Cause
There is an issue in the Add-VaultFile cmdlet where it returns a file object even though the target file is checked out by another user.
So even if a job has a condition to check whether a file object has been returned it will never be executed.
Solution 1
This issue was fixed in powerVault v26.0.13. Update powerVault to this version or a newer version to fix this issue.
powerVault v26.0.13 Change Logs
Solution 2
If an update is not possible add a check at the start of your job to see if the target file is checked out by another user. As the target file can't be updated in this situation it saves time to exit the job as early as possible, before doing time consuming stuff like starting Inventor.
For example in the Sample.CreatePDF job this could look like this:
if ($pdfNetworkFolder -and -not (Test-Path $pdfNetworkFolder)) {
throw("The network folder '$pdfNetworkFolder' does not exist! Correct pdfNetworkFolder in ps1 file!")
}
to
if ($pdfNetworkFolder -and -not (Test-Path $pdfNetworkFolder)) {
throw("The network folder '$pdfNetworkFolder' does not exist! Correct pdfNetworkFolder in ps1 file!")
}
$originalPdfFile = Get-VaultFile -File "$pdfVaultFolder/$pdfFileName"
$checkedOutByOtherUser = $originalPdfFile -and $originalPdfFile.IsCheckedOut -and ($originalPdfFile._CheckoutUserName -ne $vaultConnection.UserName)
if($checkedOutByOtherUser) {
throw "The file '$pdfVaultFolder/$pdfFileName' is currently checked out by other user '$($originalPdfFile._CheckoutUserName)'"
}