Add WorkflowList implementation (#470) - #521
Conversation
Signed-off-by: jsamaniego4 <jorgemsamaniego@gmail.com>
d426dd7 to
1fd7144
Compare
frankgiordano
left a comment
There was a problem hiding this comment.
See comments on requested changes.
|
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. |
|
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>
dcb4a80 to
1e5b9ac
Compare
frankgiordano
left a comment
There was a problem hiding this comment.
You have zosmfworkflow and zosworkflow please delete zosworkflow directory/package
|
any updates |
| for (final JsonNode node : nodes) { | ||
| results.add(JsonUtils.parseResponse(node.toString(), WorkflowListResponse.class, WORKFLOWS_CONTEXT)); | ||
| } | ||
| } |
There was a problem hiding this comment.
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>
|
At this point, the PR has become a bit messy due to the merge conflicts and the presence of both the I recommend submitting a new, clean PR instead. I'll close this one. The |
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 identifiersWorkflowList.java— Implements workflow listing with the following methods:listAll()— retrieves all workflows on the systemlistByName()— filters by workflow namelistByOwner()— filters by ownerlistBySystem()— filters by system namelistCommon()— supports all six query filters (workflowName, category, system, statusName, owner, vendor)WorkflowConstantsTest.java— Unit tests for WorkflowConstantsWorkflowListTest.java— Unit tests for WorkflowList (16 tests, all passing)Testing
All unit tests pass. 4 files added, 486 insertions.