I figured out how to accomplish what I needed. And I guess my title wasn't completely on point.
The overlay in /apps does work. I thought it wasn't working initially, but turns out I wasn't editing what I thought I was editing. Anyway, here is more detail on what I was trying to do and how I did it.
Customize an Existing Task Dialog
In this case I want to add a new button to control the task next to the 'Complete' and 'Update' buttons. This is assuming I've already created a client library with JavaScript to handle the button click.
- Create an overlay in /apps for cq/core/content/projects/showtasks/uploadtaskdetails
- I created a package in my local instance of /libs/cq/core/content/projects and copied it into /apps in my Maven project
- Open /apps/cq/core/content/projects/showtasks/uploadtaskdetails/.content.xml for editing
- This is just editing Granite Touch UI nodes.
- In the XML, edit jcr:content > head > clientlibs and add your client library to the 'clientlibs' attribute.
- This will load your custom JS for this task.
- Now go to jcr:content > body > content > header > items > default > items.
- Copy the 'update' element/node, paste it at the end of the parent element 'items'. This should make a new sibling element to update and complete.
- Rename the new element 'stepback'.
- Change the text and title attributes to 'Step Back'
- Update the icon attribute to 'coral-Icon--undo'
- Update the formId attribute to a form that you will be using (defined elsewhere or maybe by your clientlib).
You can deploy this and will now have a Step Back button in the action bar. This will update existing workflows/tasks as well. [img]ProjectsCustomButton.png[/img]
Create a New Task Type
Not going to get into too much detail. The workflows for projects have a script that defined the tasktype. It usually looks like this:
task.setProperty("taskTypeName","dam:uploadphotoshoot");In this example, we're creating a new task type of 'dam:customtaskitem'
Now when you start a new Photo Shoot Workflow to a project, your new custom task will appear with your customized dialog.
This is what I got to work, and it didn't seem to have any negative side affects that I could see. I'd be open to any better/cleaner solutions if any.