how to schedule a process model from database insert or update

Certified Lead Developer

Hi Folks,

How can I schedule/ trigger my process model so that it will start on a row insert or update in da custom database table.

Regards,

Ghanashyam

  Discussion posts and replies are publicly visible

Parents
  • So I can't think of a direct way of triggering an Appian process model after an ON INSERT event in a database table. But with a little bit of work you could design in indirect method.

    This would involve having a process model that runs on a scheduled basis e.g. every 15 minutes (the period would be dependent on how often/soon you want to respond to your ON INSERT events i.e. how time sensitive you triggering pattern needs to be). This process model would fetch all instances of new news from the subject database table (so you'd need to add a column to indicate that the row was new and had not yet been processed). For every new row you could then start the process model that you want to trigger on the ON INSERT event. You'd also have to update the original row so that the next time your scheduled process runs it doesn't fetch the rows that it's already processed.

    You'd also need to think carefully about the volumes involved and consider a throttling mechanism so you don't end up starting so many instances of the process you need triggered that you run out of memory and kill the server.

  • 0
    Certified Lead Developer
    in reply to Stewart Burchell

    Hi Stewart,

    Thanks for the reply !! I thought the same approach but I assumed might be Appian giving some direct flexibility so that I don't need to poll my instances with a timer rather then instantiate only on the basis of database trigger. But now I am clear that there is no straight approach for it. Hopefully Appian will come up with some enhancement for this in near future.

    Regards,

    Ghanashyam

  • I can't speak for Engineering (who make the Appian product) but I suspect this isn't something they'd want to do, for two reasons. Firstly: there are multiple databases that Appian supports and the number of users who'd want this pattern is likely to be very small, Secondly: in effect you're embedding business logic in the database which is an anti-pattern. It'd be very hard to understand the end-to-end process if it is coupled at the database layer. But that's my personal view, not the official Appian Engineering position. 

Reply
  • I can't speak for Engineering (who make the Appian product) but I suspect this isn't something they'd want to do, for two reasons. Firstly: there are multiple databases that Appian supports and the number of users who'd want this pattern is likely to be very small, Secondly: in effect you're embedding business logic in the database which is an anti-pattern. It'd be very hard to understand the end-to-end process if it is coupled at the database layer. But that's my personal view, not the official Appian Engineering position. 

Children
No Data