Workflow per module, how many can I set up on 1 module

We arecurrently setting up Workflows and they are working well, but when I try to add a Workflow to a module that already has a workflow operating on it the second Workflow shows ait is running be never completed. Can a second workflow operate on a module with a previous workflow set up on it, I am using a different field to trigger the second workflow, I have also tried to add a secound action and again it does not work when the conditions are met.

Any help please
Ken

Hey Tock,

hmmm, as far as I’m aware, there isn’t a cap on Workflows per Module
So I think id would be something else that’s causing this issue

From personal experience, when a Workflow is stuck at “running”, I’ve found it is due to an Email action that has failed
Does your workflow have any Email actions?


It might also be worth checking the “Process Workflow Tasks” Scheduled Job
Is this running sucessfully? (ie: The “Last Successful Run” value is updating each time it completes)


If we can’t figure it out, it could be worth posting screenshots of the Conditions/Actions of your Two workflows, to see if we can replicate
(If that’d be alright?)

Hi John,
The workflow has no email actions, please see screen shot:


the is a similar workflow that is working:

They are both running off the same Module but with different conditions, I had tried with the same condition and both actions in the same workflow, but only the first action would work. Thanks
Ken

Hey

Thanks for the screenshots!

Hmmm, i can’t see anything from those that would cause any issues…


Did you get any errors in the SuiteCRM error Log or PHP error log at the time of running?

Are there, maybe, any Workflows on either the “ASSESSMENT INFO” or “PAYMENT INFO” modules that link back to “COURSE DETAILS”?

If so, could there be a Workflow loop?
(Where One workflow triggers another, that triggers this one again, and so on)


If there are no loops, and it is still showing as “Running” and not Failed/Complete, then it might be worth clearing that run out of the Database to see what happens

If you have Database access, you can go to the “aow_processed” table, and search for a record where
“status” = “running”, and delete it.
(Or, alternatively, set it to complete)


