Initiator is a test ID
My workflow requires that the initiator is a security test ID (the user uses this to login so sy-user I believe becomes the test ID) which is required for security reasons to limit approvals of the objects for which the workflow is designed. The workflow design also requires that a confirmation is sent back to the initiator. Since the initator is a test ID the workflow will not be able to find an actual user. I thought of creating a custom table where the test ID is linked to an actual user and then inserting code in a method attached to a standard task and change wf_initiator........please advise if this is the recommended way to do it and how or are there other ways?
I'm still not sure I understand what you're doing but it's a relief to hear that this is not for Production.
In most sites the Test system is a copy of Production (which is very useful) so you can just use the userids that you would use in Production. You just have to maintain a messy spreadsheet of passwords and authorizations.
I would not go and create special methods just for testing.
But anyway - if you did want a method to translate user X to user Y then you would make that a method of a class or a BOR object. The workflow would call this; there is no actual programming within a workflow unless you could loops and conditions.
To reiterate: I don't see why you need to do what you're suggesting. Have basis copy the org structure from Production and use that instead. Sorry if I've misunderstood.