Creating scripts
The URL of the invoker script that is named invoker.jsp
is listed
separated by components, including the Product Master
application URL, the company code, and the name of the script.
An invoker script sends an HTTP response, with HTML content, to the client. The client is a web browser or a mail client so that an external client can start a particular URL. You can also use IBM® Product Master scripts to create an HTML page that is displayed on the screen when the script is called. For example, when you want to access a link embedded in an email. You can design the invoker script as an ASP or JSP script.
The following URL is used for the invoker script: http://localhost:8080/utils/invoker.jsp?company_code=<enterYourCompanyCodeHere>&bUserOutput=<BOOLEANtrueORfalse>&invoking_user=<username>/<enterCompanyCodeHere>&script=<enterTriggerScriptNameHere>
- Client, server, and request protocols
- Parameters that are passed
- Script context
- Script output
bUserOutput=false
, then only user-defined output is displayed.Some clean-up operations such as cleanUp() and dump()
are done in the secure_invoker.jsp
but not in invoker.jsp
. If you
need one of the mentioned functions, use invoker.jsp
or
secure_invoker.jsp
script that supports the function that you need.
You can run the secure invoker script in the same way as the invoker script.
Best practices
- You must make minimal use of the invoker scripts.
- You must allow only applications within the firewall to access the invoker script and prevent the invoker script from being accessed from the external IP.
Create a sample trigger script from the script console called helloWorld.
out.writeln(« Hello World »);
You can start the trigger script by issuing
the invoker.jsp
script:http://localhost:8080/utils/invoker.jsp?company_code=MyCompany
&bUserOutput=true&invoking_user=Admin/MyCompany&script=helloWorld