Adding New Workflow Actions in Enquire MAP
Model/Migration
- Run the generator to create the new model and migration rails g active_record:model WorkflowAction workflow_action:references attr1:string attr2:string etc
- Add in the t.userstamps and track_who_does_it
- Add in the association to models/workflow_action.rb and the action type rake db:migrate
Views
- Add icon to drag and drop, give it a unique css class workflows/_actions.html
- Add section with edit fields for the actions fields: workflows/_prop_action.html
- Add call to js to put saved actions onto the workflow UI: workflows/_setup_script.html
Assets
- Add the "create_action_" function to load a saved action onto the workflow UI: javascripts/workflows.js
- 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
- Update models/workflow.rb to create/update/delete the new action when necessary
Backend
- 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
Feedback sent
We appreciate your effort and will try to fix the article