Skip to main content
Question

Trigger a workflow once a new instance is inserted in Data Model container


Hello experts,

We want to achieve the following workflow:

  • Once a new instance is created/added in our datamodel container
  • Another workflow must be triggered immediately
  • We do not want to create a scheduled based polling to invoke our workflow since our workflow is time sensitive and high importance

Could you please let us know if CDF supports this functionality? Or suggest a way to achieve it.

I have explored the CDF in my limited knowledge, I found that subscription is available on Data Model, but it is not enabled in our environment.

Could you please help me in this.

Thanks,

Pranjul Singh

 

 

​​​​​​​

 

 

 

 

5 replies

Everton Colling
Seasoned Practitioner
Forum|alt.badge.img

Hi ​@Pranjul Singh!

Yes, CDF does support this functionality through Data Modeling event triggers in Data Workflows. This allows you to create workflows that are triggered based on changes to data modeling instances that match your specified criteria, rather than relying on scheduled polling.

In your use case, you can set up a trigger with the dataModeling trigger type that will run your workflow when new instances are created in your data model container. You can configure the trigger to respond immediately by setting appropriate batch parameters.

For more detailed information and code examples, please refer to our documentation at: https://docs.cognite.com/cdf/data_workflows/triggers#data-modeling-events


Hello Everton,

With the help of the provided example, I am able to run the workflow with the triggers. But the issue is it take minimum of 60 seconds to trigger.

The Batch timeout cannot be less than 60 seconds.

But in my case I want to trigger the workflow as soon as new instance is being update in the Model container.

 

 

Please provide your valuable feedback to achieve it


Everton Colling
Seasoned Practitioner
Forum|alt.badge.img

Hi ​@Pranjul Singh!

That’s unfortunately not possible today. This is a limitation on the trigger in the API, as documented here. The minimum value of batchTimeout is 60s today.

This is a good candidate for a Product Idea. Feel free to create one, explaining what you would like to achieve and what needs to be improved in the product. That way other customers can upvote the idea and we can use it to gather interest to properly prioritise where to invest on the different product areas.

To create a product idea, click on Product Ideas in the top bar and Submit Product Idea.

 


This is critical requirement for us. Our customer needs to be notified immediately since the message is of critical action. If I submit the Product Idea, how soon it can be implemented?


Everton Colling
Seasoned Practitioner
Forum|alt.badge.img

This is not on our short term roadmap unfortunately. I would advise reaching out to ​@Aditya Kotiyal, explaining the requirement and associated impact.


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings