Anybody Build Workflows in Their SQL Server?

  • Hello,

    I was just curious if any of you have built workflows using database logic in SQL. My project has a transactional system that processes requests. Each request goes through a workflow. So, request #1 could be using workflow #2 and have like 6 steps it needs to go through before its "complete".

    To me the concept is simple enough but I am learning a pre built system from a guy that had a background in sales. The process is extremely complicated and involves many triggers, many many tables and like 20 stored procedures.

    To me this process could be much simpler but I was curious to get some input from other people that have something similar in their systems and how the backend database is designed/structured.

    I'm looking to redo this process but just wanted to get some ideas/feedback.

  • It shouldn't be hard to do. I've built such systems (one pretty much managed a whole small business on its own, and did a better job of it than the actual managers).

    It can get really, really insanely complex, or it can get really easy, depending on how generic you try to build it.

    The thing to keep in mind is that all a workflow is, is a list of who does what to what, including conditional routing. So it's essentially just a list of job titles, what particles can go to them, and what they can do to those particles.

    ("Particles" in a business/organization sense, not a physics sense. A "particle" in a business sense could be a customer, or an order form, or a box of goods/materials. It's something with a physical presence, or something that simulates a physical presence. An e-mail, for example, is a particle, because it simulates a physical presence.)

    You don't route statuses. That's the big mistake most people make in trying to design a workflow, whether in an automated system or in a physical factory. You route particles, and terminals (job-holders or automated machinery) change them, and then route the changed particle.

    Model that in your workflow database, and you'll have a good chance of success. Don't, and you'll probably end up with something that just gets more and more complex as more and more exceptions have to be somehow built into it.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply