0 votes
18 views
ago by (30.6k points)
External systems (CRM, a customer portal) need to create cases in our BAW case solution, attach documents and read the case status. Which API is that, how is it authenticated, and what do the calls look like?

1 Answer

0 votes
ago by (30.6k points)

Case operations go through the Case REST API (Case Manager component of BAW, /CaseManager/CASEREST/v1) for case-specific things (create a case, properties, comments, activities) and through the CMIS / Content API for documents in the case folder. Authentication: basic auth or the BAW session on traditional; Zen API key / bearer token on CP4BA; plus the CSRF token header for non-GET calls.

# base:  https://host/CaseManager/CASEREST/v1     (CP4BA: the Case REST endpoint listed in the CR status endpoints)
# 1. discover: solutions and case types
GET  /solutions?TargetObjectStore=TOS
GET  /casetypes?SolutionName=Claims&TargetObjectStore=TOS
# 2. create a case with properties
POST /casetypes/CLM_Claim/cases?SolutionName=Claims&TargetObjectStore=TOS
{ "ReturnUpdates": true, "Properties": [ { "SymbolicName": "CLM_ClaimantName", "Value": "Ana Perez" }, { "SymbolicName": "CLM_Amount", "Value": 1250 } ] }
# -> { "Properties": [...], "CaseIdentifier": "CLM_000000123", "CaseFolderId": "{B1C2…}" }
# 3. read / update
GET  /cases/{CaseIdentifier}?SolutionName=Claims&TargetObjectStore=TOS
PUT  /cases/{CaseIdentifier}?SolutionName=Claims&TargetObjectStore=TOS     { "Properties": [ { "SymbolicName": "CLM_Status", "Value": "REVIEW" } ] }
POST /cases/{CaseIdentifier}/comments?…                                      { "Comment": "Documents received" }
# 4. activities (start / complete a manual activity)
GET  /cases/{CaseIdentifier}/activities?SolutionName=Claims&TargetObjectStore=TOS
PUT  /cases/{CaseIdentifier}/activities/{ActivityIdentifier}?…              { "Action": "Complete" }
# 5. documents into the case folder (CMIS browser binding of the CPE)
POST https://host/fncmis/resources/TOS/RootFolder/…                          (cmisaction=createDocument, objectId=<CaseFolderId>, content=multipart)

Practical points: symbolic names come from the solution's case type definition (Case Builder shows them); the TargetObjectStore is the object store symbolic name; CSRF protection differs per level (the Navigator security token or the BPMCSRFToken) - read the "Case REST API" chapter of your level; case activities implemented by BAW processes appear both in the case and in the task list. For process-side access to the case (from a BPD) use tw.system.currentProcessInstance.caseFolderId and the Case toolkit services instead of REST.

References

Related questions

723 questions

807 answers

98 comments

4.8k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...