Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-130398

ServiceContext attributes do not exist when creating web content articles via Headless API

    Details

    • Fix Priority:
      3

      Description

      When a workflow email template is configured to use the ServiceContext and a web content article is created via Headless API, several attributes are missing from the ServiceContext.

      Steps to Reproduce
      1. Set up a dummy SMTP (or POP3) mail server.
      2. Start up DXP and connect it to the mail server from Step 1.
      3. Go to Control Panel > Workflow > Process Builder and edit Single Approver workflow.
      4. Click on review node and edit Review Notifications by adding the following to the email template:

      <#assign title =serviceContext.getAttribute("titleMapAsXML_en_US")/>
      ${userName} sent you a document ${title}
      

      5. Go to Site Administration > Content and Data > Web Content and create a web content folder.
      6. Apply Single Approver workflow to web content folder.
      7. Within the folder, create a new web content article.
      8. Confirm that an email is sent with no exceptions.
      9. Navigate to http://localhost:8080/o/api?endpoint=http://localhost:8080/o/headless-delivery/v1.0/openapi.json.
      10. Under "StructuredContent", create a web content article using "postStructuredContentFolderStructuredContent".

      Actual Results:
      The web content article is created and an email notification is successfully sent.

      Expected Results:
      The web content article is created but the email notification fails and an exception occurs. See error.log.

      Testing
      Reproduced in 7.2.x - be25f7ef41013284
      Reproduced in 7.3.x - 1b9169d3467eba20
      Reproduced in master - 1b7ae072de45a658

        Attachments

          Activity

            People

            Assignee:
            kevin.lee Kevin Lee
            Reporter:
            kevin.lee Kevin Lee
            Participants of an Issue:
            Recent user:
            Kevin Lee
            Engineering Assignee:
            Kevin Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 weeks ago

                Packages

                Version Package