Well, the workflow objects/classes usually call BAPIs or classes of the relevant module, lets say you have no active workflow, can you set the relevant status using a function module/class?
If you can, you can create a workflow task calling the same function module/class method and add it to your workflow.