CreateCase |
This Web service operation is used to trigger a case model, to create a case instance. The CreateCase is a part of the Method Set Case Instance Execution 4.2 Web service interface with the namespace http://schemas.cordys.com/casemanagement/execution/1.0.
SOAP Request
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:Body> <CreateCase xmlns="http://schemas.cordys.com/casemanagement/execution/1.0"> <caseinstanceid>Peter_22_23052011</caseinstanceid> <model space="organization">Case/PatientHealthCheck</model> <source type=""/> <casedata> <data name="case:casevariables" xmlns:case="http://schemas.cordys.com/casemanagement/1.0"> <case:casevariables> <case:TargetUserName type="User">cn=John,cn=organizational users,o=devOrg,cn=cordys,cn=instance6,o=myorg.com</case:TargetUserName> <case:TargetRoleName type="Role">cn=Senior Doctor,cn=organizational roles,o=devOrg,cn=cordys,cn=instance6,o=myorg.com</case:TargetRoleName> <case:TargetTeam type="Team">Roles/Doctors Team</case:TargetTeam> <case:TargetWorklist type="Worklist">Roles/Doctors Queue</case:TargetWorklist> <case:DueTimeSLA type="Duration">PT10M</case:DueTimeSLA> </case:casevariables> </data> <data name="PatientInfo" xmlns="http://schemas.myorg.com/patients"> <pat:PatientInfo xmlns:pat="http://schemas.myorg.com/patients"> <pat:Name>Peter</pat:Name> <pat:Age>22</pat:Age> <pat:Address>Florida</pat:Address> <pat:Gender>Male</pat:Gender> <pat:ProblemDefinition>Problem details</pat:ProblemDefinition> </pat:PatientInfo> </data> </casedata> <priority>3</priority> </CreateCase> </SOAP:Body> </SOAP:Envelope>
Request Parameters
Parameter |
Description |
Mandatory |
Accepted Input Values |
---|---|---|---|
caseinstanceid |
By default, the case engine generates a unique identifier (GUID) for every case instance that are created through the SOAP API. This parameter can be used to override the default behavior and define custom unique identifier for the case instance. |
No |
|
model |
Name of the case model |
Yes |
Qualified name of the case model |
space |
Location where the deployed case models are selected for execution Note: This parameter is currently deprecated. If it is not provided, the Organization space is considered by default. If the expected model is not found in the organization space, then the Shared space is considered automatically. |
No |
You can provide any one of the following values:
|
source |
Source from where the case is created. |
No |
String |
type |
Application type or custom instantiation source for the case instance. |
No |
String |
casedata |
Data set that requires to be sent as input to the case instance. The case data set consists of:
|
No |
|
priority | Priority set to specific case instance that are created. If priority value is not set then it considers the priority defined in the case model. | No | Accepts values between 1 to 5, where 5 is the highest priority |
Case variables types and values mapping
Type |
Value |
Accepted Input values |
---|---|---|
User |
User |
User DN |
Role |
Role |
Role DN |
Team |
Team |
Complete qualified name of the team |
Worklist |
Worklist |
Complete qualified name of the work list |
Dispatch Algorithm |
Algorithm |
Complete qualified name of the dispatch algorithm |
Duration |
Duration |
XSD duration format (PnYnMnDTnHnMnS) |
SOAP Response
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:Body> <CreateCaseResponse xmlns="http://schemas.cordys.com/casemanagement/execution/1.0"> <caseinstanceid>Peter_22_23052011</caseinstanceid> <activestates> <state id="5E019655-709E-4CF0-BD3B-FA3E066EF8F4" name="Registration">2S0C054B-E0FB-4DB4-B031-601EA31853AF</state> </activestates> </CreateCaseResponse> </SOAP:Body> </SOAP:Envelope>
Response Parameters
Parameter |
Description |
---|---|
caseinstanceid |
ID of the case instance |
activestates |
Name and GUID of the state that is active |