Developer forum

Forum » Integration » Provide more context to JobFinished subscriber

Provide more context to JobFinished subscriber

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I am implementing a notification subscriber for Integration.JobFinished to run some custom SQL after the job has run. However, the JobFinishedArgs object doesn't provide any context about the job being executed. When I look at DestinationTables (hoping this would contain the *active* mappings, I get 380 results which seems like the entire database and it doesn't tell me anything about the job being processed or the destination tables being hit. Can you add more meta data? What about the job name, and more information about the source and target providers so I can analyze stuff like source files?

Thanks,

Imar


Replies

 
Jonas Krarup Dam
Reply
This post has been marked as an answer

Hi,

the job object contains all information about the actvity being run - you just have to look the right place.

To find out which mappings are active, take a look at Job.Mappings. This contains a list of table mappings, which in turn contains a list of column mappings, both with relevant information about any configured filtering and scripting.

Regards, Jonas

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Jonas,

Thanks, that put me on the right track. Turns out to be a version issue. I am on 8.7.1.5 which doesn't have the Job property, only DestinationTables, JobFailed and LogFile which aren't all that useful. Will upgrade to a later version to get access to the Job property.

Thanks!

Imar

 
Gaetan Di Caro
Reply

Is there any way to do this for 8.7 ? I have some code I'd like to run after a specific job only, but of course as it is it just runs after every single job and I can't find a way.

I haven't checked how it is in 8.8, but if the job name isn't present in the args it would be a great addition.

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Gaetan,

It was added to a later 8.7 release, so if you upgrade you should have all the details you need.

Imar

 

You must be logged in to post in the forum