Updating a Case Object
From within a process, you can use scripting to update a local BOM object of the appropriate case class, then use a case data service task to update the case object from the local data.
You do not need to follow this procedure if you use a case object as an IN/OUT parameter on a form in a business process. In that case, changes made by the user are automatically written back to the case data store when the user closes or submits the form. See Displaying a Case Object in a User Task - Using a Form.
However, you do need to follow this procedure if you display a case object as part of a pageflow process. See Displaying a Case Object in a User Task - Using a Pageflow.
Procedure
What to do next
- (Optional) Add appropriate error handling to the service task boundary to deal with the following specific errors that may be returned by the
Update Case Object(s) From Local Data operation.
Error (Error Code) Description Possible solutions CaseOutOfSyncError (CaseOutOfSyncError) The case object referenced from the Case Reference field has been modified in some way since the field was last populated. That is, the case reference is stale. This could be either a change to the data held in the case object, and/or a change in the object's internal version number.
- Re-read the case object.
- If necessary, examine the case data to check that no significant changes have occurred.
- Retry the Update Case Object(s) From Local Data operation.
- (Optional) Modify any process that may need to do something if this case object is updated:
- Add a case data signal event to the process, so that the process will be notified when the case object is updated.
- Add suitable business logic to perform any actions that the process needs to take as a result of the update to the case object.