pp108 : CreateCase

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:

  • ISV - If the case model is deployed in the Shared space.
  • Organization - If the case model is deployed in the Organizational space.

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:

  • data element to pass case variables values
    The case variables are considered as parameters to a case model. Using the case variables, you can dynamically pass values for User, Role, Team, Worklist, Dispatch algorithm, and duration properties. To pass the case variables, the name attribute value must be defined as casevariables
    For every case variable defined in a case model, the corresponding element with the variable name must be added as a child element to the casevariables element. The case variables element serves as the root of all the case variables. The type attribute refers to the case variable type. Refer to the below table for a list of the case variable types, the values, and the accepted input values.
  • data element to pass case data model
    The case data model refers to the information, which is configured for a case model and is available across all the activities of the case model. To pass the values to the case data model, the name attribute value must be the name of the schema element configured in the case model.
    In the above sample request, the name of the case related data is defined as PatientInfo. The child elements of the data element must refer to the instance XML of the XML Schema element with values.

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