Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboard UPS Connector to Axon-ivy market #1

Merged
merged 34 commits into from
Feb 22, 2024

Conversation

ndkhanh-axonivy
Copy link
Collaborator

No description provided.

@ndkhanh-axonivy
Copy link
Collaborator Author

Hi @ny-huynh, @ptanhaxon,
Thank you so much for your amazing contribution!
As discussed via mail "Connector publishing", I fork the code from your repo https://github.com/axonivy-professional-services/ups-modules to my market repo and created this pull request for onboarding new connector.

I will start reviewing the product now, if I find any concerns or questions, I will mention you in the comment section. Thanks for your understanding!

FYI @ivy-sgi

@ndkhanh-axonivy ndkhanh-axonivy changed the title UPS Connector to Axon-ivy market Onboard UPS Connector to Axon-ivy market Jan 3, 2024
@ndkhanh-axonivy
Copy link
Collaborator Author

Please add product.json for ups-connector-product

Copy link
Collaborator Author

@ndkhanh-axonivy ndkhanh-axonivy left a comment

Choose a reason for hiding this comment

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

Hi @ny-huynh, @ptanhaxon, could you please check these comment?
Thank you!

.gitignore Outdated Show resolved Hide resolved
ups-connector-demo/src/UpsBean.java Outdated Show resolved Hide resolved
ups-connector-demo/src/UpsBean.java Outdated Show resolved Hide resolved
ups-connector-demo/src/UpsBean.java Outdated Show resolved Hide resolved
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Please check the tab indent and reformat this file.

ups-connector-demo/webContent/layouts/basic-10.xhtml Outdated Show resolved Hide resolved
ny-huynh and others added 2 commits January 5, 2024 11:18
Copy link
Collaborator Author

@ndkhanh-axonivy ndkhanh-axonivy left a comment

Choose a reason for hiding this comment

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

Hi @ny-huynh , @ptanhaxon , thank you so much for handle some previous feedbacks. and I also add new comments below, please check it.
Best regards

ups-oauth-feature/src/com/ups/auth/OAuth2Feature.java Outdated Show resolved Hide resolved
ups-connector/config/variables.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could you consider to remove the json hard code or give me your reason for this?
Thank you

Copy link
Collaborator

Choose a reason for hiding this comment

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

It is mock data for testing the connector

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry for the misunderstanding; of course, I know what it is. What I mentioned is moving the JSON values to a separate JSON file so that we could load it in this class. I see two advantages for doing this: first, it will avoid duplicate code, and second, the class would be cleaner.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I know, IMO the JSON is quite simple and it could be easy to read, I already separated the large one into a file so it's not a problem
As you can see the Twitter connector also does the same thing

ups-connector/config/rest-clients.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@ndkhanh-axonivy ndkhanh-axonivy left a comment

Choose a reason for hiding this comment

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

Hi @ny-huynh and @ptanhaxon , thank you for addressing our feedback in the last request. We have recently added new comments, so please take a moment to review them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @ny-huynh , could we add the error boundary for each rest client activity?
Thank you!

"callSignature" : "addressValidation",
"input" : {
"params" : [
{ "name" : "requestoption", "type" : "Integer" },
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @ny-huynh , could you please change the names of some variables that weren't good? For example, change 'requestoption' to 'requestOption'.
Please make similar changes for the remaining variables.

"reqOption" : "in.reqOption",
"version" : "in.version"
},
"resultType" : "com.ups.wwwcie.api.client.LOCATORResponseWrapper"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The name of variable type should be 'LocatorResponseWrapper'.

"clientId" : "392a25b1-ff85-48ae-95cb-44dddd4a876b",
"method" : "POST",
"queryParams" : {
"Locale" : "in.locale"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The name of param should be 'locale'.

refactor: change to normal property to avoid encoded the variable on rest client config
pom.xml Outdated
<groupId>com.axonivy.connector.ups</groupId><!-- your group id: e.g. com.axonivy.connector.<myconnector> or com.axonivy.utils.<myutil> -->
<name>ups-connector</name><!-- fill your product name -->
<artifactId>ups-connector-modules</artifactId><!-- fill your product name + a "-modules" postfix -->
<version>10.0.14-SNAPSHOT</version><!-- identicate your minimal compliant ivy version with the first 2 digits -->
Copy link

@nqhoan-axonivy nqhoan-axonivy Jan 9, 2024

Choose a reason for hiding this comment

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

please remove the hint in this pom? that hint supports we input the value after finishing we should remove it. Thanks! @ny-huynh

Copy link

@nqhoan-axonivy nqhoan-axonivy Jan 9, 2024

Choose a reason for hiding this comment

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

Please create a package for it, and follow up with your maven group id, e.g: com.axonivy.connector.ups
Thanks! @ny-huynh
Hints: Hi @ny-huynh could you help to check all files of project to make sure we have the right package name for them

xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<h:body>
<ui:composition template="/layouts/basic-10.xhtml">
Copy link

@nqhoan-axonivy nqhoan-axonivy Jan 9, 2024

Choose a reason for hiding this comment

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

please use iframe-10 template, thanks! @ny-huynh

regionalrequestindicator String #field
regionalrequestindicator PERSISTENT #fieldModifier
maximumcandidatelistsize Integer #field
maximumcandidatelistsize PERSISTENT #fieldModifier
Copy link

@nqhoan-axonivy nqhoan-axonivy Jan 9, 2024

Choose a reason for hiding this comment

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

this property name is not consistent with another name of this class, we have 2 styles inside 1 data class - camelcase and lowercase => please unify it. Thanks! @ny-huynh

@ndkhanh-axonivy
Copy link
Collaborator Author

Hi @andreasbalsiger, could you help to review this README file?
FYI this is the guideline for the ups connector.
Thanks!

@ndkhanh-axonivy ndkhanh-axonivy merged commit 22e899b into axonivy-market:master Feb 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants