samples-java icon indicating copy to clipboard operation
samples-java copied to clipboard

Example for tasks interaction

Open antmendoza opened this issue 1 year ago • 11 comments

What was changed

Why?

Some users look into Temporal as an alternative to BPM tools, like jBPM or Camunda. One common question is how to deal with HumanTask. This example shows a basic implementation to track task state

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

antmendoza avatar Dec 26 '23 10:12 antmendoza

hey, sorry still reviewing. ty for doing this sample!

tsurdilo avatar Dec 30 '23 04:12 tsurdilo

no hurry @tsurdilo

antmendoza avatar Jan 01 '24 09:01 antmendoza

hi, is there any outstanding things to be done on this pr? thanks

tsurdilo avatar Feb 12 '24 00:02 tsurdilo

Hi @tsurdilo this is on me, I have to remove the getOpenTask method

antmendoza avatar Feb 12 '24 11:02 antmendoza

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: tsurdilo
:x: dependabot[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Apr 30 '24 06:04 CLAassistant

This is ready to review @mfateev @tsurdilo

I have created a new workflow that manages the task lifecycle with which the initial workflow interacts.

antmendoza avatar Apr 30 '24 06:04 antmendoza

I like it, this is a nice sample to have.

joshmsmith avatar May 24 '24 16:05 joshmsmith

Had a bit of a hard time following example code as in the whole time was thinking this would be good to have as a reusable interceptor that can be just applied to any workflow. Also would be nice to incorporate visibility into this as to be able to know how many workflows are running that have pending tasks and at which stage of approval process they are. wdyt?

tsurdilo avatar May 26 '24 03:05 tsurdilo

Approving this as think its good sample, just see previous comment about it being bit hard to understand / follow.

tsurdilo avatar May 26 '24 03:05 tsurdilo

Thanks @tsurdilo

just see previous comment about it being bit hard to understand / follow.

Let me see if I can refactor it / make it simpler

Also would be nice to incorporate visibility into this as to be able to know how many workflows are running that have pending tasks and at which stage of approval process they are. wdyt?

👍

antmendoza avatar May 26 '24 08:05 antmendoza

@tsurdilo I have refactored the code and added some comments

This is the commit https://github.com/temporalio/samples-java/pull/567/commits/b2a4f67a7a636c081179dec9179dd9606d5a417d

let me know if you find it easier to follow now thanks

antmendoza avatar May 29 '24 08:05 antmendoza