saveRecord
Saves specified records into TRIRIGA®.
- When a record is being submit, basic validation rules are applied to make sure that the saved information is consistent with what a user experiences.
- Any record that is saved must have a valid action. If the actionName is not callable from the record’s current state, an InvalidActionNameException error occurs.
- If an action has multiple subactions, only the first subaction is run, where the first subaction is determined by listing the subaction labels alphabetically. Use actions that have at most one subaction instead of multiple subactions.
- If the structure of the saved object is not built to correlate to the intended business object, an error occurs.
- Any error for an invalid record is compiled and captured into the value node of the ResponseHelper object that corresponds to the record. The records that have a status of failed do not modify existing TRIRIGA data.
- See the Data transfer objects glossary for the usage and definitions of the IntegrationRecord object and its subobjects and how to use them properly.
Parameters
An array of IntegrationRecord objects.
Returns
A ResponseHelperHeader object is returned. The ResponseHelperHeader object contains a submission header information and an array of ResponseHelper objects that contains the results and record IDs of the submitted records. If any error occurs, the data is included in the appropriate ResponseHelper object.
Errors
- ModuleDoesNotExistException
- The module does not exist.
- ObjectTypeDoesNotExistException
- The object type does not exist.
- RecordDoesNotExistException
- The record does not exist.
- RequiredFieldException
- The required field is not set.
- ReadOnlyException
- An attempt was made to write a read-only field.
- IntegrationRecordException
- The IntegrationRecord structure does not correlate to the correct business object.
- InvalidActionNameException
- The action name does not exist or cannot be called by this user.
- InvalidArgumentException
- At least one of the arguments that were passed are invalid.
- AccessException
- The user does not have access to modify the record.
- java.lang.Exception
- A system error occurred when the request was being processed.
Sample request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.tririga.com" xmlns:dto="http://dto.ws.tririga.com">
<soapenv:Header />
<soapenv:Body>
<ws:saveRecord>
<ws:IntegrationRecords>
<dto:IntegrationRecord>
<dto:actionName>Create Draft</dto:actionName>
<!--Optional -->
<dto:guiId>10002361</dto:guiId>
<dto:id>-1</dto:id>
<dto:moduleId>7</dto:moduleId>
<dto:objectTypeId>106402</dto:objectTypeId>
<dto:objectTypeName>triPeople</dto:objectTypeName>
<dto:sections>
<dto:IntegrationSection>
<dto:fields>
<dto:IntegrationField>
<dto:name>triLastNameTX</dto:name>
<dto:value>Tester</dto:value>
</dto:IntegrationField>
<dto:IntegrationField>
<dto:name>triFirstNameTX</dto:name>
<dto:value>John</dto:value>
</dto:IntegrationField>
<dto:IntegrationField>
<dto:name>triUserLanguageLI</dto:name>
<dto:value>Japanese</dto:value>
</dto:IntegrationField>
</dto:fields>
<dto:name>Detail</dto:name>
</dto:IntegrationSection>
<!--reports to -->
<dto:IntegrationSection>
<!--Optional: -->
<dto:name>triPeopleReportsTo</dto:name>
<!--Optional: -->
<dto:rows>
<!--Zero or more repetitions: -->
<dto:IntegrationRows>
<dto:action>Append</dto:action>
<!--Optional: -->
<dto:recordId>12776874</dto:recordId>
<!--Optional: -->
<dto:rowIndex>1</dto:rowIndex>
</dto:IntegrationRows>
</dto:rows>
<!--Optional: -->
<dto:type>FIND</dto:type>
</dto:IntegrationSection>
<!--groups details -->
<dto:IntegrationSection>
<!--Optional: -->
<dto:name>triGroupsDetails</dto:name>
<!--Optional: -->
<dto:rows>
<!--Zero or more repetitions: -->
<dto:IntegrationRows>
<dto:action>Append</dto:action>
<dto:fields>
<dto:IntegrationField>
<dto:name>User Group</dto:name>
<dto:value>Admin Group</dto:value>
</dto:IntegrationField>
</dto:fields>
<dto:rowIndex>0</dto:rowIndex>
</dto:IntegrationRows>
</dto:rows>
<!--Optional: -->
<dto:type>Add</dto:type>
</dto:IntegrationSection>
<!--license details -->
<dto:IntegrationSection>
<!--Optional: -->
<dto:name>triLicenceDetails</dto:name>
<!--Optional: -->
<dto:rows>
<!--Zero or more repetitions: -->
<dto:IntegrationRows>
<dto:action>Append</dto:action>
<dto:fields>
<dto:IntegrationField>
<dto:name>User Licence</dto:name>
<dto:value>IBM TRIRIGA Application Builder </dto:value>
</dto:IntegrationField>
</dto:fields>
<dto:rowIndex>0</dto:rowIndex>
</dto:IntegrationRows>
<dto:IntegrationRows>
<dto:action>Append</dto:action>
<dto:fields>
<dto:IntegrationField>
<dto:name>User Licence</dto:name>
<dto:value>IBM TRIRIGA Application Platform</dto:value>
</dto:IntegrationField>
</dto:fields>
<dto:rowIndex>1</dto:rowIndex>
</dto:IntegrationRows>
</dto:rows>
<!--Optional: -->
<dto:type>Add</dto:type>
</dto:IntegrationSection>
</dto:sections>
</dto:IntegrationRecord>
</ws:IntegrationRecords>
</ws:saveRecord>
</soapenv:Body>
</soapenv:Envelope>
Sample response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<saveRecordResponse xmlns="http://ws.tririga.com">
<ResponseHelperHeader>
<anyFailed xmlns="http://dto.ws.tririga.com">false</anyFailed>
<failed xmlns="http://dto.ws.tririga.com">0</failed>
<responseHelpers xmlns="http://dto.ws.tririga.com">
<ResponseHelper>
<key>1379055081938_0.009121259756713518</key>
<name>Tester, John</name>
<recordId>13796793</recordId>
<status>Successful</status>
<value xsi:nil="true"/>
</ResponseHelper>
</responseHelpers>
<successful xmlns="http://dto.ws.tririga.com">1</successful>
<total xmlns="http://dto.ws.tririga.com">1</total>
</ResponseHelperHeader>
</saveRecordResponse>
</soap:Body>
</soap:Envelope>