Open topic with navigation

TIBCO Business Studio™ - BPM Edition 5.4.0

# Finding a Case Object by its Case Identifier

From within a script, use the findByCaseIdentifier method to return the case reference to the case object that matches the specified case identifier value(s).

Method syntax | Description
--- | ---
findByCaseIdentifier(caseId, caseType) | Returns the case reference to the case object that matches the specified caseId case identifier value of type caseType.

where:

- caseId is the case identifier of the case object.
- caseType is the parent ID followed by the case class name. For example, `'com.example.carapplication.Customer'`.

The method returns null if there is no case object that matches the specified caseId value(s).

## Example

This example finds a customer's ID using the value in a `custID` field, which is assumed to have been populated earlier in the process (for example, by a customer service representative filling in a form when the customer telephones).

    	// Get the case reference to the Customer class that matches the identifier provided in the customerID field.
    	data.customerRef = bpm.caseData.findByCaseIdentifier(data.customerID,'com.example.carapplication.Customer');

    	// You can now read the reference to get the corresponding Customer case data object.
    	data.customer = bpm.caseData.read(data.customerRef);

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Business Studio™ - BPM Edition

Copyright © 2015-2023. Cloud Software Group, Inc. All Rights Reserved.