[OPEN-ILS-DEV] fm_IDL.xml and open-ils.cstore

Mark Gavillet mark.gavillet at ptfs-europe.com
Tue Oct 4 08:01:32 EDT 2011


Hi

I've created a new table in the Evergreen database which I'd like to set up CRUD services for. The table structure is:

---
                                                Table "stockrotation.rota_statuses"
 Column |          Type          |                               Modifiers                                | Storage  | Description 
--------+------------------------+------------------------------------------------------------------------+----------+-------------
 id     | integer                | not null default nextval('stockrotation.rota_status_id_seq'::regclass) | plain    | 
 name   | character varying(255) | not null                                                               | extended | 
Indexes:
    "rota_statuses_pkey" PRIMARY KEY, btree (id)
Check constraints:
    "rotaname" CHECK (name::text <> ''::text)
Referenced by:
    TABLE "stockrotation.rotas" CONSTRAINT "status_exists" FOREIGN KEY (status_id) REFERENCES stockrotation.rota_statuses(id)
Has OIDs: no
---

I've added the following lines to /openils/conf/fm_IDL.xml (retrieve permission set to a known value for testing):

---
	<class id="srrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="stockrotation::rota_statuses" oils_persist:tablename="stockrotation.rota_statuses" reporter:label="Stock Rotation Statuses">
		<fields oils_persist:primary="id" oils_persist:sequence="stockrotation.rota_status_id_seq">
			<field reporter:label="Stock Rotation Status ID" name="id" reporter:datatype="id"/>
			<field reporter:label="Stock Rotation Status Name" name="name" reporter:datatype="text"/>
		</fields>
        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
        	<actions>
                <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
                    <context field="id"/>
                    <context field="name"/>
				</retrieve>
			</actions>
        </permacrud>
	</class>
---

After restarting the opensrf service I get the following error in srfsh:

---
srfsh# request open-ils.cstore open-ils.cstore.direct.stockrotation.rota_statuses 1

Received Exception:
Name: osrfMethodException
Status: Method [open-ils.cstore.direct.stockrotation.rota_statuses] not found for service open-ils.cstore
Status: 404
------------------------------------
Request Completed Successfully
Request Time in seconds: 0.001693
------------------------------------
---

I have a feeling I'm missing something obvious but can't work out what it is. Any help would be greatly appreciated!

Regards,
Mark


More information about the Open-ils-dev mailing list