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

Clarification on Activity usage and other best practices #1065

Open
CrineTech opened this issue Jul 7, 2022 · 0 comments
Open

Clarification on Activity usage and other best practices #1065

CrineTech opened this issue Jul 7, 2022 · 0 comments

Comments

@CrineTech
Copy link

Hi, i'm working on an order processing workflow and there are 2 particolar things

  1. if some step dedect an invalid or incoerent data while processing, it needs to "trigger" an user intervention. I would like to do this by "pausing" the step returning ExecutionResult.WaitForActivity object.

The problem is that i need to make an ui panel where user can see all open actions of those kinds. Without reading them directly from database, it seems impossible to get a list of "pending activities" to le the user pick and process one of them, they seems to be thinked to be a sort of external processing queue and they're accessible only once at time.

I can also go throught User Task route, but it seems impossible to trigger it from within a step, moreover, to obtain a list of all the tasks i will need a list of all "non completed" workflows. I can obtain this with the GetWorkflowInstances of IWorkflowRepository, but it is marked as obsolete.

  1. Some actions cannot be performed by the single workflow step, they need to be executed in batch. This is because i've to interact with some external API that allows for batch processing but have low limit request rate. I'm planning to schedule an external task to perform those actions, but i will be forced to pull them once at time using the GetPendingActivity. Is there any way to get a PendingActivity list (up to x activities)

By looking at the Activity code, i think that there is also a possible bug. When GetPendingActivity gets called, the ExternalTokenExpiry is set to DateTime.MaxValue. In this way, if for some reason the activity process goes bad, it will never be taken again.

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

No branches or pull requests

1 participant