How can get the ProcessDefinition properties by Java Api?

Hey guys,
I can get the ProcessDefinition list by

  List<ProcessDefinition> definitinList = 

but I need get the properties, how can I get this.

@Leo_Liu To get Process definition properties, You need to use BPMN Model api.

Refer this page: Read a Model |

Hi @aravindhrs

  	BpmnModelInstance modelInstance = Bpmn.readModelFromStream(repositoryService.getProcessModel(pd.getId()));`

Now I have get the BpmnModelInstance but now I don’t how to get properties


which properties do you mean exactly?

Starting with the modelInstance you can access the definitons:

        Definitions definitions = modelInstance.getDefinitions(); " " + definitions.getAttributeValue( "id" ) );

and the process model:

        ModelElementInstance model = definitions.getUniqueChildElementByType( org.camunda.bpm.model.bpmn.instance.Process.class ); " " + model.getAttributeValue( "id" ) ); " " + model.getAttributeValue( "name" ) );

Regards, Frank

Hi @langfr
I want get the Extensions Properties
Like this I need get the property1

I try this

Collection elementInstances = modelInstance.getModelElementsByType(CamundaProperty.class);

It can get all Extensions Properties , I can just get the property1 ?

Try like below in Task Listener of the UserTask

public void execute(DelegateExecution execution) throws Exception {
    BpmnModelInstance modelInstance = execution.getBpmnModelInstance();
    Collection<CamundaProperty> elementInstances = modelInstance.getModelElementsByType(CamundaProperty.class);
    if (elementInstances == null) return;
	for (CamundaProperty camundaProperty : elementInstances) {
	      String key = camundaProperty.getCamundaName();
          String value = camundaProperty..getCamundaValue());