- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2017 04:46 AM
Hi all,
I need some advice because I'm messing around with a requirement without getting any solution. All I wanna do is to access some previous uploaded files (in a User Task, from the upload form field) in a downstream ServiceTask. For me it looks like that the example behind the following link is the way to go:
I assume I can get the content by injecting (or "Autowireing") the RelatedContentService (?):
RelatedContentService relatedContentService;
The issue I get is already right after copy&paste the demo code from the above link to my project. The project has been created with the org.alfresco.maven.archetype:activiti-jar-archetype (see attached screenshot).
But the following packages can not be resolved (see attached screenshot):
import com.activiti.content.storage.api.ContentObject;import com.activiti.extension.domain.runtime.RelatedContent;
Which dependencies are missing here? If I double check at maven.alfresco.com/nexus for RelatedContent, it only refers to a class within a org.activiti package. Even the ContentObject seems to be only available in org.activiti group of the content-storage-api artifact. However, if I use the classes from the org.activiti package instead, the startup of the application server crashes with the following:
Caused by: java.lang.IllegalStateException: Failed to introspect bean class [com.activiti.extension.bean.MyTestClass] for persistence metadata: could not find class that it depends on at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:401) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:333) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:992) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:523) ... 28 moreCaused by: java.lang.NoClassDefFoundError: Lorg/activiti/app/service/runtime/RelatedContentService;
Can anyone help me with that issue, please? Maybe the approach is wrong? Again, what I need is, just to get the uploaded content from a previous UserTask in a ServiceTask.
Thanks!
BR,
- Labels:
-
Alfresco Process Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2017 11:08 AM
Hi!
You do need activiti-app-logic-1.5.3.jar (or other version) dependency in your pom.xml
For example:
<dependency>
<groupId>${activiti.groupId}</groupId>
<artifactId>activiti-app-logic</artifactId>
<version>${activiti.version}</version>
<exclusions>
<!-- Exclude the SLF4J JAR so we don't get multiple binding warnings when running -->
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2017 11:08 AM
Hi!
You do need activiti-app-logic-1.5.3.jar (or other version) dependency in your pom.xml
For example:
<dependency>
<groupId>${activiti.groupId}</groupId>
<artifactId>activiti-app-logic</artifactId>
<version>${activiti.version}</version>
<exclusions>
<!-- Exclude the SLF4J JAR so we don't get multiple binding warnings when running -->
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2017 02:54 AM
Fernando González thanks! The mentioned dependency is available in the POM after creating the project with the org.alfresco.maven.archetype:activiti-jar-archetype artifact. However, I do not see the packages / classes in the JAR file so the IDE doesn't see it either!???
Any thoughts what I'm doing wrong?
BR,
Mario
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2017 05:02 AM
Ah!!, ok, ok, have you tried doing this from terminal?
mvn eclipse:eclipse
This synchronize dependencies with Eclipse from maven.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2017 04:35 AM
I don't have Eclipse as IDE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2017 06:01 AM
Ops! I'm sorry. Then do can use maven in command mode for test this dependency and after watch your config with your IDE.
