Managed to work this out today. So the process for getting a custom workflow to cooperate with work items queues is:
1) First problem. The Quality Order document is not available for selection in the work item queue. See below.
To fix this we simply need an attribute on the workflow document class. i.e
[WorkflowDocIsQueueEnabledAttribute(true, "Quality Orders")]
class InventQualityOrderWorkflowDocument extends WorkflowDocument
{
}
Now we can create a work item queue based on this document.
2) As described in my original question I was not able to see my waiting work items.
1) After looking at the datasources on this form for quite some time I tracked it down to being a problem with the WorkflowQueueDocumentCommonFields table not getting populated. The population of this table occurs when the class WorkflowQueueCreatedEventHandler is triggered by the Work Items Created Event being setoff in the workflow.
The answer to this was to create the following class:
class InventQualityOrdeTaskCreatedEventHandler extends WorkflowQueueCreatedEventHandler
{
}
protected void mapFields()
{
#Workflow
InventQualityOrderTable inventQualityOrderTable;
WorkflowDocIsQueueEnabledAttribute attribute;
DictClass dictClass;
dictClass = new DictClass(classNum(PurchTableDocument));
attribute = dictClass.getAttribute(#WorkflowDocumentAttribute);
inventQualityOrderTable = InventQualityOrderTable::findRecId(this.parmWorkflowWorkitemTable().RefRecId);
this.parmDocumentId(inventQualityOrderTable.QualityOrderId);
this.parmDocumentType(attribute.parmFriendlyName());
this.parmCompanyInfo(inventQualityOrderTable.company());
}
NB: This was based on classes\PurchTableTaskCreatedEventHandler.
This class extends WorkflowQueueCreatedEventHandler which in turn implements WorkflowWorkItemsCreatedEventHandler.
In order to trigger this event you must point the workflow tasks to the above class.
Find the task under AOT/Workflow/Tasks. Look for the property WorkItemsCreatedEventHandler. Put the name of your event handler in here. (in my case InventQualityOrdeTaskCreatedEventHandler).
Now this gets triggered when the work item is created, the WorkflowQueueDocumentCommonFields will be populated and the work items will show in home/Work Items/ Work items assigned to my queues
Hope this helps someone else in the future.