Has anyone had any experience invoking a child script in Automation Scripting?
Here's my test case (18.104.22.168):
Parent script passes a string variable representing a series of security groups "'AP-Manager','VP_ACCT','BUYER'" to the child script which returns a boolean value back to the parent based the logged in user's membership in of one of the groups.
I can do the logic in the child script, I just can't figure out a way to invoke it from other scripts that need to do this validation. I've attached the logic as a txt file (It works).
If anyone can help, thanks. If not, thanks anyway.
This topic has been locked.
4 replies Latest Post - 2013-03-22T17:16:32Z by SystemAdmin
Pinned topic Child script
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-03-22T17:16:32Z at 2013-03-22T17:16:32Z by SystemAdmin
SASHULL 270003PYB8261 PostsACCEPTED ANSWER
Re: Child script2013-03-22T02:35:05Z in response to SystemAdminBased on the requirements, I don't know of a solution but know that it would be of huge value to enable that level of functionality (like a subprocess in a workflow). We've thought about how we could create custom Jython libraries to do some data validation that we could import at script runtime but it wouldn't be able to take advantage of the Maximo framework like your script needs (it'd be more for validating data such as values are in proper phone format, IP Address format, etc.).
I'm going to spend some time testing this scenario out but it may need to be an RFE. I'd be curious if anyone else has ideas.
Re: Child script2013-03-22T12:06:37Z in response to SASHULLThanks Steven, I was getting to the same place pulling out my hair. I may end up working toward a class that would be able to behave like its own launch point for other scripts. I'll let you know where I end up.
JC_Wilson 270002CDKB4 PostsACCEPTED ANSWER
Re: Child script2013-03-22T15:03:53Z in response to SystemAdminHi Brian,
Check out the jython examples for TSRM here. There is a script called ScriptExecutesScript found here. It's an older style script so you will need to make adjustments to it like replacing scriptHome with mbo. If you read it, you can plainly see that all you are doing in bringing in the code of the child script and executing it within the parent script. So, any variables available in your parent script will be available in your child script.
Good Luck and please post your progress and code (if you are allowed to).