Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

It's a flowchart - but it's also more than that.

David Garratt
Ranch Hand
Posts: 213
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a colleague who is for ever adding bits of logic to an application to fit specific customer requirement. The core application remains unchanged, but the bit which effectively talks to PLC's, Printers etc with handshaking, time-outs, true / false conditions etc is always slightly different from site to site.

In all cases the logic is still quite simple - wait for a ready signal, send data, wait for acknowledge, repeat and so on.

I have created a number of classes which do all the key input/output and decision type operations and I can put them in a LinkedList with pointers indicating which step (index) is the next step to execute after the current one etc.

What I want to do now as the icing on the cake is allow this logic steps to be dropped visually on a canvas and manipulated like a flowchart. Obviously the end result would not just be a pretty picture but something that you could actually execute and debug.

I see some graphic libraries around, but most of them seem to be designed for the printing / viewing side of things.

Assuming that I'm going to have to code something myself I was wondering if anyone could point me in the right direction. I realise this is a big ask, but I don't need detail, just a pointer. I guess I will need to make sure all my current processing classes become a subclass of some existing graphic or swing class. I would be nice if the shape could be altered, but in the first stage I would be happy with box's of different colour representing (input, output, decision, goto etc).

I would need to be able to drag them around the desktop/canvas and also link them together in order to indicate the direction of flow from one step to the next.

Has anyone done this before - am I re-inventing the wheel ? - albeit a square one :-)

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic