- Create a new Context in the KR-SAP namespace
- create new permission
- using template "KRMS Agenda Permission"
- set name to "Maintain KRMS Agenda"
- set namespace to KR-SAP
- add permission to the "Kuali Rules Management System Administrator" role
- From Main tab click "Create New Agenda" link
- Set namespace to "Sample App"
- Set name to anything
- Use lookup to set context to the one you created above
- You'll get the intermediate result of an "Invalid Context" message
- Click "Save" button
- You'll get the intermediate result of an additional "Namespace - Invalid namespace" error.
- Open another tab, and go to the cache manager and flush all caches
- Go back to the first tab and save again
- this time it's happy
So I'm guessing that the permission cache isn't being cleared at the right time (for the invalid namespace issue), and the context cache isn't either on creation of a new one. Or, looking at org.kuali.rice.krms.impl.rule.AgendaEditorBusRule#validContextAgendaNamespace, maybe it's just the Context cache that needs clearing?