I have a Graphiti based diagram editor which allows for editing my domain model graphically. Now, I have a case where i have to manually modify the domain model just before save. But when i try to run a "RecordingCommand" I get the error saying "Cannot activate read/write transaction in read-only transaction context". Any idea where am I going wrong ? Is it the command ?

I am executing this command in the doSave() method of my own ResourceFactory. I need some changes to be done to the domain model before its persisted onto the file. So I set my values using the record command. Something like this :

My resourceset contains as contents (GraphitiDiagramModel+MyModel) which are linked to each other. I was wondering if modifying the resourceset (modify its contents) is affecting the emf transaction due to its graphiti connection?

Thanks for the suggestion. I guess I had another read-only transaction open already over which i was trying to run another transaction. By moving my model modification to a much earlier state i was able to resolve my problem.