Tadeu Augusto Dutra Pinto,

Yes it is correct to use try/catch in the script

Also, don't forget to include import com.remedy.arsys.api.Value; at the
beginning of your script as the parameter(s) you pass in are of type Value.
You may or may not need to also include import statements for others as
needed by your script.

Happy coding...


Eric Roys
Sr. Software Engineer
Verizon Business

CONFIDENTIALITY: The information contained in this message and any
attachment may be proprietary, confidential, and privileged or subject to
the work product doctrine and thus protected from disclosure. If the reader
of this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please notify me immediately by replying to this
message and deleting it and all copies and backups thereof. Thank you.


-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Tadeu Augusto Dutra Pinto
Sent: Tuesday, October 02, 2007 12:23 PM
To: arslist@ARSLIST.ORG
Subject: RES: How to use "ARS Scripting Plug-in for JAVA" ???

Hy Everyone,
 
Thank you very much for the answers...
Specially thanks to Eric Roys and Carey M. Black...
 
 
Now, I have another question about Filter API.
I'd like to know if I can put Java Method Calls in Script body??
It's correct put try/catch block in Script??
 
Some like this:
 
int result = 0;
 
try
{
      if (values.length() != null)
      {
             if (values.startsWith("1"))
                     result = validateOne();
             else if (values.startsWith("2"))
                     result = validateTwo();
             else if (values.startsWith("3"))
                     result = validateThree();
       }
       return result;
}
catch (Exception e)
{
       return result;
}
 
int validateOne (String str) throws Exception
{
        // code that returns an "int"
}
 
int validateTwo (String str) throws Exception
{
        // code that returns an "int"
}
 
int validateThree (String str) throws Exception
{
        // code that returns an "int"
}

Is this script code functional ???
 
Thanks-in-advance...
 
 
Tadeu Augusto Dutra Pinto
-----------------------------------------------------------------
IT Web Services ATM 
Cinq Technologies
http://www.cinq.com.br 
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Fone: 41 3018-2833 - Cinq
Fone: 41 3340-5736 - HSBC
-----------------------------------------------------------------
Confiabilidade, Inovação e Qualidade em T.I.
 
________________________________

De: Action Request System discussion list(ARSList) em nome de Carey Matthew
Black
Enviada: ter 2/10/2007 00:23
Para: arslist@ARSLIST.ORG
Assunto: Re: How to use "ARS Scripting Plug-in for JAVA" ???



Look at the form "Java Scripting Test" and specifically the filters
"Java Scripting:Get Script Code, Plugin, and Language" and "Java
Scripting:Execute".

Basically, the "Filter Script Library" form holds data records that
are feed into the ARF (AR Filter) plugin via the Filter "Java
Scripting:Execute". The action can be done from any form. (So the
filter does not need to be attached to the "Java Scripting Test"
form.) You need to supply the action data that looks like the data in
"Filter Script Library". Only the Java code needs to do what you want
it to do. :)

In sort, the plug in takes these inputs:

1) The Java code ( as a string )
2) Language (the string "Java" in this case)
3) The first argument that will be passed into the Java code (input #1)
4) The next argument that will be passed into the Java code (input #1)
5)  The next argument that will be passed into the Java code (input #1) ....

Hope that helps.

--
Carey Matthew Black
Remedy Skilled Professional (RSP)
ARS = Action Request System(Remedy)

Love, then teach
Solution = People + Process + Tools
Fast, Accurate, Cheap.... Pick two.


On 10/1/07, Tadeu Augusto Dutra Pinto <[EMAIL PROTECTED]> wrote:
> **
>
>
>
> Hi,
>
>
> How I can use these plug-in to create a Filter that executes a script ??
>
> On "Form Name" field (at Basic tab) I'll select the "Filter Script
Library"
> or another test form??
>
> Because in my "If Action" tab, I have to put the fields that I'd like to
> use... like: ARSYS.ARF.JAVA for "Plug-In Name", and for the combobox
"Enter
> Input Values" I have to put the entries for the "Input Value List"...
>
> But, these fields that are set at "Input Value List:" ... Where are they
> come from??? What form??
>
> Because in the example that I saw... it's putting the values: $Script$,
> $Language$ (these two Fields are from the "Filter Script Library" form),
and
> more arguments (input fields), like $Argument 1$, $Argument 2$, $Argument
3$
> (these other fields don't exist in "Filter Script Library" form).
>
>
> Should I have to create fields (Argument1, Argument2, Argument3, ...) at
> "Filter Script Library" form ??? Or should I put another form (FRM:Test,
p.
> ex.) at "Form Name" in my Basic tab??
>
>
> Thanx-in-advance...
>
>
>
> Tadeu Augusto Dutra Pinto
> -----------------------------------------------------------------IT
> Web Services ATM
> Cinq Technologies
> http://www.cinq.com.br
> [EMAIL PROTECTED]
>
> Fone: 41 3018-2833 - Cinq
> Fone: 41 3340-5736 - HSBC
> -----------------------------------------------------------------

____________________________________________________________________________
___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the
Answers Are"



____________________________________________________________________________
___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the
Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to