Integrate AEM with Box.com to store completed forms | Community
Skip to main content
Level 4
February 9, 2021
Solved

Integrate AEM with Box.com to store completed forms

  • February 9, 2021
  • 1 reply
  • 4118 views

Hello everyone,

 

I wanted to know what the suggested method to integrate AEM with Box.com would be. Box is a cloud storage solution.

 

The use case would be to use AEM Forms as the front end to capture information and generate a PDF upon form submission. Once submitted, the PDF will also be sent from AEM to Box to be stored.

 

Box provides an API reference, but I am not sure how to start to create this integration with AEM.

https://developer.box.com/reference/

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Vijayalakshmi_S

Hi @techddx,

As a first step, decide on the authentication method. I suggest to read through the entire links under Authentication section and decide based on your project's Box account set up. 

Once when we are authenticated, we can make use of the desired APIs

Note : Can make use of Apache commons Http client or jersey client or any related for all the API calls.

For your use case to upload files to Box account,

Please check and let know if you are looking for any specific information in the flow.

1 reply

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
February 10, 2021

Hi @techddx,

As a first step, decide on the authentication method. I suggest to read through the entire links under Authentication section and decide based on your project's Box account set up. 

Once when we are authenticated, we can make use of the desired APIs

Note : Can make use of Apache commons Http client or jersey client or any related for all the API calls.

For your use case to upload files to Box account,

Please check and let know if you are looking for any specific information in the flow.

techddxAuthor
Level 4
February 17, 2021

Hi @vijayalakshmi_s, thank you for this information.

 

I have created a Box Application to use the Server Side Authentication with JWT to authenticate to the Box API. The current plan is to submit the adaptive form to a custom workflow process that calls the Box API. As per: https://experienceleague.adobe.com/docs/experience-manager-learn/forms/adaptive-forms/custom-process-step-aem-workflow.html?lang=en#adaptive-forms

 

However, I am encountering an issue when calling the Box API from within the AEM workflow. I have installed the required dependencies of the Box SDK as an OSGi bundle, but I am not sure how to resolve this issue. I will attach a snippet of the error log.

 

 

 

com.adobe.granite.workflow.WorkflowException: Process execution resulted in an error at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:201) at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:260) at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502) at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293) at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60) at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:229) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.NoClassDefFoundError: com/eclipsesource/json/JsonValue at dgs.aem.core.BoxConnect.execute(BoxConnect.java:82) at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:195) ... 8 more Caused by: java.lang.ClassNotFoundException: com.eclipsesource.json.JsonValue not found by BoxJavaSDK [729] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1597) at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1982) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 10 more