samcaulfield / pml-studio

A web-based development environment for the Process Modelling Language
MIT License
0 stars 0 forks source link

Implement swim lanes #29

Open samcaulfield opened 8 years ago

samcaulfield commented 8 years ago

This feature is on the product backlog. It is worth 30 points.

Description:

Actions should be allocated to "swim lanes" where each lane is a different agent.

samcaulfield commented 8 years ago

Have you managed to make much progress on this Eamon?

EamonMc commented 8 years ago

Hi Sam. No I haven't. I simply must go all-out today and tomorrow for my FYP demo on Tuesday. After that I will work every waking hour on pushing out features for group.

sharonluk commented 8 years ago

we're making progress today, outputting diagrams using PlantUML. Just need to convert traverse.c to this format output.

EamonMc commented 8 years ago

Putting in ridiculous hours at this - back on it after some sleep. His new model is particularly tricky. Will get there though.

samcaulfield commented 8 years ago

OK. Just to note that it's risky to make any major changes to the code this weekend. As has happened to other teams, major changes introduced at the last minute can break the system and actually cost marks. Do you think you could have this working today?

EamonMc commented 8 years ago

Yes - going at this for next 12hrs. I'll be on here and fb chat if you have time to look at it / test it when committed.

EamonMc commented 8 years ago

Ok the bulk of the translating and code is now committed. Thanks for the help @sharonluk

This is just the initial commit - the logic of the graph will be done after.

It basically builds a string in plantUML format.

A new version of traverse named 'simpletraverse' is in the thirdparty/simpleTraverse folder along with the simpleTraverse.c that it was compiled from. This outputs a nicer language to parse than DOT output. The parsing is done in script.js (rather than traverse.c) In this function ( swimlanesBuilder()) there is now some dictionaries and arrays of the node elements dictNodeAgents -> nodeName : [ agent1, agent2,...] dictNodeType -> nodeName : nodeType
and all graph connections as in DOT as a 2D array of connections: twoDArrayConnections[][] = [ [node1, node2] , [node3, node8]...]

We can possibly use this instead of visjs for the main diagram also. I'll work on the graph logic now and how to represent branches / iterations/ selections etc in the plantUML string builder

samcaulfield commented 8 years ago

This looks promising.

EamonMc commented 8 years ago

We are still working on getting the branch/select logic working. We have a recursive loop that traverses the graph building the new one but haven't quite got the select/branch logic correct. Worried because has to be "insanely great" by 12. Keeping on this. Made small update - it is best tested with his newest commit "TeamAB_Sprint.pml" and I think he created it for this purpose. netbeans_req_release.pml may have a join early in it that is treated as a select so will have to handle for that also.

EamonMc commented 8 years ago

This was a valiant effort by me and Sharon. I would like to think we'll get the points for this as it was quite ambitious. Some of the visual strangeness in swimlane flow control arrows stem from the plantUML API not handling swimlanes and splits well and can not be improved on. (removing the swimlanes fixes it)

There is also now a button for 'visualise plantUML' as another alternative to the visjs diagram which has its own failings.

It stops on netbeans because I believe traverse sees the first SELECTION as a JOIN for some reason and this messes up the logic. I'll try patch this but is a lot to check every JOIN to see if it is really a SELCTION. This can be seen in the graphviz diagram also as the split comes from a join. I'll see if I can make some minor improvements before the deadline.

EamonMc commented 8 years ago

OMFG I thought it was sunday today :+1: Troy just explained to me that it's in-fact Saturday. This is insane. Have another 24hrs to sort this.

samcaulfield commented 8 years ago

This is shaping up to be a really great feature. When you're polishing it off at the end you can try adding a scrollbar to the graphical editor to handle overflow.