Adding New Workflow Actions in Enquire MAP

Modified on Fri, Dec 15, 2023 at 1:33 PM

Adding New Workflow Actions in Enquire MAP


 


Model/Migration



  1. Run the generator to create the new model and migration                                                            rails g active_record:model WorkflowAction workflow_action:references attr1:string attr2:string etc

  2. Add in the t.userstamps and track_who_does_it

  3. Add in the association to models/workflow_action.rb and the action type rake db:migrate

  4.  


Views



  1. Add icon to drag and drop, give it a unique css class workflows/_actions.html 

  2. Add section with edit fields for the actions fields: workflows/_prop_action.html 

  3. Add call to js to put saved actions onto the workflow UI: workflows/_setup_script.html


 


Assets



  1. Add the "create_action_" function to load a saved action onto the workflow UI: javascripts/workflows.js 

  2. Edit the setup_action_properties function to setup the new action when it's dropped onto the workflow                                                                                                                                        matrix first index should match attrs variable from workflows.rb      stylesheets/workflows.css: add css class from _actions.html


 


Saving



  1. Update models/workflow.rb to create/update/delete the new action when necessary


 


Backend



  1. Update lib/workflow_engine.rb: execute_action to execute the new action type


 


 


Please reach out to the dedicated Enquire Account Manager or Enquire MAP Support team for further assistance.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article