Search in Jobqueue

Search in Jobqueue

gbadziura
Enthusiast Enthusiast
730 Views
5 Replies
Message 1 of 6

Search in Jobqueue

gbadziura
Enthusiast
Enthusiast

Hi All

 

is there a better way to find a Job of file in the Jobqueu. At the moment i use the somthing like this to find out if a Job for a file exist.

 

var dateiname = vaultDocument.File.Name.ToUpper();
var jobs = settingParameter.ConnectionManager.VaultConnection.WebServiceManager.JobService.GetJobsByDate(100000, DateTime.Today.AddDays(-100));
if (jobs != null && jobs.Any())
return jobs.All(job => !job.Descr.ToUpper().Contains(dateiname));
return true;

With this kind of search i can get more than i want or nothing if the FileName is not part of the Description. Does anyone know a better solution?

 

Thanks for any support.

 

regards

 

Gerhard

 

 

0 Likes
731 Views
5 Replies
Replies (5)
Message 2 of 6

Markus.Koechl
Autodesk
Autodesk

In our Data Standard snippet JobListTab to display pending jobs for a selected file (posted here https://knowledge.autodesk.com/community/article/33706) we are handling this in the same way. However Vault default jobs always include the file name in the description, so custom jobs might have an issue if they don't add the file name or in case the vault is configured not to enforce unique names. Another good reason to enforce ;).



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 3 of 6

gbadziura
Enthusiast
Enthusiast

Hi Markus

 

You are right. To enforce the unique filename might be an Option, but only if you dont' use Jobs für Items.

We use the Event UpdateItemLifecycleStateEvents to check various things. One is if  there exist an Job for the Item. So for example if there is an Job for the file '0815.idw' in the jobqueue and i check the Item number  '0815'  only in the description then i get a true.

 

Meanwhile i solved the problem for me with checking the JobParams. But in my opinion this should be an part of the API. Perhaps in the next version

 

 

regards

 

Gerhard

  

 

 

0 Likes
Message 4 of 6

UweHandzik
Participant
Participant

Leider kann die VDS_JobListTab_2017.1. ZIP nicht geladen werden ..

 

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>9CE93D62A85D9C40</RequestId>
<HostId>
JaQZihJALXU2CKtkvznb0j1JZdxzb+KSB40RYD/n69WXJP/fBsNWjZMwCl6aAfKq6+zWbOfjGHk=
</HostId>
</Error>
0 Likes
Message 5 of 6

Markus.Koechl
Autodesk
Autodesk
thanks for the hint. Please try again, the download link is updated.
Alternatively use (German AKN page): https://knowledge.autodesk.com/de/community/article/29071


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 6 of 6

TylerWarner33
Contributor
Contributor

Hello @Markus.Koechl , is there an updated link to the article mentioned?

 

Thanks,

Tyler