Trigger process after successful specimen import

LabKey Support Forum
Trigger process after successful specimen import tstellin  2020-06-29 12:23
Status: Active
 

Hi,

We'd like to kick off a post-specimen import process that starts when labkey finishes a specimen import pipeline job. Does a feature like this exist in Labkey Server? I've looked through the UI and documentation, and didn't see anything, but wanted to double-check and make sure it doesn't exist.

Thanks!
-Tobin

 
 
chetc (LabKey Support) responded:  2020-07-20 12:08

Hello Tobin,

The answer is likely no, but to confirm, are you trying to import a study specimen archive? Or are you doing something else that happens to contain data about specimens?

What exactly are you trying to do as a part of that post-specimen import process?

https://www.labkey.org/Documentation/wiki-page.view?name=importSpecimenData

Thanks,
Chet

 
adam responded:  2020-07-20 13:44

Not exactly what you asked for, but you could create a custom pipeline job that invokes the specimen import followed by your custom tasks(s). A Script-Based Pipeline gives you a great deal of power to orchestrate multiple pipeline tasks written in a variety of languages. You can, for example, specify a <taskref> that references a built-in task implemented in the platform, such as org.labkey.study.pipeline. SpecimenReloadJob, and then specify additional tasks that you write in Python, R, Java, etc.

Adam

 
tstellin responded:  2020-07-21 05:38
Status: Closed

Chet,

Yes, we're importing a specimen archive via a file trigger (we have a perl process that generates the archive off daily LDMS data, and then places a file on the filesystem to tell labkey to begin its specimen import process).

Adam,

I'll look into this. What we want is to execute a REFRESH MATERIALIZED VIEW sql statement once the specimen import has completed.

Thanks!
-Tobin

 
chetc (LabKey Support) responded:  2020-08-10 11:09

Hello Tobin,

As far as I know there isn't really a built in feature for this. However, Adams suggestion seems like it would do the trick.

Where you able to give it a try?
Did you need any help setting this up?

Thanks,
Chet