Solved

Variables in Json Call debug filename?

  • 8 April 2024
  • 3 replies
  • 30 views

Userlevel 3
Badge +1

I know that it is possible to use variables in filenames in a Text Writer (see here: Text File Writer: adding a datetime as suffix to an output file (ataccama.com)). But what about the Request and Response Debug File in a Json Call?

I have a component for ServiceNow integration and I want to reuse another component to retrieve incident details. But when I run the main component I get this error:

File file://d:/Ataccama/workspace/SNOW/distribution/debug/03_getincdetails_request_debug.txt must not be multiplicatively accessed in writing mode.

The only way to get it all working, is by removing the Request and Response Debug File in the Json Call that gets incident details. A possible way around this would be if I could use variables in the filenames. But this does not seem to work in the same way that variables work in Text Writer steps (by putting the variable name between { } ).

Is there another way?

icon

Best answer by joyce 8 April 2024, 19:24

View original

3 replies

Userlevel 3
Badge +2

Hi @Marcel-Jan! You can parameterize the Request & Response Debug Filenames so that they’re labelled differently when you’re calling the ServiceNow Json component. In the Json Call step, right-click the Request Debug/Response File > Map As Parameter & label the parameter. When the Json component is used in another plan, you’ll be able to pass in the desired file path and name under Parameters. I’ve attached example screenshots & zip where the new_plan.comp and new_plan_2.comp uses the json_call.comp but has different debug request/response filenames. From the screenshots, the debug folder has different request/response filenames which match what’s defined in the parameters. To test the components, in the json_call.comp Json Call step - input your ONE GraphQL URL. Let me know if you have any questions!

 

 

Userlevel 3
Badge +1

I didn't expect that this and so much more could be parameterized this way in a Json Call. Good to know.

It works for me.

 

Userlevel 3
Badge +2

Yes! Components support parameterization for columns within steps. You can create a generic component and parameterize certain columns so that the component can be used in various places (i.e. pass in customized parameters based on each use-case). 

Reply