cancel
Showing results for 
Search instead for 
Did you mean: 

Cast RepositoryService to RepositoryServiceImpl

wendelkerr
Champ in-the-making
Champ in-the-making
Hi,

i'm trying to catch ProcessDefinition activities,
and i found in the forum "http://forums.activiti.org/content/gettaskdesfinitionlist"
that i need to cast the RepositoryService  to RepositoryServiceImpl,
but i'm getting CastClassException when i'm doing this.
I'm using WELD for injection my RepositoryService and say that i can cast WELD Proxy.

Any one knows how get activities from another way, or do this cast with WELD??

Thank you very much
4 REPLIES 4

jbarrez
Star Contributor
Star Contributor
There is a better way not: get the BpmnModel from the repository Service and get the process definition activities that way. No need to cast in that case.

wendelkerr
Champ in-the-making
Champ in-the-making
Thanks Joram 😃
It worked!!

josel1204
Champ in-the-making
Champ in-the-making
Sorry, but I couldn't find this method in BpmnModel class, I'am working with activiti 5.14 version and using CDI.
Can you helpme please!!!!

Greattings!!!

jbarrez
Star Contributor
Star Contributor
What do you mean?

On the repositoryService:

<code>
 
  /**
   * Returns the {@link BpmnModel} corresponding with the process definition with
   * the provided process definition id. The {@link BpmnModel} is a pojo versions
   * of the BPMN 2.0 xml and can be used to introspect the process definition
   * using regular Java.
   */
  BpmnModel getBpmnModel(String processDefinitionId);
</code>