Sequential, Asynchronous Workflow in Laravel - Help

I'm creating an application that requires defining a number of Sequential, Asynchronous Workflows in Laravel, where each workflow would be triggered, have multiple long-running steps, require ability to send a request to external servers and wait for those servers to ping back, etc. The status of those tasks needs tracked in the DB.

I've created a writeup with pseudo code to help break down my needs:

Could I get some input from folks who are more well versed in advanced architectures in Laravel to help figure out the best way to approach this? I would be hugely appreciative, as I've spent quite a bit of time trying to figure out a good way to do this, but I keep running into pain points and areas that would be hard to unit test.

mguinea replied 1 year ago

Hi zlanich!

I have not enough experience with workflow management in Laravel but I've tried to implement it in a simple way.

In my application, I receive a csv file which must be parsed, validated and ingested in database.

What I've done is an scheduled command that reads the storage path. When finds the file, move it to an internal folder and create a new row in DB. With that row I manage different status (ingested, parsed, validated..).

A second command checks the table that contains the file and executes what is required and update the status.

I know that using scheduled tasks is not the best way to manage that but could be possible using a combination of scheduled tasks and queues...

There is an option that I don't know in detail but I think it's possible to integrate some BPM engine like Activiti with Laravel using its API.

Djidain replied 1 year ago


Did you find how to integrate Activiti with Laravel, please ?

renaudham replied 1 year ago

Calling this

Of course it requires coding to integrate your workflow in your app but if you do it well you wil be able to call different worflows configs for different results

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us