spring-zeebe icon indicating copy to clipboard operation
spring-zeebe copied to clipboard

Fixes #796 Adding provision to have a result enricher for workers

Open hem-verma opened this issue 1 year ago • 1 comments

We want to do additional processing on the incoming and outgoing variables of the worker before they can go into/come from SaaS. Adding the provision to have a custome result enricher.

hem-verma avatar May 23 '24 15:05 hem-verma

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 23 '24 15:05 CLAassistant

As seen in the screenshot, I have already agreed to the CLA but the same is not reflecting here. Not sure why. Any idea?

image

hem-verma avatar Jun 07 '24 09:06 hem-verma

I think @xomiamoore mentioned that the email address being used for the commit in the PR is different from the one being used to sign the CLA. Could you please verify this?

The commit comes from: https://github.com/hemantvermaa The PR is opened by (and most likely the CLA is signed by): https://github.com/hem-verma

jonathanlukas avatar Jun 07 '24 09:06 jonathanlukas

That is weird. Seems like I have two accounts or maybe I had an account but later used google account to login again. But the account which created the PR should take the priority. Right? Any other account should be able to push changes as a contributor to the PR. Do you know how this can be fixed?

hem-verma avatar Jun 07 '24 11:06 hem-verma

@xomiamoore provided this guide: https://docs.github.com/en/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user

Basically, you could amend and then redo your commit

jonathanlukas avatar Jun 07 '24 11:06 jonathanlukas

Thanks I will check. I have the changes ready as suggested by you. But I have question about the Unit test. Could you please indicate/guide how to write that. I am confused because there is no unit test for JobHandlerInvokingSpringBeans. and there are not many tests available in the zeebe-client module.

hem-verma avatar Jun 07 '24 11:06 hem-verma

The unit test should be able to prove that your configuration is applied so that the beans that depend on the new feature are created correctly.

Another thing is that the unit test should assert on the logic your code implements. This is trivial with the current approach, but a strategy for selecting a proper ResultProcessor for a JobWorker should be tested as well.

Also, customization options (like bean overriding) could be tested.

jonathanlukas avatar Jun 07 '24 13:06 jonathanlukas

May I ask if there are existing examples in the repo for testing the implementation for ParameterResolverStrategy? It will help me in understanding how much to test for ResultProcessor. I could not find anything in the folder src/test/java/io/camunda/zeebe/spring/client

hem-verma avatar Jun 07 '24 14:06 hem-verma

Closed this PR because of wrong account (mistakenly) being used for commit. Created a new PR with correct account. https://github.com/camunda-community-hub/spring-zeebe/pull/833

hem-verma avatar Jun 10 '24 19:06 hem-verma