You are not one of the possible agents of task 'WSxxxxx'
SAP Workflow configuration of Agent Assignment for task attribute as "General Task" or "no general task" option can cause error during execution of the Workflow using ABAP SAP_WAPI_START_WORKFLOW function module.
You are not one of the possible agents of task 'WS90900061'
While debugging an ABAP application where a SAP Workflow was called using SAP_WAPI_START_WORKFLOW ABAP function module, I see that although sy-subrc is initial I got an informative message "You are not one of the possible agents of task 'WS90900061'" within the returned message_lines table parameter.
Here is the ABAP code block where I call SAP workflow item using SAP_WAPI_START_WORKFLOW function module.
This message informs me about the real reason which causes workflow to execute successfully:
You are not one of the possible agents of task 'WS90900061'
In order to correct this issue, follow the below listed steps:
Open the related workflow using SAP Workflow Builder.
Use SE80 transaction, display related package.
Then open node Business Engineering > Workflow templates
The target workflow will be listed under the workflow templates.
Double click on the workflow to display details.
When the Workflow template is displayed, press Workflow Builder button on Basic data tab.
When SAP Workflow Builder is displayed on the screen for the related task, follow the below menu path.
"Goto > Basic Data (Ctrl+F8)"
When the work item data is displayed, again using menu selections follow:
"Goto > Agent Assignment for task (Shift+F9)"
This selection will display "Maintain Agent Assignment" screen.
Press on "Attributes..." button from top menu.
Change Task information from "No general task" to "General Task" and press Transfer button to complete the error correction process.
After above steps are completed and task is saved as general task, when you execute the workflow MESSAGE_LINES will not include an error data like returned at first as "You are not one of the possible agents of task 'WS90900061'"