GenerateJobDocument - Obsolete
Description
This method is developed for electricians and is used to generate a job document based on the two documents provided for chapter two and three and the stored default document for chapter one. It returns the URL and Id of the generated document and the list of failed DeviceIds.
A sample job document contains five main sections.
- Cover page – This is the first page of the generated document and will contain the property and company information. If companies have uploaded the company logo and description to the Boligmappa Bedrift system it will also be included in the cover page. If it is not provided, relevant spaces are left empty so that the users can include the logo and description manually.
- Table of Contents – The description for Chapter one can also be customized in the Boligmappa Bedrift admin's company profile page. If this value is not set in the profile page, a default description ("Generell brukerveiledning for elektriske installasjoner") is used.
- Chapter 1 – Companies can upload a default chapter one document to Boligmappa Bedrift. The companies that have uploaded a default chapter one document, can use it as the chapter one of job documents generated by that company. The companies also have the option of using the ‘Default Boligmappa chapter one document’ by selecting it in the Boligmappa Bedrift admin page. If this is not provided a page with a help text will be added under ChapterOne. View the Chapter one help text.
- Chapter 2 – This section of the document is generated by the user input provided in chapterTwo. If this is not provided a page with a help text is added under ChapterTwo. View the Chapter two help text.
- Chapter 3 – This section contains a list of DeviceDocuments (EFO, NRF and NOBB). If the user has provided a Url or Base64 encoded data string as the input of ‘chapterThree’, it is used for this section. If the user has provided a list of DeviceIds as the input of ‘chapterThree’, this section is generated by retrieving the requested Device documents.
Request
Parameter | Type | Mandatory/Optional | Maximum character length/limit | Description |
---|---|---|---|---|
chapterOneDocumentId | int | Optional | Not Relevant | Chapter one documentId |
chapterTwo | List<ChapterTwo> | Refer Notes | Not Relevant | Document to be inserted as Chapter 2. |
chapterThree | Refer Notes | Not Relevant | Document to be inserted as Chapter 3 or a set of EFO, NRF and NOBB ids which can be used to generate Chapter 3 by getting relevant device documents | |
documentName | string | Mandatory | Not Relevant | Name for the generated output document |
plantId | long | Mandatory | Not Relevant | Id of the plant to which the generated document should be associated |
orderNo | string | Optional | Not Relevant | Order number |
propertyOwnerEmail | string | Optional | Not Relevant | A notification is sent to the given email address when a document is uploaded to the property |
applicationName | string | Mandatory | Should be less than or equal to 10 characters | The name of the integration partner |
NOTE: It is mandatory to provide either the ChapterTwo or ChapterThree input parameter to generate a job document.
Request - sample input
<GenerateJobDocument>
<MethodParameters>
<UserAuthentication>
<UserName>username</UserName>
<Password>password</Password>
<AnyAttr attr0="XmlAttributeArray" isNull="false">
<XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
</AnyAttr>
</UserAuthentication>
<chapterOneDocumentId>54616</chapterOneDocumentId>
<chapterTwo attr0="ChapterTwoArray" isNull="false">
<ChapterTwoArray0>
<Url>https://blogs.adobe.com/security/SampleSignedPDFDocument.pdf</Url>
<Data isNull="false" />
</ChapterTwoArray0>
</chapterTwo>
<chapterThree>
<DeviceIds isNull="true" />
<Url>https://s21.q4cdn.com/374334112/files/doc_downloads/test.pdf</Url>
<Data isNull="false" />
</chapterThree>
<documentName>testing</documentName>
<plantId>6731</plantId>
<orderNo isNull="false" />
<propertyOwnerEmail isNull="false" />
<applicationName>test</applicationName>
</MethodParameters>
</GenerateJobDocument>
Response
Type | Description |
---|---|
A model containing the URL for the generated document, documentId and the failed EfoIds list |
Request - sample output
<GenerateJobDocument>
<MethodParameters>
<JobDocument>
<BoligmappaDocId>57470</BoligmappaDocId>
<Url>http://172.20.1.183:8080/Document/DownloadDocumentWebService/DownloadDocWithSessionKey?sessionKey=rl%2fL3WDK6Fs%2bCIaABAaVX%2fB86JfdgxtfqB4n377Kp9TqzvRs9lRTzgmkEamQBze3</Url>
<FailedDeviceIds isNull="true" />
<EmailStatusCode>1</EmailStatusCode>
</JobDocument>
</MethodParameters>
</GenerateJobDocument>
Exceptions
Error Code | Description |
---|---|
111 | plantId does not exist for your company or your license does not authorize you to access this plantId |
123 | An exception occurred while processing your request |
138 | applicationName length has exceeded the maximum character limit allowed (10) |
146 | The applicationName is not set |
148 | The documentName cannot be empty |
150 | Could not find Efo documents for any of the EfoIds provided |
151 | Company is not authorized to access one or more given documents |
152 | No property is connected to the given plantId |
153 | 64 bit encoded data decoding has failed |
155 | One or more of the input documents are not in the valid PDF format. (Only the PDF format is supported for this version) |
157 | plantId is required |
158 | Input for chapter 3 does not contain adequate information (a Url or Base64 encoded data) |
167 | You are not authorized to use this method |
217 | An error occured while sending the notification mail to the user |
218 | The propertyOwnerEmail provided is invalid |
226 | To generate a job document there should be at least one chapter input (Chapter2 or Chapter3) |