Flow Action is NOT able to access HR Case related fields

Rahman3
Tera Expert

Hi there,

We are having an issue when processing the HRSD Live Cycle Event case through the flow. Our configuration is as follows:

  • Live Cycle Event Activity - called IT Account Disable Process
  • Live Cycle Event Activity is configured to call a Catalog Item (standard catalog item)
  • The Catalog Item has been configured to use a Flow Designer (standard flow) 

Please see below ...

The Flow has a few Actions and one of the Actions is trying to read the HR case-related fields through the RITM Request. The request has HR case as Parent. If I test the Action individually it works fine and outputs the result as expected. But when running the Action through the Flow, it raises an error "Error: Cannot read property "u_ad_account_name" from undefined,Detail: Cannot read property "u_ad_account_name" from undefined". For example, this line of code fails: 

outputs.ad_account_name = inputs.hr_case.subject_person.u_ad_account_name;

Somehow subject_person is undefined when running through the Flow. But when running the Action it runs ok.

What is possibly causing this? Has anyone else had this issue and what the solution was?

 

Many thanks

find_real_file.png

4 REPLIES 4

Muralidharan BS
Mega Sage
Mega Sage

Hi,

Check if the flow is run by "user who initiated session" if so change it to "system user" and give it a try. 

Thanks

Tom Sienkiewicz
Mega Sage

Perhaps the flow is not passing the inputs to the action in a correct way?

Another thing, maybe the flow is executed as a different user/with different permissions, than the action you are testing. Usually the flow runs as the user who initiated the session. Perhaps you need to change that to system user, or add elevated permissions to the flow.

Thanks for the response guys. I have tested with both Run as user who initiated and also the system user and both have same issue. In fact I am thinking that the System user doesn't have HR specific roles and that is why it is not working? Also, the flow is passing correct input because I can read case number and short description - thinking because they are Task related fields? What system user the flow is using? Is there a way to add specific roles to that context?

I think you would need to check the ACLs for those specific tables/fields and see if there are any "special" HR roles required. 

There's a way to add any roles to a running Flow in FD - see here:

https://docs.servicenow.com/bundle/sandiego-application-development/page/administer/flow-designer/ta...

BUT - this is strange if you say that even a flow running as "system" user has those issues - system can access everything. So the problem might be elsewhere. Make sure to check if proper values are indeed passed to the action in your flow from the trigger.