Skip to content

Create attachment in active entity#460

Open
yashmeet29 wants to merge 10 commits intodevelopfrom
createAttachmentInActiveEntity
Open

Create attachment in active entity#460
yashmeet29 wants to merge 10 commits intodevelopfrom
createAttachmentInActiveEntity

Conversation

@yashmeet29
Copy link
Copy Markdown
Collaborator

Describe your changes

This PR introduces support for attachment creation in Active entities. Whenever create attachment request is triggered for Active DB state of the entity, document is stored in DMS. We are using threadlocal to store the metadata related to attachment. Next the CAP framework does the insert in Attachments DB and finally the control reaches the After handler of SDMCreateAttachmentsHandler which we have introduced in this PR. Here we read the metadata from threadlocal and update the DB.

Any documentation

https://wiki.one.int.sap/wiki/spaces/sapecm/pages/6005032368/Attachment+creation+in+active+entity+bypassing+draft+flow

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • I follow Java Development Guidelines for SAP
  • I have tested the functionality on my cloud environment.
  • I have provided sufficient automated/ unit tests for the code.
  • I have increased or maintained the test coverage.
  • I have ran integration tests on my cloud environment.
  • I have validated blackduck portal for any vulnerability after my commit.

Upload Screenshots/lists of the scenarios tested

  • I have Uploaded Screenshots or added lists of the scenarios tested in description

*/
@After
@HandlerOrder(HandlerOrder.LATE)
public void updateActiveEntitySdmMetadata(CdsCreateEventContext context, List<CdsData> data) {
*/
@After
@HandlerOrder(HandlerOrder.LATE)
public void updateActiveEntitySdmMetadata(CdsCreateEventContext context, List<CdsData> data) {
Result mockResult = mock(Result.class);
Row mockRow = mock(Row.class);
List<Row> nonEmptyRowList = List.of(mockRow);
CdsEntity mockEntity = mock(CdsEntity.class);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants