How to make a processor available public accessible?

balu3
Kilo Guru

Hi All,

How can I make a processor available publicly?

 

I followed the instructions as per the link

http://www.john-james-andersen.com/blog/service-now/how-to-make-a-servicenow-processor-public.html

but is not working.

 

Thanks in Advance

Balu

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

You should only need 2 steps to make a processor public. 

1. Add a new record to the sys_public table that matches the path of the processor:
find_real_file.png

 

2. Make sure you've added the public role to the processor itself. You may have to add the roles field to the form:
find_real_file.png

Then you should get the output displayed:
find_real_file.png

I would check that the sys_public page is pointing at the processor path and not the name of the processor if they're different, and then that you also have the public role added to the processor.

View solution in original post

4 REPLIES 4

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Balu,

Could you describe exactly what is not working and validate that you've added the processor to the sys_public table?

Hi Brad,

 

I need certain information to be available via a URL publicly. And this information can be in various formats based on some conditions.

 

Well, there is another page (again publicly available) in the same instance where the user is asked for a couple of information. And based on the user input selection, a URL is generated which would also have certain information and the token (time expiry) added as parameters to it.

This URL is nothing but the URL to the processor. The parameters generated as part of user selection is used to get the format and the output contents.

So the processor also should be publicly available.

 

E.g.: Say the user selected file retrieval mode as input in the page, and the file as identified by a number, then the URL generated points to this processor along with the parameters as follows

Say https://<instance>.service-now.com/custom_processor.do?type=file&number=<file_number>&token=<expiry_epoch_timestamp>

When user clicks on this link, the file gets downloaded.

 

The functionality of the processor is not yet complete. But all of the existing seems to be working fine if the user is logged in.

 

If the user is not logged in, then upon clicking the link the user is prompted to enter the credentials.

 

Case 1: I added an ACL to the processor (name = CustomProcessor), and in the advanced script, I just had put

answer = true;

which means that the processor is accessible to all.

Result: The processor is not publicly accessible, and prompts the user for the credentials.

 

Case 2: Along with Case 1, I added the processor's path as publicly available page (page = custom_processor)

Result: Now upon clicking the user is redirected to the login page

 

Please assist and help me understand where I have gone wrong.

 

 

Thanks

Balu

Brad Tilton
ServiceNow Employee
ServiceNow Employee

You should only need 2 steps to make a processor public. 

1. Add a new record to the sys_public table that matches the path of the processor:
find_real_file.png

 

2. Make sure you've added the public role to the processor itself. You may have to add the roles field to the form:
find_real_file.png

Then you should get the output displayed:
find_real_file.png

I would check that the sys_public page is pointing at the processor path and not the name of the processor if they're different, and then that you also have the public role added to the processor.

Hi Brad,

Thanks for replying.

I didn't know that the processor had a field called roles. That was quite helpful.

Also the example you had given works fine.

 

The issue seems to be a little more complex in my case.

I wrote the initial version of this processor code a while back and hence kinda forgot about it. Well, there is another processor which does not have pubic access.

The public processor in majority of the cases just redirects to the other processor using (g_processor.redirect(redirectionLink);) and the output is generated by that processor.

We cannot make the other processor public because it has some functions along with this one, which will be a security breach if made public.

Looks like I need to redesign.

 

Thanks a lot

Balu