We are having a requirement where we need to restrict the users to whom a workflow has to be forwarded.The restriction and validation would be based on the spendlimit which has to be checked from a Z table.
We have tried the following,
1) Implement the Program exit in the workflow corresponding to the forwarding functionality which is not getting called! with method Before_execution of Interface IF_WAPI_WORKITEM_CONTEXT.
2)enabling general forwarding not allowed in the workflow along with rule and role logic. But we could not use it as we have BADI which gives us the next agent assignment. The rule over-writes the BADI logic. So we couldnt use this.
Can anyone suggest what else we could try in the option 1 or any other suggestions.
Thanks in advance!