Nestor Paredes
Tera Contributor

I had a requirement where, from a workflow,  I needed query the Group table based on values both on the form and the system properties.

 

I wanted to utilize a Script Include as there was an opportunity to reuse the code, but when I tried to call the script include from the workflow activity, it did not work, no matter what I tried.

 

The Script include:

find_real_file.png

 

This is an example of the code I was using in there:

var targetCab = "mbe";
// example: com.mufg.change_request.cab.mbe.change.management.group
var cmgSystemProperty = gs.getProperty("com.mufg.change_request.cab." + targetCab + ".change.management.group").trim();
var changeManagementGroup = new mufgCodeUtil().getSysID("sys_user_group", "name", cmgSystemProperty);

 

That ran no issues from Business Rules / Background scripts, so I tried to use it on the Workflow Activity:

find_real_file.png

...aaaaand it did not work; after that I tried different flavours:

find_real_file.png

But the problem persisted, it just would not run.

 

I tried changing the scope in the script include (both the workflow and the script include sit on the global scope), tried making it client callable, even deleted it and started over.

 

At the end, the my problem was that I was trying to call this from an Approval Group Activity and somehow it is not accepted.

find_real_file.png

 

I ended up loading the values I needed using a Run Script activity:

find_real_file.png

 

And then calling the value stored on the scratch pad from my Approval Group activity:

find_real_file.png

 

 

And that just works.

 

Hope it helps anyone that is experiencing the same issue.

N.

Version history
Last update:
‎06-15-2022 05:34 PM
Updated by: