Write Entity

Operation Name

Write Entity

Function Overview

Writes input data to entity.

Data Model

XML type and table model type.

Properties

For details on use of variables, refer to "Variables".
Basic settings
Item name Required/Optional Use of variables Description Remarks
Name Required Not available Enter the name on the script canvas.  
Input data Required Not available Select a component on the script canvas.  
Required settings
Item name Required/Optional Use of variables Description Remarks
Destination Required Not available Select a global resource.
  • [Add]:
    Adds a new global resource.
  • [Edit list]:
    Global resource settings can be edited in “Edit resource list” screen.
Authentication Required Not available Select a global resource.
  • [Add]:
    Adds a new global resource.
  • [Edit list]:
    Global resource settings can be edited in “Edit resource list” screen.
Resource path Required Available Select or enter the resource path.
Get field display name Optional Not available Select whether or not to get field display name when updating Field definition.
  • [Checked]:
    Gets the field display names.
  • [Not checked]: (default)
    Does not get the field display names.
  • When getting field display names, [Update field definition] may take longer time.
Field definition Required - Displays the field definition of the entity specified in [Resource path].  
Field definition/Target Required Not available Select whether or not to include each field of the entity specified in [Resource path] in target.
  • [Checked]:
    Includes in writing target.
  • [Not Checked]: (default)
    Does not include in writing target.
 
Field definition/Primary key Required Not available Displays whether [Field name] is the primary key.
  • [Checked]:
    Displays that it is the primary key.
  • [Not checked]: (default)
    Displays that it is not the primary key.
 
Field definition/Field name Required Not available Displays the field name of the entity specified in[Resource path].  
Field definition/Field display name Optional Not available Displays the field display name of the entity specified in [Resource path].  
Field definition/Type Required Not available Displays the type of [Field name].  
Property actions
Item name Description Remarks
Update entity set name list Get the entity set names from the specified [Destination] and set them in [Resource path].
  • Enabled, if [Destination] and [Authentication] are selected.
Update field definition Get the field definition from the specified [Destination] and [Resource path], and set it in [Field definition].
  • Enabled, if [Destination] and [Authentication] are selected and [Resource path] is specified.
Key settings
Item name Required/Optional Use of variables Description Remarks
Key field of resource path Optional Not available Select the key field for the entity selected in [Resource path].
  • When [Get key information] is pressed, primary key field and the field defined with alternate key will be displayed.
    The default value is the primary key field.
  • When it is omitted, the primary key field will be used.
Associated key settings Optional - Displays the associated key settings of the entity specified in [Resource path].
  • When it is omitted, primary key field will be used as the key for all entity fields.
Associated key settings/Entity field Optional Not available Displays the entity field of the entity specified in [Resource path].  
Associated key settings/Associated entities Optional Not available Displays the associated entity set name of [Entity field].  
Associated key settings/Associated key fields Optional Not available Displays the key field for the entity associated to [Entity field].
  • The default value is the primary key field.
  • Update the value by the following steps.
    1. Select the update target in [Entity field].
    2. Select the key field in [Associated key fields].
    3. Press [Update associated key settings].
Entity field Optional Not available Select [Associated key fields] of [Associated key settings] and the [Entity field] of the same row to be changed.
  • The list of entities that you can specify is displayed when [Get key information] is pressed.
Associated key fields Optional Not available Select the key field for the entity selected in [Entity field].
  • When [Entity field] is selected, the primary key field and the field defined with alternate key are displayed.
    The default value is the primary key field.
Property actions
Item name Description Remarks
Get key information Get the key information from the specified [Destination] and [Resource path], and set it to the following properties.
  • [Key field of resource path]
  • [Associated key settings]
  • [Entity field]
  • [Associated key fields]
  • Enabled, if [Destination] and [Authentication] are selected and [Resource path] is specified.
Update associated key settings Update [Associated key fields] of [Associated key settings] with the value selected in [Associated key fields].
Select the target entity field in [Entity field].
  • Enables when [Entity field] and [Associated key fields] are selected.
Option settings
Item name Required/Optional Use of variables Description Remarks
Skip entities which the system failed to process Optional Not available Select whether or not to skip entities which the system failed to process and continue processing.
  • [Checked]:
    Skip the items failed to be written and continue the write processing.
  • [Not Checked]: (default)
    When there is an item failed to be written, end the write processing as an error.
 
Processing method when the key is specified Required Not available Select the processing method when the key is specified
  • [Create or update]: (default)
    Creates when entity does not exist, and updates when it exists.
  • [Create only]:
    Creates when entity does not exist, and an error occurs when it exists.
  • [Update only]:
    Updates when entity does not exist, and an error occurs when it does not exist.
 
