Skip to main content

GetAllProcessDefinitionsLookupCommand

GetAllProcessDefinitionsLookupCommand returns a lightweight, cached list of process definitions for selectors, autocomplete controls, workflow-entity process mappings, trigger configuration, and other administration screens.

Use this command when the client needs process choices. Use GetProcessDefinitiionListQuery instead when building a process-management screen that needs pagination and richer filtering.

Authorization​

Execute the command through the Administration API command endpoint with an authenticated administrator token. It is not intended for customer or anonymous access.

Request​

The command has no input fields.

{
"cmd": "GetAllProcessDefinitionsLookupCommand",
"data": {}
}

JavaScript command-engine example:

const response = await doCmd("GetAllProcessDefinitionsLookupCommand", {});

if (!response.isSuccessful) {
throw new Error(response.message);
}

const processOptions = response.data.map(process => ({
value: process.id,
label: process.name,
description: process.description
}));

Response​

{
"isSuccessful": true,
"statusCode": "00",
"message": "Retrieved 3 process definitions for lookup",
"data": [
{
"id": 125,
"name": "Service Request Approval",
"description": "Reviews and approves a service request.",
"uniqueIdentifier": "0de30d73-622e-46db-a35c-37af16820287",
"category": "Operations",
"processType": "MANUAL",
"triggerEventType": "None",
"entityType": "WorkflowEntityRequest",
"version": "1.0"
},
{
"id": 142,
"name": "Account Maintenance",
"description": "Processes account-maintenance requests.",
"uniqueIdentifier": "246bf349-6297-4398-914d-c49057684448",
"category": "Account Services",
"processType": "AUTOMATIC",
"triggerEventType": "None",
"entityType": "WorkflowEntityRequest",
"version": "2.0"
},
{
"id": 177,
"name": "Nightly Reconciliation",
"description": "Runs the nightly reconciliation process.",
"uniqueIdentifier": "8a7aac73-0868-4efe-987d-3dcb732fd9f4",
"category": "Reconciliation",
"processType": "SCHEDULED",
"triggerEventType": "OnScheduledExecution",
"entityType": "ScheduledProcess",
"version": "1.2"
}
]
}

Response fields​

FieldTypeNullableMeaning
idlongNoDatabase identifier. Use this value as processDefinitionId.
namestringNoDisplay name shown in a selector.
descriptionstringYesShort explanation of the process.
uniqueIdentifierstringYesStable process-definition identifier used for reliable references.
categorystringYesLogical grouping used by administration interfaces.
processTypestringNoString representation of the configured process type.
triggerEventTypestringNoString representation of the process trigger event.
entityTypestringYesEntity type associated with the definition, or null when none is configured.
versionstringYesProcess-definition version.

Only process definitions where isDeleted is false are returned. Results are ordered by name.

Workflow-entity usage​

Use the returned id when configuring the processes collection of CreateWorkflowEntityCommand or UpdateWorkflowEntityCommand:

{
"cmd": "CreateWorkflowEntityCommand",
"data": {
"code": "SERVICE_REQUEST",
"name": "Service Request",
"allowRequestCreation": true,
"processes": [
{
"processDefinitionId": 125,
"isDefault": true,
"isActive": true,
"displayOrder": 1
},
{
"processDefinitionId": 142,
"isDefault": false,
"isActive": true,
"displayOrder": 2
}
]
}
}

The lookup returns all non-deleted definitions. A form may apply client-side filters such as entityType, category, or triggerEventType before presenting the choices. The server still validates every submitted process mapping.

Caching behavior​

The lookup is cached per tenant using the process-definition lookup cache key. Process-definition create, update, delete, rename, scheduling, and trigger-management operations invalidate that cache so the next lookup reloads current values.

Because the command returns the complete lookup collection:

  • it does not accept pageIndex, pageSize, search, or isExport;
  • clients should load it once and filter the returned collection locally;
  • process administration grids should use GetProcessDefinitiionListQuery, not this lookup command.
CommandUse it for
GetAllProcessDefinitionsLookupCommandLightweight cached process selector.
GetProcessDefinitiionListQueryPaginated process-administration list with filtering.
GetProcessDefinitionByIdQueryFull details for one process definition.
GetProcessBundleQueryComplete process design/configuration bundle.
GetWorkflowEntityProcessesQueryProcess mappings already assigned to one workflow entity.

See also Workflow Entity Commands and the BPM Lookup API.