Re: Output of field contents to file via a filter action

2008-03-06 Thread Heider, Stephen
Mike,

 

Here is one option (there are probably many).

 

Since you are on Windows create a small .Net console app with the .Net
ARS API that retrieves the email contents by querying the form, then
creates a text file of the contents of the email, then attaches the file
to an Attachment Field in Remedy.

 

Your filters would first determine the length of the email, and then
only call the console app when it is greater than a certain number.
When you call the console app you would pass in the $1$ value so it
knows which record to work with.

 

 

Afterwards, if you wanted to take this concept further you could design
the console app to work with any form, and field, and any attachment
field.  You could then use this with other forms.

 

Stephen

Remedy Skilled Professional

 



From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Balogh
Sent: Thursday, March 06, 2008 3:28 PM
To: arslist@ARSLIST.ORG
Subject: Output of field contents to file via a filter action

 

Hi everyone -

 

I'm attempting to output the contents of a large character field to a
file via a filter action.  I must use a filter because this process will
be used for processing emails coming in to our server.  Above a certain
size I want to output the email body to a file and then attach that file
to a Helpdesk ticket.  I've tried using the following via as a Run
Process command:

 

%ComSpec% /C Echo $FieldValue$ >> c:\file.txt

 

This works great until the field has a carriage return in the value.
Once a carriage return is introduced into the field, the process fails
completely and the file is not created at all.  Unfortunately, virtually
every time we use this process, the field value is going to have
potentially thousands of carriage returns in it.  I've tried various
combinations with the /A and /S switches as well as putting
double-quotes around the $FieldValue$.  Anyone have any other
suggestions or a completely different way I could try to do this?

 

Windows Server 2003 Enterprise

MS SQL 2005

ARS 7.0.01 p2

 

Thanks in advance!

~Mike

 

---

Michael J Balogh

Wingspan Systems Inc.

[EMAIL PROTECTED]  

__Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
html___

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"


Re: Output of field contents to file via a filter action

2008-03-06 Thread Grooms, Frederick W
An easier way to do it would be to use the Notify action.  Change the
Mechanism field to Other and put a number (4 and above) in the Other
Code.  This will create a file on your server.  The Other mechanism is
documented in the Workflow Objects manual (pg 76 for 7.0.x)
 
Fred  



From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Heider, Stephen
Sent: Thursday, March 06, 2008 2:52 PM
To: arslist@ARSLIST.ORG
Subject: Re: Output of field contents to file via a filter action



Mike,

 

Here is one option (there are probably many).

 

Since you are on Windows create a small .Net console app with the .Net
ARS API that retrieves the email contents by querying the form, then
creates a text file of the contents of the email, then attaches the file
to an Attachment Field in Remedy.

 

Your filters would first determine the length of the email, and then
only call the console app when it is greater than a certain number.
When you call the console app you would pass in the $1$ value so it
knows which record to work with.

 

 

Afterwards, if you wanted to take this concept further you could design
the console app to work with any form, and field, and any attachment
field.  You could then use this with other forms.

 

Stephen

Remedy Skilled Professional

 



From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Balogh
Sent: Thursday, March 06, 2008 3:28 PM
To: arslist@ARSLIST.ORG
Subject: Output of field contents to file via a filter action

 

Hi everyone -

 

I'm attempting to output the contents of a large character field to a
file via a filter action.  I must use a filter because this process will
be used for processing emails coming in to our server.  Above a certain
size I want to output the email body to a file and then attach that file
to a Helpdesk ticket.  I've tried using the following via as a Run
Process command:

 

%ComSpec% /C Echo $FieldValue$ >> c:\file.txt

 

This works great until the field has a carriage return in the value.
Once a carriage return is introduced into the field, the process fails
completely and the file is not created at all.  Unfortunately, virtually
every time we use this process, the field value is going to have
potentially thousands of carriage returns in it.  I've tried various
combinations with the /A and /S switches as well as putting
double-quotes around the $FieldValue$.  Anyone have any other
suggestions or a completely different way I could try to do this?

 

Windows Server 2003 Enterprise

MS SQL 2005

ARS 7.0.01 p2

 

Thanks in advance!

~Mike

 

---

Michael J Balogh

Wingspan Systems Inc.

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

 
 

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"


