BPT - In Auto Activity or In On Close ?

BPT - In Auto Activity or In On Close ?

  

HI there,

Say i want to produce topic to a Kafka, is there a difference to put it in Auto activity vs in On Close of Human Activity? Which one is better?

regards

Hi Pasar.

Can you describe the flow you're trying to implement since the description is too vague?

To use second you'll always need to have a dependency on a previous human activity, the automatic won't. 

This can be your specific use case, but there's no way better than another since its usage will always depend on your own business rules.

You can read more about both at:

Cheers,

GM

Hi Martins,

Here is the case:

- after a human activity, there is an independent call to kafka framework.

- I have two choices to put that kafka producer: either in the on close human activity or in an auto activity after that human activity.

In where is better to put it for best practice?

regards,

thank you

Hi Pasar.

After that human activity being closed do you still need some feedback from the call to your kafka framework?

If not, you can use the on close and that way avoids more workload on your db with the creation of new activities.

If you need some feedback from the external framework, you should use a Wait on your process and after that feedback being received, just use the Automatic activity.

Cheers,

GM

Hi Martins,

Thank you. I do not need to consume, just produce.

In the close activity there is another transaction (not kafka), just history, and there is possibility that Kafka raise an exception. What is "hidden" error is that the history transaction is not committed, so be ware!! just commit before we produce Kafka.

--- history transcation

-- COMMIT_TRANSACTION

-- produce kafka

-- end

Now, i am thinking the future.. just in case there are changes in the BPT.. that possibly cause impact analysis.. which one is better between both?


regards,



Hi Pasar.

After your additional information, I would use the on close of the human activity.

Cheers,

GM

Hi Martin,

I still have some questions in doubt:

1. I close the human activity using API

2. In On Close human activity, say it there is an exception raised by kafka, what will happen? Will it start from the beginning of code in the On Close activity (that means i reinserted unexpected more records) or else?

thank you