A workflow doesn't run

Hello guys

I’m facing a weird issue with workflow
I have a workflow that’s run after create
it creates a new record in a different module

when I run the workflow manually everything works fine
but when I create a record so the workflow will run automatically sometimes it runs correctly sometimes it doesn’t
For example, if I create 20 records I should see 20 records in the different module but the reality would show only 14 or 16 records

the thing is when I check the sessions I don’t see a failed workflow !!
I don’t know how would I debug the issue, any ideas ??

I’m really stuck here, my only reliable option is to do it from the API

Do you see any errors in the action log in the admin panel?
Did you create those 20 records by hand (one after another) or were they generated by another workflow?

Usually, we run such worfkows on before create instead of after create – just in case something goes wrong you are notified about it on the spot.
Does it work if you switch to before create?

@tjerman thanks for your reply

  • no, there is no error message in the action log.
  • I create those records from the API using bulk create .
  • unfortunately, the before-create trigger doesn’t work for me

as I said, I’m using the API to create the records > 50 records at a time
I even tried to create 1 reacord at a time but same issue

my sample records range from 500 to 1000

Alright; let me see if I can get this reproduced on my machine; I’ll assume the latest 2021.9.7 version was used

On 2021.9.7 a (probably) simplified version of what you’ve described worked fine – everything got created and all workflows got executed.

A few potential things that come to mind:

  • Are you using the latest version? If not, does updating it resolve the issue?
  • What are your server specs? Perhaps the server is terminating long-running processes or it’s dropping the request?
  • Do you get any errors in the HTTP response?
  • If you have a larger configuration, perhaps some other triggers also execute and there could be some awkward execution (cycle) that would cause issues. Try throwing together a diagram of your system – what events trigger what and see if something is off.

I don’t think I can do much more without a reproducible environment on my end :confused:

Could you elaborate more on this one? Is it erroring out or just not happening?

@tjerman

first of all, I’m using corteza VERSION=2021.9
I have a lot of workflow triggers (maybe that is the issue)
for example, I have modules A, B and C
each record in module A has about 50K records in module B and each record in B has about 100 records in C
and I have a workflow that runs after record A has been created or updated
and the workflow will update the corresponding records in B and since B records have changed, new workflow triggered to update C records
so too many triggers!!

regarding you points

  • 2021.9 > I’m waiting for your latest release
  • AWS t2-large > I’ve changed the timeout-gateway to 15 mins >> I’m not sure how to check if the server drops requests (can you share a link explaining that?)
  • no, because all the records have been created successfully
  • I’m sure, no cycle in my workflows

regarding before-create
I don’t wanna go there because it’s a specific business case

how can I give a clone of my corteza instance?

Please update to either 2021.9.7 or 2021.9.8-rc.2.
If it still doesn’t work there, we will debug it further.

@tjerman we are moving from Airtable to Corteza, and we’re halfway there, and I wouldn’t risk the transition with updating the platform
but I expect from next quarter, I’ll be able to update it and I hope with the new release (when do we expect it though?)

The next release (2022.3) is expected to happen at the end of this month/start of next month

1 Like