AnsweredAssumed Answered

Retrieve task definition ID with Java API

Question asked by mano.swerts on Jan 24, 2013
Latest reply on Jan 24, 2013 by mano.swerts
Hi all,

We are fiddling with Activiti in Alfresco 4.2.c for an upcoming project. We created a simple workflow with a user task. The user task definition in the Activiti designer and in the XML shows an id with value "verwittigDirectieleden". The description is set to "Verwittig directieleden". The snippet from the XML file:

<userTask id="verwittigDirectieleden" name="Verwittig directieleden" activiti:candidateGroups="GROUP_directieassistenten"></userTask>

In Java we we're able to retrieve all the pooled tasks and claim this task to  a person. However when we look at the properties of this task, we see the following values for some properties:

definition = WorkflowTaskDefinition [id=bpm_workflowTask,metadata=ClassDef[name={}workflowTask]]
id = "activity$130"
name = "bpm_workflowTask"
properties = { {}description=Verwittig directieleden, … }

As you can see, the id in the WorkflowTaskDefinition class does not match the id in the XML. We see the description from the XML appear in the "properties" variable, but the XML id is nowhere to be seen.

Is this a bug in Activiti or are we approaching this the wrong way? Any help is greatly appreciated.

Kind regards,

Mano Swerts