...
Info |
---|
This code is written in the HDEB-10 (Code + Metadata) Attachments.zip →DownloadAttachment.json file. |
...
Info |
---|
This code is also written in HDEB-10 (Code + Metadata) Attachments.zip → DownloadAttachment.json file. |
...
Info |
---|
This code is written in HDEB-10 (Code + Metadata) Attachments.zip → FileUpload.json file. |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
"UploadFile": { "parent": { "name": "getSingleProfilePerson" }, "route": { "httpMethod": "POST", "segments": { "UploadAttachment": { "isLiteral": true, "type": "string" } } }, "inputEntityDefinition": null, "outputEntityDefinition": null, "businessLogic": { "MultiPartFormDataReaderPF": { "executionType": "processFlow", "processFlowProperties": { "processFlowName": "MultiPartFormDataReader Process Flow", "processFlowParameters": { } } }, "MultiPartFormDataContentTypeValidatorPF": { "executionType": "processFlow", "processFlowProperties": { "processFlowName": "MultiPartFormDataContentTypeValidator Process Flow", "processFlowParameters": { "MultiPartFormDataObject": "@parent.MultiPartFormDataReaderPF.outputMultipartFormDataObject", "ValidMimeTypes": "image/jpg,image/png" } } }, //POC "AttachmentPF": { "executionType": "processFlow", "processFlowProperties": { "processFlowName": "Test Attachment PF", "processFlowParameters": { "FileData": "@parent.MultiPartFormDataReaderPF.outputMultipartFormDataObject", "RecordId": "@request.Id", "EntityName": "Persons", //Hardcoded for POC "CategoryId": 1 //DOB Category ID, Hardcoded for POC } } } /* , "MultiPartFormDataCleanupPF": { "executionType": "processFlow", "processFlowProperties": { "processFlowName": "MultiPartFormDataCleanup process flow", "processFlowParameters": { "MultiPartFormDataObject": "@parent.MultiPartFormDataReaderPF.outputMultipartFormDataObject" } } } */ } } |
This endpoint uses the "Test Attachment PF” process flow which is under HDEB-10 (Code + Metadata) Attachments.zip → HDEB-10_PF_TestAttachment.cmpack.
...
You can find the Stored Procedure under HDEB-10 (Code + Metadata) Attachments.zip → HDEB-10_SPs.cmpack.
This code block is written in "..\eBusiness\json\metadata\v1\Common\security.json". This executes the above security function with the required parameters.
...
Follow the below given steps to deploy the above mentioned POC example.
- Extract the files from HDEB-10 (Code + Metadata) Attachments.zip.
- Unpack the PF's and DBO's CMPacks using CM tool.
- Paste FileUpload.json and DownloadAttachment.json files under “..\eBusiness\json\metadata\v1\Endpoints\ProfilePersons” folder.
...
4. The above three endpoints are registered under HDEB-10 (Code + Metadata) Attachments.zip → ProfilePersonEndpoint.json file.
...
5. Add the class 'AttachmentComponent.cs' from HDEB-10 (Code + Metadata) Attachments.zip under 'MultipartFormDataProcessFlows' project in Visual Studio.
...