The cloud Remote Sampler system imports external job data using the Cloud Adaptor Service that runs locally on customer hardware. This Windows service monitors a set folder in the file-system and processes any files that are written into the folder. If the file contains job data that matches the Remote Sampler Job Data Schema then it will be processed and uploaded to the cloud Remote Sampler system.
In order to import data into Remote Sampler, it must be formatted in XML. A simple example is shown below.
Code Block | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
<?xml version="1.0"?> <JobGroupInput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <JobGroupName>Collection Run 1</JobGroupName> <Jobs> <JobInput> <JobName>Warehouse Jobs 5</JobName> <JobId>123345</JobId> <JobParts> <JobPartInput> <JobPartName>Sample 1</JobPartName> <JobPartId>198576</JobPartId> <ScheduledDate>2017-08-14T00:00:00+01:00</ScheduledDate> <ScheduledLocation> <DisplayText>An Example Location</DisplayText> <LocationType>Warehouse Location</LocationType> <Latitude>52.123</Latitude> <Longitude>1.789</Longitude> <GridEast>543678</GridEast> <GridNorth>123654</GridNorth> <BuildingName>123456</BuildingName> <BuildingNumber>12</BuildingNumber> <Street>Main Street</Street> <City>London</City> <Zip>AB1 3CD</Zip> <Zone>Zone 1</Zone> <ReferenceNumber>A123465</ReferenceNumber> </ScheduledLocation> <DataFields> <DataFieldInput> <DisplayText>Gross Weight of Sample</DisplayText> <FieldName>Gross Weight</FieldName> <DataType>number</DataType> <ReadOnly>false</ReadOnly> <Optional>false</Optional> <DefaultValue>0.00</DefaultValue> </DataFieldInput> </DataFields> <ItemsForCollection> <ItemForCollectionInput> <ItemId>123456</ItemId> <DisplayText>2KG BULK SAMPLE</DisplayText> <ItemType>Physical Sample</ItemType> <Optional>false</Optional> </ItemForCollectionInput> </ItemsForCollection> <Attributes> <AttributeInput> <AttributeName>Example Attribute Name</AttributeName> <AttributeValue>Example Attribute Value</AttributeValue> </AttributeInput> </Attributes> <MethodToUse>Warehouse</MethodToUse> </JobPartInput> </JobParts> </JobInput> </Jobs> </JobGroupInput> |
Remote data collection involves a technician travelling to a given location on one or more occasions to collect data and physical items. To represent that process in the import data format, each data collection event is represented as a JobInput that has a unique ID and is made up of one or more JobPartInputs. A JobPartInput represents a single visit to a given location. Each JobPartInput has a target location to visit (ScheduledLocation) along with a set of data items to collect on-site (DataFields) and physical items to collect (ItemsForCollection).
Remote Sampler allows conditional behaviour to be configured based on Attributes of the JobPartInput. The Attributes collection is used to hold any number of additional fields that might be required to set up conditional behaviour for different types of JobPartInput.
A full explanation of each of the available fields is given below.
Parent | Field Name | Description | Data Type | Example | Required |
---|---|---|---|---|---|
JobGroupInput | JobGroupName | This name describes a collection of Jobs. This might describe a collection of related jobs for a single user for example. | Any text | ROUND1 01-JAN-2017 | Yes |
JobInput | JobName | A textual description of a job. | Any text | Warehouse sample 1 | Yes |
JobId | A unique identifier for the job. | Any text | 123456 | Yes | |
JobPartInput | JobPartName | A textual description of the job part. | Any text | Warehouse sample 1 first day | Yes |
JobPartId | A unique identifier for the job part. | Any text | 987654 | Yes | |
ScheduledDate | The date that the job part has been scheduled for completion, | DateTime | 01-Jan-2017 00:00:00 Any standard datetime format is acceptable. | Yes | |
MethodToUse | This field can be used to specify which Remote Sampler device method should be used for this particular job part. | Text. Must match an existing method name in the system. | Warehouse Method 1 | No | |
ScheduledLocation | DisplayText | The text that the device user will see for the target location | Any text | 12, Main Street, A City, AB1 2CD | Yes |
LocationType | The type of sample collection location. | Any text | Possible examples:
| Yes | |
Latitude | The latitude of the target location. (Lat/lon or grid coordinates are required if navigation is to be used) | Number | 52.1234 | Yes if navigation required | |
Longitude | The longitude of the target location. (Lat/lon or grid coordinates are required if navigation is to be used) | Number | -1.765 | Yes if navigation required | |
GridEast | The grideast value if the location has grid-based co-ordinates. (Lat/lon or grid coordinates are required if navigation is to be used) | Number | 123456 | Yes if navigation required | |
GridNorth | The gridnorth value if the location has grid-based co-ordinates. (Lat/lon or grid coordinates are required if navigation is to be used) | Number | 654321 | Yes if navigation required | |
BuildingName | The building name for the target location. | Text | Warehouse 12 | No | |
BuildingNumber | The building number for the target location. | Number | 67 | Yes if navigation required | |
Street | The street for the target location. | Text | Main Street | No | |
City | The city of the target location. | Text | London | No | |
Zip | The zip code or postal code of the target location. A house number and zip code can be used for navigation in place of co-ordinates for navigation if required. | Text | AB1 2CD | Yes if navigation required | |
Zone | A zone code for the target location if the location has one. | Text | Zone 123 | No | |
ReferenceNumber | A unique reference number for this location if it has one. | Text | 123456 | No | |
DataFieldInput | DisplayText | The display name of the data field that will show to the device user. | Text | Sample temperature (deg C) | Yes |
FieldName | The name of the field in the customer datasystem if this datafield is to be exported on completion. | Text | SampTemp | Only if data is to be returned to external datasystem | |
DataType | The type of data this field will contain. This field can be left blank and configured within Remote Sampler. | From list | Use a value from the list below:
| No | |
Readonly | Whether this field can be changed by the device user at runtime. | Boolean | True False | No | |
Optional | Whether this data field is required from the user at runtime. | Boolean | True False | No | |
DefaultValue | A default value to present at runtime. | Text | 12.3 | No | |
ItemForCollectionInput | ItemId | A unique ID for the item to be collected. | Text | A12345 | Yes |
DisplayText | A textual description of the item to show the device user at runtime. | Text | 2kg Bulk Sample | Yes | |
ItemType | The type of item to collect | Text | Bottle | Yes | |
Optional | Whether this item is required for collection at runtime. | Boolean | True False | Yes | |
AttributeInput | AttributeName | The name of the attribute. | Text | SAMPLE_POINT_CODE | Yes |
AttributeValue | The value of the attribute. | Text | Z1234 | Yes |