The createWorkorder logic is not generic code. This method is defined for TICKET & WORKORDER based objects in their java classes to handle all the necessary logic of creating the WO and setting values from your core object. You would have to write this logic yourself for your custom object and may hit issues because the related record functionality was designed with ticket & workorder based objects in mind.
If you're just trying to create a WO (not invoke the standard follow up/originator logic), just open a new set to WORKORDER and create a new record like:
woSet=mbo.getMboSet("$ADDWO","WORKORDER","1=2")
woMbo=woSet.add()
And then set your values as needed.
------------------------------
Steven Shull
IBM
------------------------------