Problem with context when using multiple instances of OxygenXML Author
Posted: Fri Mar 18, 2022 4:16 pm
Since our writers are working on multiple DITA maps at a time and want to have these DITA maps open on seperate screens, we use a '.bat' file with the -Dcom.oxygenxml.MultipleInstances=true option. These maps are often idenctical but we use conkeyrefs to load different keys.
We have for instance a 'keys' map within the map that contains 'topicref' references to different key-files ('product_info', 'manufacturer_info', ...). I think this is important to know because the different maps that are opened, use the same conkeyref values.
We noticed that after some time, the contexts of these different instances seem to get into eachothers way. When we use the 'DITA reusable components' module, we suddenly see keys appearing from the contexts of the other open Author instances. This is not always immediately the case but after a while, it almost always happens. So when we look for 'product_name' which is an element in the 'product_info' key file (conkeyref = product_info/product_name), we suddenly see two versions appear in the 'DITA reusable comonents'. One is correct and the other one is from the context of another open Author instance. It looks as if keys are being indexed from both contexts. Maybe a common cache or memory stack is being used or something for the contexts?
When you insert the component from the other instance (from the wrong context), it will be inserted as a 'conref' with a fixed path to the key.
When you insert the correct component from the active context of your instance, it will be inserted correctly as a 'conkeyref'.
So, the situation:
- Author instance 1: Map A opened with context A
- Author instance 2: Map B opened with context B
Note again that both maps use the same 'keys' map structure and therefore 'product_info/product_name' exists in both contexts.
We have for instance a 'keys' map within the map that contains 'topicref' references to different key-files ('product_info', 'manufacturer_info', ...). I think this is important to know because the different maps that are opened, use the same conkeyref values.
We noticed that after some time, the contexts of these different instances seem to get into eachothers way. When we use the 'DITA reusable components' module, we suddenly see keys appearing from the contexts of the other open Author instances. This is not always immediately the case but after a while, it almost always happens. So when we look for 'product_name' which is an element in the 'product_info' key file (conkeyref = product_info/product_name), we suddenly see two versions appear in the 'DITA reusable comonents'. One is correct and the other one is from the context of another open Author instance. It looks as if keys are being indexed from both contexts. Maybe a common cache or memory stack is being used or something for the contexts?
When you insert the component from the other instance (from the wrong context), it will be inserted as a 'conref' with a fixed path to the key.
When you insert the correct component from the active context of your instance, it will be inserted correctly as a 'conkeyref'.
So, the situation:
- Author instance 1: Map A opened with context A
- Author instance 2: Map B opened with context B
Note again that both maps use the same 'keys' map structure and therefore 'product_info/product_name' exists in both contexts.