I am currently developing a new solution in Broadcom Identity Manager 14.4.2, using Workpoint technology for workflows.
In practice, the client has asked me to add logic to the workflows so that a user cannot be both the requester and the approver of a role at the same time. For example, if I request a role for myself, then I must be removed from the list of possible approvers.
My plan is:
1. Create a support table in the Broadcom Identity Manager database
2. Write the requester's user_ID to this table every time a new workflow task is started (along with other information such as task_ID, timestamp, etc.)
3. From the Workpoint, in the process where I want to add my logic, I double-click on "Activity Properties (Process)" > Resources tab > select Any > in Exclude, I select "Select" > I create a new Script containing two statements:
I. an SQL query to retrieve the user ID from the support table in step 1
II. JS code to return the user ID of the user who must be excluded.
However, the Workpoint does not exclude that user_ID from the approvers. In practice, the workflow proceeds normally to all possible approvers (including the requester), but from Identity Manager it is not possible to approve the request, and the logs do not show errors, but this:

Where am I going wrong? Is it possible to get support on this?
Here is the JS code:
importClass(Packages.com.workpoint.common.logging.WPLogger);
importClass(Packages.com.workpoint.client.WorkItemEntry);
var logger = WPLogger.getLogger("com.workpoint.customWorkflow");
// or .error("my error")
logger.warn("**** STMT EXCLUDE WORKFLOW ***");
/*** BEGIN get current WF user ***/
//Get the IM Task Context
var imsId = ThisJobData.getUserData("ims-id").getVariableValue();
var envOid = ThisJobData.getUserData("ime-id").getVariableValue();
var tempWFCB = new Packages.com.netegrity.imapi.WorkflowCallbackHelper();
var workflowContext = tempWFCB.generateWorkflowContext(imsId, envOid);
var userid_requester = SymbolTable.getSymbol("userid_requester").getPrimaryValue();
Logger.warn("@@@@ userid_requester: " + userid_requester);
I also tried adding a "return true" or a "return userid_requester" to the last line, but i get an error with "invalid return"
Thank you so much for everything
Greetings
Andrea
-------------------------------------------