cancel
Showing results for 
Search instead for 
Did you mean: 

Pass a File from Super Process to Sub Process in APS

hari
Star Contributor
Star Contributor

Hi there,

I am struck while trying to pass a file from super process to sub process.

I looked at the below example by Ciju, but I dont think the RelatedContentRepository which was autowired is available now in the latest version of APS.

activiti-examples/activiti-copy-attachments-from-parent-process at master · cijujoseph/activiti-exam... 

I also tried to get that RelatedContentRepository from engine services in my class that implements Java Delegate but I couldnt find it even there.

I am struck and any help is appreciated. Thank you.

My APS version is 1.9

1 ACCEPTED ANSWER

paul_roth
Star Contributor
Star Contributor

Hi Hari, please have a look at this sample that Sherry Mathews created and contributed to see if this is what you are looking for.

aps-examples/activiti-copy-attachments-from-child-to-parent-process at master · sherrymax/aps-exampl... 

Thanks,

Paul

View answer in original post

5 REPLIES 5

paul_roth
Star Contributor
Star Contributor

Hi Hari, please have a look at this sample that Sherry Mathews created and contributed to see if this is what you are looking for.

aps-examples/activiti-copy-attachments-from-child-to-parent-process at master · sherrymax/aps-exampl... 

Thanks,

Paul

hari
Star Contributor
Star Contributor

Hi Paul, 

Thanks for your quick reply. This is what I was looking for. 

I can see that he is using dependencies of APS 1.5.0. Not sure if this solution works with dependencies of APS 1.9. 

I'll give a try. 

hari
Star Contributor
Star Contributor

Hi Paul and Others, 

I am still struck with this one. I tried to import the app that I downloaded from the above github link and it doesnt get imported. I see the below issue in the logs. 

(**** Truncated to a few lines). My guess for the issue is that may be app was created in an earlier version of APS. 

21-Mar-2019 21:09:29.436 SEVERE [http-nio-8080-exec-14] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [appDispatcher] in context with path [/activiti-app] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at com.activiti.service.runtime.UsageQuotaServiceImpl.checkCreateRuntimeApp(UsageQuotaServiceImpl.java:78)
at com.activiti.service.runtime.RuntimeAppDefinitionServiceImpl.addAppDefinitionForUser(RuntimeAppDefinitionServiceImpl.java:311)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)

Now, I tried to create an app by myself. Have used the task listener in the subprocess and at runtime the relatedContentRepository which was autowired was evaluating to null. 

My APS version is 1.9.0.3

Any other alternatives ways or solution for this ? Or do you think I missed something in my implementation? 

Thanks again ! 

paul_roth
Star Contributor
Star Contributor

Hari _‌ this most expeditious thing to do would be to open a case with our customer support organization and they will get you sorted.

hari
Star Contributor
Star Contributor

Yes Paul. Opening the case for it.