As of 1.5.2, Personify Data Services can be used to export and import data to and from external data sources via Scribe Online, a third-party integration service. In order to expose Personify Data Services for data import the following guidelines should be followed.
An entity can be exposed for data import by enabling the property “Available For Import” in the property grid, as shown below:
CRUD operations are automatically determined depending up on the type of entity. Read-write entities can be used for INSERT and UPDATE operations; whereas, the rest of the entity types, including Read-Only and Entity View, can be used for QUERY operations.
A Service Operation can be exposed for data import by enabling the property “Available For Import” and specifying the appropriate “Operation Type” in the property grid, as shown below:
Merely specifying the Operation Type will not work, as the Service Operations are coded by individual developers. Therefore, the Operation Type should be relevant to what the Service Operation actually does. For example, the Service Operation “CreateIndividual” creates a customer record, and therefore, its operation type should be “create”.
Additionally, Service Operations should be coded in such a way that it should set the “operationResult” property of the output parameter to “True” on successful execution. Please note that the “operationResult” property will be automatically added to the output parameter by the Personify WSD and developers are not required to define this property in the designer.
Below is a code snippet taken from the implementation of the Service Operation “CreateCompany” that illustrates how to set the property “operationResult”:
public BusinessEntity DoProcess(Personify.Persistence.IBocStateProvider StateMgr, BusinessEntity o)
{
SaveCustomerInput oCusParams = (SaveCustomerInput)o;
TIMSS.API.CustomerInfo.ICustomers oCustomers =
CustomerHelpers.BuildCustomerObject(oCusParams, "C");
oCustomers.SetAddModOper(oCusParams);
if (ValidationHelpers.SaveBusinessObjectCollection(oCustomers))
{
SaveCustomerOutput opSaveCustomer = new SaveCustomerOutput();
opSaveCustomer.MasterCustomerId = oCustomers[0].MasterCustomerId;
opSaveCustomer.SubCustomerId = oCustomers[0].SubCustomerId;
opSaveCustomer.operationResult = true;
return opSaveCustomer;
}
else
{
throw new DataServiceException(400,
ValidationHelpers.GetValidationMessage(oCustomers.ValidationIssues));
}
}
See also:
· Web Services Designer Behavior
· Starting the Web Services Designer
· Designing Service Elements
o Creating New Read/Write Entities
§ File Uploading via Read/Write Entities
o Creating New Read-Only Entities
o Creating New Service Parameters
o Creating New Service Operations
· Web Services Designer Filtering and Searching Elements
· Web Services Designer Error Handling
· Validating the Service Definitions
· Modifying the Layer Name and Namespace
· Utilizing the Visual Behaviors of the Canvas
· Working with the Element Attributes (Properties Pane)
· Configuring Personify API Validation Issues
· Refreshing the Service Definitions
· Enabling and Disabling Entities