You Need A Workflow ? Just Use Database Views !

I’m still working for the same massive telecommunication company and trying to understand the tricky architecture of the expensive software they bought and are trying to use, see my previous post Today I’ve discovered how works a new piece of the architecture : the workflow.

Their business rules are more or less these ones: managers arrive in the morning and dispatch the work through their team. A worker does the actual work and a supervisor checks that it’s done properly and accepts it or not. I’m simplyfing here but I have to tell you that the entire national team is about 4000 person big and deals with thousands and thousands of request a day.

During the meetings, the guys where talking about workflow this and workflow that. So I asked them to show me the workflow engine… which engine?, there is no engine. The workflow is just made of dozens of database views : the supervisors use one view (this view is a view of a view of 2 views, because the business rules are too complicated to describe in one single SQL statement), the worker use several views depending on the work he does, and the same for managers.

Oh, I forgot to tell you that one of their problems is performance. Some table have 20 millions entries, and of course, running all these views several times a minutes brings Oracle down.

I might go and change the workflow definition in wikipedia and tell the world that a workflow can be done using views ;o)

Categories: Java

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s