Data processing method
Item name Required/Optional Use of variables Description Remarks
Data processing method Required Not available Select the data processing method.
  • [Apply script settings]:(default)
    Applies the mass data processing settings of the script property to the adapter.
  • [Do not perform mass data processing]:
    Does not perform mass data processing.
  • [Perform mass data processing]:
    Performs mass data processing.
 
Comment
Item name Required/Optional Use of variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input schema

For more details on schema used by this adapter, refer to “Schema”.

Output schema

<?xml version="1.0" encoding="UTF-8" ?>
<table>
  <row>
    <column>uri</column>
    <column>action</column>
    <column>target</column>
    <column>status_code</column>
    <column>message</column>
    <column>error_type</column>
  </row>
  <row>
    :
  </row>
</table>
Element name Column name/Label Description Remarks
row - Repeats by the number of the entities to be written.  
column uri The URI which distinguishes operation targets uniquely.  
action Outputs the operation method.
  • create:
    Creating operation.
  • update:
    Updating operation.
  • delete:
    Deleting operation.
  • When the operation is to relate the entities, it will be update even if that is new relation.
target Outputs the type of operation target.
  • entity:
    Operation to entity.
  • property:
    Operation to entity properties.
  • relation:
    Operation to relation of entities.
  • When all of the following conditions are satisfied, the relation row will not be output.
    • An operation to associate the specified entities to the entity field of N:1 entity relationship
    • The operation for the entity specified in [Resource path] is create or update operation
status_code Outputs the HTTP status code of operation.  
message Outputs the operation message.  
error_type When an error occurs, the type of the occurred error will be stored.
  • Default value is null.
  • The error type will be in the below format.
    Example: “java.io.FileNotFoundException”
For more details, refer to “Schema of table model type”.

Loading schema in Mapper

Schema is loaded automatically.
For more details, refer to “Edit Schema”.

Mass Data Processing

Mass Data Processing is supported.

Transaction

Transaction is not supported.

PSP usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
count The number of read data will be stored.
  • Default value is null.
  • Entities of navigation property are also counted.
insert_count Stores the number of entities which are newly created.
  • Default value is null.
  • Counts when entity of navigation property is newly created.
update_count Stores the number of updated entities.
  • Default value is null.
  • Counts when entity of navigation property is updated.
message_category When an error occurs, the category of the message code corresponding to the occurred error will be stored.
  • Default value is null.
message_code When an error occurs, the message code corresponding to the occurred error will be stored.
  • Default value is null.
message_level When an error occurs, the severity of the message code corresponding to the occurred error will be stored.
  • Default value is null.
error_type When an error occurs, the type of the occurred error will be stored.
  • Default value is null.
  • The error type will be in the below format.
    Example: “java.io.FileNotFoundException”
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_message When an error occurs, the message of the occurred error will be stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_trace When an error occurs, the corresponding error trace information will be stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions or the client applications to be executed.

About update owner

To update the owner (ownerid), input "systemuser" or "team" in type attribute.
For details, refer to "Entity type (ownerid)".

Specification Limits

For details about the specific restrictions of Dynamics 365 for Customer Engagement Adapter, refer to “Dynamics 365 for Customer Engagement Adapter Restrictions”.

Main Exceptions

Exception name Cause Solution
ResourceNotFoundException
Resource definition is not found. Name: []
[Destination] or [Authentication] is not specified. Specify [Destination] or [Authentication].
ResourceNotFoundException
Resource definition is not found. Name: [<Global resource name>]
The resource definition selected in [Destination] or [Authentication] is not found. Check the global resource specified in [Destination] or [Authentication].
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify [<Property name>].
InvalidPropertyConfigurationException
There is no key field in the entity set that was associated with entity field.[Entity field=<Entity field>][Associated key fields=<Associated key fields>]
There is no key field specified in <Entity field> in [Associated key settings]. In [Associated key settings], set the key field exists in [Associated key fields] of <Entity field>.
InvalidResourcePathException
Invalid resource path: <Resource path>
The format of the resource path is invalid. Check [Resource path].
NumberFormatException Failed to convert the type. Check whether the value that can be converted to numerical type is set in numerical type field.
DateTimeParseException Failed to convert the type. Check whether the value that can be converted to date type is set in date and time field.
IllegalArgumentException
Invalid UUID string: <Key value>
Failed to convert the type. Check whether the number that can be converted to search type (GUID) is set in the field of search type (GUID).
InvalidSchemaException
No such property: <Field name>
The specified filed does not exist. Check whether that the field exists in entity.
For details about the main exceptions of Dynamics 365 for Customer Engagement Adapter, refer to “Dynamics 365 for Customer Engagement Adapter Restrictions”.

Notes

For details about the specific precautions of Dynamics 365 for Customer Engagement Adapter, refer to “Dynamics 365 for Customer Engagement Adapter Restrictions”.