You are here

getKey

public String getKey() returns the key of the process definition. Contains "activiti" or "jbpm" as a prefix for on-premise.
Attention: This method was introduced with SDK version 1.3.

Parameters

None

Returns

Returns a String representing the process definition key.

Example


  // Get WorkflowService
  WorkflowService workflowService = session.getServiceRegistry().getWorkflowService();
  
  // get process definitions
  List<ProcessDefinition> processDefinitions = workflowService.getProcessDefinitions();
  
  Log.d(TAG, "Process definitions...");
  for (ProcessDefinition pd : processDefinitions){
  
    Log.d(TAG, "identifier: "+pd.getIdentifier());
    Log.d(TAG, "key: "+pd.getKey());
    Log.d(TAG, "name: "+pd.getName());
    Log.d(TAG, "version: "+pd.getVersion());
  }

      

Would result in output such as the following:


Process definitions...
identifier: activitiAdhoc:1:4
key: activitiAdhoc
name: Adhoc Activiti Process
version: 1
identifier: activitiParallelGroupReview:1:20
key: activitiParallelGroupReview
name: Parallel Group Review And Approve Activiti Process
version: 1
identifier: activitiParallelReview:1:16
key: activitiParallelReview
name: Parallel Review And Approve Activiti Process
version: 1
identifier: activitiReview:1:8
key: activitiReview
name: Review And Approve Activiti Process
version: 1
identifier: activitiReviewPooled:1:12
key: activitiReviewPooled
name: Pooled Review And Approve Activiti Process
version: 1