Hey there.
I’m looking for opinions on extending workflows.
Goal: Generate job and job tasks from quote and line items when quote status is Accepted closed.
Situation: I’ve developed two custom modules Jobs and Job Tasks (simplified projects and project tasks). When quote status is set to Accepted then create a job using the quote detials (name, account description) and create a relationship to the quote. Then create job tasks from the quotes line items and create a relationship for each item to the job.
I’ve explored the workflow module and decided it can’t perform this level of complexity.
My questions are:
- Would the best approach be to use a logic hook on the AOW_Actions module to create a new action in the workflow module?
- Or create a logic hook for the Quotes module and use ‘after_save’?
- Or create an action in the Jobs module controller for example &action=generate_job &record_id=QUOTEID (probably my preferred approach)?
With option 3 I’d still need a way to trigger the controllers action after save.