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.
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
StevenShull 270003PYB8504 Posts
Re: Child script2013-03-22T02:35:05ZThis is the accepted answer. This is the accepted answer.Based 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:37ZThis is the accepted answer. This is the accepted answer.
- StevenShull 270003PYB8
JC_Wilson 270002CDKB4 Posts
Re: Child script2013-03-22T15:03:53ZThis is the accepted answer. This is the accepted answer.Hi 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).