Re: Output of field contents to file via a filter action

2008-03-06 Thread Carey Matthew Black
And another option would be to use the Plugin sever to do the task
instead of the command line.

( I am thinking that the user is using the "dos" design pattern of
putting the content into a file for some other script to operate on.)

However, the script could more simply be an AR Filter Plugin that can
either right the content to a local file, or actually do the work that
is needed all together.

And the Java Scripting plugin would be a good choice IMHO for this very task.

Just my two cents.

-- 
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 Thu, Mar 6, 2008 at 9:27 PM, Grooms, Frederick W
<[EMAIL PROTECTED]> wrote:
> **
>
> An easier way to do it would be to use the Notify action.  Change the
> Mechanism field to Other and put a number (4 and above) in the Other Code.
> This will create a file on your server.  The Other mechanism is documented
> in the Workflow Objects manual (pg 76 for 7.0.x)
>
> Fred
>
>  
>  From: Action Request System discussion list(ARSList)
> [mailto:[EMAIL PROTECTED] On Behalf Of Heider, Stephen
> Sent: Thursday, March 06, 2008 2:52 PM
> To: arslist@ARSLIST.ORG
> Subject: Re: Output of field contents to file via a filter action
>
>
>
>
>
>
> Mike,
>
>
>
> Here is one option (there are probably many).
>
>
>
> Since you are on Windows create a small .Net console app with the .Net ARS
> API that retrieves the email contents by querying the form, then creates a
> text file of the contents of the email, then attaches the file to an
> Attachment Field in Remedy.
>
>
>
> Your filters would first determine the length of the email, and then only
> call the console app when it is greater than a certain number.  When you
> call the console app you would pass in the $1$ value so it knows which
> record to work with.
>
>
>
>
>
> Afterwards, if you wanted to take this concept further you could design the
> console app to work with any form, and field, and any attachment field.  You
> could then use this with other forms.
>
>
>
> Stephen
>
> Remedy Skilled Professional
>
>
>
>  
>
>
> From: Action Request System discussion list(ARSList)
> [mailto:[EMAIL PROTECTED] On Behalf Of Mike Balogh
> Sent: Thursday, March 06, 2008 3:28 PM
> To: arslist@ARSLIST.ORG
> Subject: Output of field contents to file via a filter action
>
>
>
>
> Hi everyone -
>
>
>
>
>
> I'm attempting to output the contents of a large character field to a file
> via a filter action.  I must use a filter because this process will be used
> for processing emails coming in to our server.  Above a certain size I want
> to output the email body to a file and then attach that file to a Helpdesk
> ticket.  I've tried using the following via as a Run Process command:
>
>
>
>
>
> %ComSpec% /C Echo $FieldValue$ >> c:\file.txt
>
>
>
>
>
> This works great until the field has a carriage return in the value.  Once a
> carriage return is introduced into the field, the process fails completely
> and the file is not created at all.  Unfortunately, virtually every time we
> use this process, the field value is going to have potentially thousands of
> carriage returns in it.  I've tried various combinations with the /A and /S
> switches as well as putting double-quotes around the $FieldValue$.  Anyone
> have any other suggestions or a completely different way I could try to do
> this?
>
>
>
>
>
> Windows Server 2003 Enterprise
>
>
> MS SQL 2005
>
>
> ARS 7.0.01 p2
>
>
>
>
>
> Thanks in advance!
>
> ~Mike
>
>
>
> ---
>
> Michael J Balogh
>
> Wingspan Systems Inc.
>
> [EMAIL PROTECTED]

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"


Re: Output of field contents to file via a filter action

2008-03-07 Thread Heider, Stephen
Fred,

 

That's cool.  I did not know that about that part of the Notify command.
For reference, in ARS 6.3, the BasicGuide-630.pdf describes it on page
524.

 

In my testing this morning I am not sure if I can use it here.  I see
three challenges to overcome:

 

1.  The first 8 lines and the last 3 need to be removed from the
file. This is extra text inserted by the Notify command.

a.  The application or process that ultimately receives the
file will need to remove these extra lines.

 

2.  Each time the Notify command is run it appends to the existing
file.

a.  After each run the file needs to be deleted or renamed.

 

3.  The filename is not unique.  For example, "notify4.arn".  This
prevents multiple simultaneous users from running this command.  Even
though you can have up to 80 different file names (notify4.arn through
notify83.arn) there is no guarantee that two users will not run the
process that creates these files at the same time.

a.  An indirect work-around is to create a queue for these
command whereby only one command is run at one time.

 

Since this a new command for me, are there any work-arounds for these
items?  Items 2 and 3 could have been dealt with if ARS allowed for
custom (unique) filenames.

 

 

Stephen

Remedy Skilled Professional

 



From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Grooms, Frederick W
Sent: Thursday, March 06, 2008 9:28 PM
To: arslist@ARSLIST.ORG
Subject: Re: Output of field contents to file via a filter action

 

An easier way to do it would be to use the Notify action.  Change the
Mechanism field to Other and put a number (4 and above) in the Other
Code.  This will create a file on your server.  The Other mechanism is
documented in the Workflow Objects manual (pg 76 for 7.0.x)

 

Fred  

 



From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Heider, Stephen
Sent: Thursday, March 06, 2008 2:52 PM
To: arslist@ARSLIST.ORG
Subject: Re: Output of field contents to file via a filter action

Mike,

 

Here is one option (there are probably many).

 

Since you are on Windows create a small .Net console app with the .Net
ARS API that retrieves the email contents by querying the form, then
creates a text file of the contents of the email, then attaches the file
to an Attachment Field in Remedy.

 

Your filters would first determine the length of the email, and then
only call the console app when it is greater than a certain number.
When you call the console app you would pass in the $1$ value so it
knows which record to work with.

 

 

Afterwards, if you wanted to take this concept further you could design
the console app to work with any form, and field, and any attachment
field.  You could then use this with other forms.

 

Stephen

Remedy Skilled Professional

 



From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Balogh
Sent: Thursday, March 06, 2008 3:28 PM
To: arslist@ARSLIST.ORG
Subject: Output of field contents to file via a filter action

 

Hi everyone -

 

I'm attempting to output the contents of a large character field to a
file via a filter action.  I must use a filter because this process will
be used for processing emails coming in to our server.  Above a certain
size I want to output the email body to a file and then attach that file
to a Helpdesk ticket.  I've tried using the following via as a Run
Process command:

 

%ComSpec% /C Echo $FieldValue$ >> c:\file.txt

 

This works great until the field has a carriage return in the value.
Once a carriage return is introduced into the field, the process fails
completely and the file is not created at all.  Unfortunately, virtually
every time we use this process, the field value is going to have
potentially thousands of carriage returns in it.  I've tried various
combinations with the /A and /S switches as well as putting
double-quotes around the $FieldValue$.  Anyone have any other
suggestions or a completely different way I could try to do this?

 

Windows Server 2003 Enterprise

MS SQL 2005

ARS 7.0.01 p2

 

Thanks in advance!

~Mike

 

---

Michael J Balogh

Wingspan Systems Inc.

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

 

 

__Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
html___

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"


Re: Output of field contents to file via a filter action

2008-03-07 Thread Carey Matthew Black
Stephen,

I am certain that the design intent was that there would be a process
that parses the file and does the right thing with what it finds in
the file. So #2 and #3 are totally by design. Also the process was
envisioned as a standing "server" process and not something that is
invoked over and over again. But I guess you could do that too. You
just have to manage the "high water mark" for the entries that you
have already processed between invocations.

If you need to pass data to the process that is monitoring the file
then the value needs to be a field that is written to the entry in the
file. The process parses the entry and does what it needs to do from
there.


If my vague memory is correct, I would be careful about
altering/renaming/moving the file while the ARS server is running. You
may find that multiple users are writing to the file and that there
are some "bad times" to alter the file. Also the ARS server may be
confused by the files length changing or disappearing out from
underneath it too. ( I seem to remember issues like that from when I
played with this many years ago. But my memory might be poor about the
details from that long ago. Do some testing at least.)

The thing that I do not like about the approach is that it builds in a
queue. (and thus a likely delay in the process) If what you need is
"in line processing" then look toward the Filter Plugin. If the queue
effect it desired and/or helpful then the Notify-Other model may work
well for you too.

HTH.

-- 
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 Fri, Mar 7, 2008 at 7:53 AM, Heider, Stephen <[EMAIL PROTECTED]> wrote:
> **
>
>
>
> Fred,
>
>
>
> That's cool.  I did not know that about that part of the Notify command.
> For reference, in ARS 6.3, the BasicGuide-630.pdf describes it on page 524.
>
>
>
> In my testing this morning I am not sure if I can use it here.  I see three
> challenges to overcome:
>
>
>
> The first 8 lines and the last 3 need to be removed from the file. This is
> extra text inserted by the Notify command.
>
> The application or process that ultimately receives the file will need to
> remove these extra lines.
>
>
>
> Each time the Notify command is run it appends to the existing file.
>
> After each run the file needs to be deleted or renamed.
>
>
>
> The filename is not unique.  For example, "notify4.arn".  This prevents
> multiple simultaneous users from running this command.  Even though you can
> have up to 80 different file names (notify4.arn through notify83.arn) there
> is no guarantee that two users will not run the process that creates these
> files at the same time.
>
> An indirect work-around is to create a queue for these command whereby only
> one command is run at one time.
>
>
>
> Since this a new command for me, are there any work-arounds for these items?
> Items 2 and 3 could have been dealt with if ARS allowed for custom (unique)
> filenames.
>
>
> Stephen
> Remedy Skilled Professional

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"


Re: Output of field contents to file via a filter action

2008-03-07 Thread Heider, Stephen
Carey,

Precisely. Thanks for the confirmation.

I don't think I can make use of this command for the purpose of creating
a file from the contents of an ARS field.

Stephen
Remedy Skilled Professional

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Carey Matthew Black
Sent: Friday, March 07, 2008 8:42 AM
To: arslist@ARSLIST.ORG
Subject: Re: Output of field contents to file via a filter action

Stephen,

I am certain that the design intent was that there would be a process
that parses the file and does the right thing with what it finds in
the file. So #2 and #3 are totally by design. Also the process was
envisioned as a standing "server" process and not something that is
invoked over and over again. But I guess you could do that too. You
just have to manage the "high water mark" for the entries that you
have already processed between invocations.

If you need to pass data to the process that is monitoring the file
then the value needs to be a field that is written to the entry in the
file. The process parses the entry and does what it needs to do from
there.


If my vague memory is correct, I would be careful about
altering/renaming/moving the file while the ARS server is running. You
may find that multiple users are writing to the file and that there
are some "bad times" to alter the file. Also the ARS server may be
confused by the files length changing or disappearing out from
underneath it too. ( I seem to remember issues like that from when I
played with this many years ago. But my memory might be poor about the
details from that long ago. Do some testing at least.)

The thing that I do not like about the approach is that it builds in a
queue. (and thus a likely delay in the process) If what you need is
"in line processing" then look toward the Filter Plugin. If the queue
effect it desired and/or helpful then the Notify-Other model may work
well for you too.

HTH.

-- 
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 Fri, Mar 7, 2008 at 7:53 AM, Heider, Stephen <[EMAIL PROTECTED]>
wrote:
> **
>
>
>
> Fred,
>
>
>
> That's cool.  I did not know that about that part of the Notify
command.
> For reference, in ARS 6.3, the BasicGuide-630.pdf describes it on page
524.
>
>
>
> In my testing this morning I am not sure if I can use it here.  I see
three
> challenges to overcome:
>
>
>
> The first 8 lines and the last 3 need to be removed from the file.
This is
> extra text inserted by the Notify command.
>
> The application or process that ultimately receives the file will need
to
> remove these extra lines.
>
>
>
> Each time the Notify command is run it appends to the existing file.
>
> After each run the file needs to be deleted or renamed.
>
>
>
> The filename is not unique.  For example, "notify4.arn".  This
prevents
> multiple simultaneous users from running this command.  Even though
you can
> have up to 80 different file names (notify4.arn through notify83.arn)
there
> is no guarantee that two users will not run the process that creates
these
> files at the same time.
>
> An indirect work-around is to create a queue for these command whereby
only
> one command is run at one time.
>
>
>
> Since this a new command for me, are there any work-arounds for these
items?
> Items 2 and 3 could have been dealt with if ARS allowed for custom
(unique)
> filenames.
>
>
> Stephen
> Remedy Skilled Professional


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"