AnsweredAssumed Answered

Custom extension - access properties in definition

Question asked by steve1 on Apr 1, 2012
Latest reply on Apr 12, 2012 by steve1
This is my first post,
so first, thanks to JBPM4 and now Activiti5 developers.

I made a custom extension with the aid of the user guide, and works well.

Now, how can I access these properties in the process definition?

I can use activity definition via getDeployedProcessDefinition and getActivities,
but there is no custom properties in the ActivityImpl.getProperties.

I investigated source code, and found some.

1. ActivityImpl.getActivityBehavior returns ClassDelegate (MultiInstanceActivityBehavior in case of multi-instance).

2. ClassDelegate has internal field of fieldDeclarations which have custom properties, but no getter.

3. MultiInstanceActivityBehavior has internal field of innerActivityBehavior which has original ActivityBehavior (=ClassDelegate), but no getter.

If these getters are added, I can access and use custom properties in the process definition.

Is this correct approach?

Thanks.

Outcomes