Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Workflow » Trigger Message to send e-mail
Trigger Message to send e-mail [message #466] Sun, 17 December 2006 05:16 Go to next message
verbal is currently offline  verbal
Messages: 4
Registered: December 2006
Junior Member
How can I use this type of trigger for sending email? Is there any example or working code?

For what I know so far, I should create a task for this type of trigger and beforehand a pattern (there can't be a task without pattern). But sending e-mail doesn't sound like a pattern to me.

P.S. Greate framework. Your RBAC is amazing.
Re: Trigger Message to send e-mail [message #467 is a reply to message #466] Sun, 17 December 2006 05:42 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
There is no pattern for sending email as it is just a simple function which requires a few lines of code. It is not complicated enough to warrant its own transaction with model, view and controller.

All you have to do is include the mail() function in a custom method. It's not that complicated as I have done it in one of my applications.


Re: Trigger Message to send e-mail [message #523 is a reply to message #466] Wed, 10 January 2007 10:21 Go to previous messageGo to next message
verbal is currently offline  verbal
Messages: 4
Registered: December 2006
Junior Member
Basically...

1. I want to create new 'Workflow Transition' for sending automatic e-mail
2. To do so I have to have Task (Proc)
3. To have Task I have to have Pattern

and now what I accomplished

1. I have created Pattern MAIL
Visible screen? No
Context Preselection No
Keep Data on exit? No
2. I have created Task (Proc) with script containing code below

--
<?php
// name = std.mail.inc

require_once 'include.general.inc';

// identify mode for xsl file
$mode = 'list';

// load session variables
initSession();

// send email
mail('example@example.org', 'example', 'example', "From: example@example.org\r\n");

// ???
?>
---

And there I have a problem, because I don't know how should I end this script. Should I use scriptNext()? scriptPrevious()?
Re: Trigger Message to send e-mail [message #524 is a reply to message #523] Wed, 10 January 2007 11:04 Go to previous message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
Which one of scriptNext() and scriptPrevious() have you tried?

You only use scriptNext() when you wish to activate another task immediately, in which case you must specify the name of that task. When this next task terminates the current task will be resumed.

You use scriptPrevious() to terminate the current task and return to whatever task was being processed before.

Note that in order to update any workflow case your script must contain the following functions:


Previous Topic: WorkFlow Engine
Next Topic: Task and Session Management Using Workflow
Goto Forum:
  


Current Time: Fri Mar 29 09:19:53 EDT 2024

Total time taken to generate the page: 0.01155 seconds