cancel
Showing results for 
Search instead for 
Did you mean: 

getTaskDesfinitionList?

dognose
Champ in-the-making
Champ in-the-making
Hello,

I noticed the Class "TaskDefinition", but as far as I can see, there is no Service that can give me an List of TaskDefinitions based on a processKey / Instance ID ?
I need to determine - Once the process is started - What Tasks will be available at all Times. (Need to receive all candidateUsernames in Order to send an Email.)

How do I do this?

I only spotted options to receive the Process as a PNG, a XML or as a DiagramLayout, but not a simple TaskDefinitionList.

edit:

Some Posts bellow, i found this:


ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition(processDefinitionId);

if (processDefinition != null) {
    for (ActivityImpl activity : processDefinition.getActivities()) {
      String type = (String) activity.getProperty("type");
      // …
    }
}

but ProcessDefinitionEntity is NOT in the API, as well getActivities() is not a Member of processDefinition.
So i assume, these are Classes (like TaskDefinition) that are used by activii, but not part of the (public) API
and therefore may change at anytime?

Any Chance, that there will be a public API to such a thing in the near future?

(Don't want to use internal classes as they may be changed / removed or renamed from release to release)
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
The task-definition is not exposed in the API, indeed. Currently, the only way to retrieve the info you're looking for is by using the internal classes.

We're thinking of a way to expose this cleanly in the future, but we'll keep in mind how a lot of people are using this now, so we can anticipate on this to make the transition as painless as possible… No timing on this right now, either.

dognose
Champ in-the-making
Champ in-the-making
Thank you very much.

Then i'll go with that snippet for now and wait for a public version.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.