Workflow API: `status` field not returned in JSON response (v5.1.2)
Author: a25001-TammyChangCreated Jul 6, 2026Updated Jul 6, 2026
Labelsquestion
Question
PowerJob Version: 5.1.2
The WorkflowInfoDTO Java class has both status (Integer) and enable (Boolean) fields, but the API response only returns enable. The status field is missing from JSON, causing it to be null after deserialization.
Details
Expected Behavior
The WorkflowInfoDTO class has both fields:
// PowerJob's WorkflowInfoDTO
private Integer status; // Should be in JSON
private Boolean enable; // Also in JSONI expected the API /workflow/fetch?workflowId=XXX to return:
{
"id": 422184,
"wfName": "a7-pms-stats-workflow",
"status": 1, // ← Expected but missing
"enable": true // ← This is present
}Actual Behavior
The API only returns:
{
"id": 422184,
"wfName": "a7-pms-stats-workflow",
"enable": true // Only enable, no status field
}After Jackson deserialization:
workflow.getStatus()→null❌workflow.getEnable()→true✅
Impact
Our code assumed status is always present:
// This caused NullPointerException
Integer status = workflow.getStatus();
if (status == 99) { // NPE here!
return true; // Filter deleted workflows
}We fixed it with defensive null checks, but the root cause is unclear.
Questions
Why is the
statusfield missing from the API response?- Is this due to permission changes in v5.x?
- Is it a serialization configuration?
- Or is this intentional?
Should we use
enableinstead ofstatus?- What's the correct way to check if a workflow is deleted?
- Is there a migration guide?
Is this documented?
- Checked v5.1.2, v5.1.1, v5.1.0, v5.0.0-BETA release notes
- Found no mention of this change
Environment
- PowerJob Version: 5.1.2-jdk17
- Dependencies:
powerjob-client:5.1.2powerjob-worker-spring-boot-starter:5.1.2-jdk17
- API Endpoints Tested:
/workflow/fetch?workflowId=XXX/workflow/list
Test Code Used
# PowerShell test with JWT authentication
$headers = @{
"PowerJwt" = "your-jwt-token"
"AppId" = "your-app-id"
}
$response = Invoke-WebRequest -Uri "http://powerjob.athena.com.tw/powerjob/workflow/fetch?workflowId=422184" -Headers $headers
$response.Content | ConvertFrom-Json | ConvertTo-Json -Depth 5Result: enable field present, status field missing.
Suggestion
It would be helpful to clarify:
- Whether
statusis deprecated or just not serialized - The recommended way to check workflow status (deleted/active)
- Document breaking API changes in release notes
Thank you!
Source: PowerJob/PowerJob