Creating a new context resource

This topic describes how to create a new context resource, CqContextResource.


  1. Create a new location for the resource by adding a child segment to the selected folder location.
  2. Obtain a proxy for that location from the provider in whose change context you want to perform the modifications.
  3. Populate the proxy with the property values appropriate for the new resource. The CqRecord.ACTION property must be set when creating a record or attachment.
  4. Invoke the appropriate doCreateXxx() method on the proxy, which returns a proxy for the newly created resource that contains any property values requested in the create-resource operation.
  5. Deliver the new resource to a project. This final step is needed to make the new resource available to other users of the system. It is also the main trigger for business logic that runs on the server.

What to do next

You can create a new context resource in one round trip to the server by using the appropriate deliveryOrder value. The doCreateXxx methods contact the repository (server or file area) referenced in the proxy's location to construct a new resource and then write the property values in the proxy to the new resource.