web stats
php: quick question - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-03-2011, 11:10 AM
ramji1501 ramji1501 is offline
Mirth Newb
 
Join Date: Dec 2010
Posts: 19
ramji1501 is on a distinguished road
Question php: quick question

Friends,

I know mirth does not support php per se, as it does javascript.

I will explain my situation below.

1. My mirth channel maps incoming hl7 messages to an xml file.

2. A php script then parses the xml file, does error checking etc..and stores data in tables.

Am looking at options to automate step 2. I could make the php execution as part of a shell script, and schedule it as a cron.

But, is there a way to schedule the shell script or the php script itself as part of mirth.
Reply With Quote
  #2  
Old 03-04-2011, 12:41 AM
AlexToft AlexToft is offline
OBX.3 Kenobi
 
Join Date: Sep 2010
Location: Leeds, UK
Posts: 160
AlexToft is on a distinguished road
Default

Why not just call php direct from your transformer?

java.lang.Runtime.getRuntime().exec("/usr/bin/php /path/to/script.php");
Reply With Quote
  #3  
Old 03-05-2011, 08:57 AM
ramji1501 ramji1501 is offline
Mirth Newb
 
Join Date: Dec 2010
Posts: 19
ramji1501 is on a distinguished road
Question tried

hi Alex, I tried exactly what you said. Added that line of code as last step of transformer. It does nothing. Doesn't throw any errors, but does nothing too.
Adding it in postprocessor has same effect!
Reply With Quote
  #4  
Old 03-07-2011, 07:35 AM
ramji1501 ramji1501 is offline
Mirth Newb
 
Join Date: Dec 2010
Posts: 19
ramji1501 is on a distinguished road
Default

ok. it worked! thanks.

but, what's the difference between adding it as the last step in the destination transformer and adding it in the post-processor step.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:00 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation