Skip to content

Add WorkflowList implementation (#470) - #521

Closed
jsamaniego4 wants to merge 8 commits into
zowe:mainfrom
jsamaniego4:feature/issue-470-workflow-list
Closed

Add WorkflowList implementation (#470)#521
jsamaniego4 wants to merge 8 commits into
zowe:mainfrom
jsamaniego4:feature/issue-470-workflow-list

Conversation

@jsamaniego4

Copy link
Copy Markdown
Contributor

Closes #470

Summary

Implements the z/OSMF List Workflows REST API for the Zowe Client Java SDK.

Changes

  • WorkflowConstants.java — Adds constants for the z/OSMF workflows REST API endpoint and query parameter identifiers
  • WorkflowList.java — Implements workflow listing with the following methods:
    • listAll() — retrieves all workflows on the system
    • listByName() — filters by workflow name
    • listByOwner() — filters by owner
    • listBySystem() — filters by system name
    • listCommon() — supports all six query filters (workflowName, category, system, statusName, owner, vendor)
  • WorkflowConstantsTest.java — Unit tests for WorkflowConstants
  • WorkflowListTest.java — Unit tests for WorkflowList (16 tests, all passing)

Testing

All unit tests pass. 4 files added, 486 insertions.

Signed-off-by: jsamaniego4 <jorgemsamaniego@gmail.com>
@jsamaniego4
jsamaniego4 force-pushed the feature/issue-470-workflow-list branch from d426dd7 to 1fd7144 Compare June 19, 2026 21:52
@frankgiordano
frankgiordano self-requested a review June 19, 2026 22:34
Comment thread src/main/java/zowe/client/sdk/zosworkflows/methods/WorkflowList.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosworkflows/methods/WorkflowList.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosworkflows/methods/WorkflowList.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosworkflows/methods/WorkflowList.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosworkflows/methods/WorkflowList.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosworkflows/methods/WorkflowList.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosworkflows/methods/WorkflowList.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosworkflows/methods/WorkflowList.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosworkflows/methods/WorkflowList.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosworkflows/WorkflowConstants.java Outdated
Comment thread src/test/java/zowe/client/sdk/zosworkflows/WorkflowConstantsTest.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosworkflows/methods/WorkflowList.java Outdated
Comment thread src/main/java/zowe/client/sdk/zosworkflows/methods/WorkflowList.java Outdated

@frankgiordano frankgiordano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments on requested changes.

@frankgiordano

Copy link
Copy Markdown
Collaborator

FYI. WorkflowList class exists in the project main branch with archive workflow list functionality. You need to pull all the latest changes into your clone and merge in your updates to that version.

@frankgiordano frankgiordano added the enhancement New feature or request label Jun 22, 2026
@frankgiordano

Copy link
Copy Markdown
Collaborator

Any updates on this one. thx

- Rename list methods to getWorkflows, getWorkflowsByName, getWorkflowsByOwner, and getWorkflowsBySystem

- Replace per-parameter getWorkflowsCommon with a single WorkflowListInputData object built via the builder pattern

- Parse the JSON response into List<WorkflowListResponse> instead of returning
  a raw JSON String

- Add WorkflowListResponse model, following the WorkflowGetPropertiesResponse style (orEmpty helpers, typed WorkflowAutomationStatus field)

- Remove custom getUrl; use the request object's existing getUrl

- Remove WorkflowConstants/WorkflowConstantsTest additions; merge main's
  WorkflowConstants and consolidate into the existing WorkflowList class

- Add unit tests for the new getWorkflows methods (24 tests total, all passing)

Signed-off-by: Jorge Samaniego jorgemsamaniego@gmail.com
Signed-off-by: jsamaniego4 <158121098+jsamaniego4@users.noreply.github.com>
@jsamaniego4
jsamaniego4 force-pushed the feature/issue-470-workflow-list branch from dcb4a80 to 1e5b9ac Compare July 9, 2026 15:55

@frankgiordano frankgiordano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have zosmfworkflow and zosworkflow please delete zosworkflow directory/package

@frankgiordano

Copy link
Copy Markdown
Collaborator

any updates

for (final JsonNode node : nodes) {
results.add(JsonUtils.parseResponse(node.toString(), WorkflowListResponse.class, WORKFLOWS_CONTEXT));
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should replace all above with the following pattern:

    final List<WorkflowArchivedResponse> results = new ArrayList<>();
    final JsonNode root = JsonUtils.parse(responsePhrase);
    final ArrayNode nodes = JsonUtils.getArrayByField(root, ARCHIVED_WORKFLOWS);

    for (final JsonNode node : nodes) {
        results.add(JsonUtils.parseResponse(
                node.toString(),
                WorkflowArchivedResponse.class,
                ARCHIVED_WORKFLOW_CONTEXT));
    }

pull in latest JsonUtils.java

…st.java

Signed-off-by: Frank Giordano <giofr01@yahoo.com>
…stTest.java

Signed-off-by: Frank Giordano <giofr01@yahoo.com>
…tTest.java

Signed-off-by: Frank Giordano <giofr01@yahoo.com>
Signed-off-by: Frank Giordano <giofr01@yahoo.com>
…t.java

Signed-off-by: Frank Giordano <giofr01@yahoo.com>
@frankgiordano
frankgiordano self-requested a review July 16, 2026 01:36
@frankgiordano

Copy link
Copy Markdown
Collaborator

At this point, the PR has become a bit messy due to the merge conflicts and the presence of both the zosworkflow and zosmfworkflow packages.

I recommend submitting a new, clean PR instead. I'll close this one.

The zosworkflow package should be removed, and your changes should be rebased or synchronized with the latest code in the zosmfworkflow package before opening the new PR.

@jsamaniego4 jsamaniego4 removed their assignment Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List the workflows for a system or sysplex API

2 participants