Does your workflow then work as intended, without this item being stuck at "Running"? (Note, The workflow won't fire on the same record twice, as "Repeated Runs" is not checked)

Or do you get another “Running” record on the next run?


Also, as an aside, I’m not 100% sure on the configuration of your Modules
However, It looks like your Conditions will make it so that the Workflows always fire
Is this the intention?
(If so, all good!)

  • No Error in the SuiteCRM error log
  • Neither module link back to Course details with a workflow.
  • I Cleared the Running processes in the view process Audit.
  • Repeat Run Checked, Running record on the next run.
  • Yes it is my intention to always run.
    I have set up a work flow to creat a course record from the Student registration record and this inputs the Student number into the Course Details, I then go in to the course Details and add information and on save it creats the Payment record triggered by the inputting of the Course Name in the Course Name Field manually, I have triggered the Assessment creation off the inputting of the Course Category in the relevent field in Course Details. If I create a Course Details with out the initial workflow from Student Registration it creats a Payment and Assesssment Record as required. If I make the Payment Workflow inactive it creates the assessment record but once I turn the Payment workflow back on the assessment workflow goes back to Running status.

Thanks Ken

Hey

Hmmm, interesting
So if you set that Student Registration->Course Details workflow to “Inactive”
Then your Course Details ->Assessment Info works fine?
Nice find!

Would you be able to pass over a screenshot of this Workflow?
Perhaps there’s something that’s causing issue, that could simply be down to the order of events?


It might also be worth lowering the SuiteCRM Error logging level, to either ERROR or DEBUG
(Done in Admin->System Settings)

Then trying the Workflows again
(Once with the Student Registration workflow Active and again with the Workflow set to Inactive)

Do you get anything notable in the SuiteCRM Error log then, around the time that the Workflows should run?

(Or any notable differences in the DEBUG logging when the Student Registration workflow is Active/Inactive)

Hi John

Please see screen shots of the Course details Workflow, I have it inactive in the images as I am running the test with it on and off.



will update you on the logs after I test.

Thanks
Ken

Hi John,
Please see error report:
Fri Mar 12 11:55:08 2021 [245][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] Caught error: stat(): stat failed for upload/import/status_1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07.csv
Fri Mar 12 11:55:08 2021 [245][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] Caught error: touch(): UploadStream::stream_metadata is not implemented!

Thanks
Ken

Hi John
More Debug logs:
Fri Mar 12 12:56:51 2021 [280][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] Loading import map properties.
Fri Mar 12 12:57:05 2021 [249][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] Caught error: stat(): stat failed for upload/import/status_1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07.csv
Fri Mar 12 12:57:05 2021 [249][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] Caught error: touch(): UploadStream::stream_metadata is not implemented!
Fri Mar 12 13:23:58 2021 [284][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] Loading import map properties.
Fri Mar 12 13:24:17 2021 [284][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] Caught error: stat(): stat failed for upload/import/status_1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07.csv
Fri Mar 12 13:24:17 2021 [284][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] Caught error: touch(): UploadStream::stream_metadata is not implemented!

Hi John,

More errors:
Fri Mar 12 14:30:00 2021 [277][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] Loading import map properties.
Fri Mar 12 14:46:14 2021 [290][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] Caught error: stat(): stat failed for upload/import/status_1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07.csv
Fri Mar 12 14:46:14 2021 [290][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] Caught error: touch(): UploadStream::stream_metadata is not implemented!
Mon Mar 15 08:08:33 2021 [288][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] DEBUG: token already sent
Mon Mar 15 08:29:54 2021 [286][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][FATAL] SugarBean::populateDefaultValues $field_defs should be an array
Thanks
Ken

Hi John,

I tried to trigger the workflows from a different approach, I activated the initial Course Detail creation and changed the Payment creation to activate on New Records and when I edit the Student Reg it triggers the course details and that inturn trigger the Payment creation both work and records are created. I tried to setup a trigger on Payments Creation to create a new Assessment record when a new Payment Record is created but it caused both the Payment and Assessment workflow to go into the Running status.

I had to try another way as the previous method of directly creating the course Details was working but it has stopped working now.

Thanks
Ken

Hi John

More errors from the Assessment workflow:
Mon Mar 15 09:16:32 2021 [290][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][ERROR] fromUser: Conversion of 2021-03-15 09:06:58 from user format d/m/Y h:ia failed
Mon Mar 15 09:16:32 2021 [290][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][ERROR] fromUser: Conversion of 2021-03-15 09:16:30 from user format d/m/Y h:ia failed
Mon Mar 15 09:16:46 2021 [286][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][ERROR] fromUser: Conversion of 2021-03-15 09:06:58 from user format d/m/Y h:ia failed
Mon Mar 15 09:16:46 2021 [286][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][ERROR] fromUser: Conversion of 2021-03-15 09:16:45 from user format d/m/Y h:ia failed
Mon Mar 15 09:17:13 2021 [293][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][ERROR] fromUser: Conversion of 2021-03-15 09:06:58 from user format d/m/Y h:ia failed
Mon Mar 15 09:17:13 2021 [293][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][ERROR] fromUser: Conversion of 2021-03-15 09:17:11 from user format d/m/Y h:ia failed
Mon Mar 15 09:17:20 2021 [283][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][ERROR] fromUser: Conversion of 2021-03-15 09:06:58 from user format d/m/Y h:ia failed
Mon Mar 15 09:17:20 2021 [283][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][ERROR] fromUser: Conversion of 2021-03-15 09:17:18 from user format d/m/Y h:ia failed
Mon Mar 15 09:18:21 2021 [291][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][ERROR] fromUser: Conversion of 2021-03-15 09:06:58 from user format d/m/Y h:ia failed
Mon Mar 15 09:18:21 2021 [291][1831297b-6ad8-9a9b-e0a0-5fdb6f88fa07][ERROR] fromUser: Conversion of 2021-03-15 09:18:19 from user format d/m/Y h:ia failed

Thanks
Ken