Using Parameterized component (Application)

Parameterized component (application) is component or application than can be customized using parameter(s). Behavior of component or application will be different for different parameter(s) in used.

Here is an example of parameterized component,CIISONLINE_FileEditor, and its usage on web application as an example:

parameterized component (FileEditor.php):


<?p
class CIISONLINE_FileEditor extends CIISONLINE_PageProcessor{

static function MenuPath_Show() {
if (GetCurrentUserConfig('bMenuPathShow')) {
SetVar ('FileEditorPageMenuPath', ToHTML(GetTextLanguage('sFileEditorPageMenuPathTitle')));
} else {
SetVar ('MenuPath', '');
}
}

protected static function CommonSetVar() {
/* Common Javascript Setting Value */
CommonSetVar();
/*-------------------------------*/

SetVar ('msg_reallytoupdatefile', ToHTML(GetTextLanguage('sFileEditorMsgReallyToUpdateFile')));
SetVar ('msg_reallytocancelfile', ToHTML(GetTextLanguage('sFileEditorMsgReallyToCancelFile')));

}

/*===============================
* Action of the Record Form
*-------------------------------*/
static function FileEditorAction($sAction) {
/*-------------------------------
* Initialize variables
*-------------------------------*/

/*-------------------------------
* Validate fields
*-------------------------------*/
if ((string)$sAction == 'update') {
/*-------------------------------
* Load all form fields into variables
*-------------------------------*/
$fldfileeditor_contents = GetParam('fileeditor_contents');

/*-------------------------------
* FileEditor Check Event begin
* FileEditor Check Event end
*-------------------------------*/
}
switch ((string)$sAction) {
case 'update':
/*-------------------------------
* FileEditor Update Event begin
* FileEditor Update Event end
*-------------------------------*/

if (isset(self::$config->fileeditor->source->path) && ($fldfilename = self::$config->fileeditor->source->path)
&& @file_put_contents($fldfilename,$fldfileeditor_contents)) {
@chmod($fldfilename,0777);
} else {
SetCurrentPageConfig('sPageErrorMessage',GetTextLanguage('sFileEditorErrCanNotWriteFile'));
}
break;
default:
$sRedirectFileName = GetCurrentUserConfig('sDefaultPage');
ResponseRedirect ($sRedirectFileName);
}
/*-------------------------------
* FileEditor BeforeExecute Event begin
* FileEditor BeforeExecute Event end
*-------------------------------*/
if (strlen(GetCurrentPageConfig('sPageErrorMessage')) > 0) {
OnPageAccessWarningLogWrite (str_replace("<br>",'',GetCurrentPageConfig('sPageErrorMessage')));
return;
}

OnPageAccessInfoLogWrite ();
/*-------------------------------
* FileEditor Action end
*-------------------------------*/
}
/*===============================
* Display Record Form
*-------------------------------*/
static function FileEditor_Show() {
/*-------------------------------
* FileEditor Show begin
*-------------------------------*/
$sFormTitle = GetTextLanguage('sFileEditorFormTitle');
$sAction = GetCurrentPageConfig('sAction');
$sForm = GetCurrentPageConfig('sForm');

$fldfileeditor_contents = '';

/* Common Javascript Setting Value */
self::CommonSetVar();
/*-------------------------------*/

/*-------------------------------
* Load primary key and form parameters
*-------------------------------*/
$sPageErrorMessage = GetCurrentPageConfig('sPageErrorMessage');

$bIsUpdateMode = ((string)$sForm != 'FileEditor' && isset(self::$config->fileeditor->source->path)
&& ($fldfilename = self::$config->fileeditor->source->path) && file_exists($fldfilename));

if ((string)$sPageErrorMessage == '') {

if ($bIsUpdateMode) {
$fldfileeditor_contents = file_get_contents($fldfilename);

SetVar ('ActionMessage', '');
OnPageAccessInfoLogWrite ();
} else {
$fldfileeditor_contents = file_get_contents(self::$config->fileeditor->source->path);

SetVar ('message', (GetTextLanguage('sFileEditorMsgUpdateSuccessfully')));
Parse ('ActionMessage', false);
}
} else {
$fldfileeditor_contents = GetParam ('fileeditor_contents');

SetVar ('message', ($sPageErrorMessage));
SetVar ('FormTitle', ToHTML($sFormTitle));
Parse ('ActionMessage', false);
}

/*-------------------------------
* Load all fields into variables from recordset or input parameters
*-------------------------------*/
Parse ('FileEditorEdit', false);

/*-------------------------------
* FileEditor ShowEdit Event begin
* FileEditor ShowEdit Event end
*-------------------------------*/
SetVar ('FileEditorCancel', '');
/*-------------------------------
* FileEditor Show Event begin
* FileEditor Show Event end
*-------------------------------*/

SetVar ('FormTitle', ToHTML($sFormTitle));

SetVar ('UpdateButton', ToHTML(GetTextLanguage('sFileEditorUpdateButtonTitle')));
SetVar ('CancelButton', ToHTML(GetTextLanguage('sFileEditorCancelButtonTitle')));

/*-------------------------------
* Show form field
*-------------------------------*/
SetVar ('fileeditor_contents', ToHTML($fldfileeditor_contents));

Parse ('FormFileEditor', false);

/*-------------------------------
* FileEditor Show end
*-------------------------------*/
}
}
?>




application #1:
manifest (AliasConfig.pageprop):


<?xml version="1.0" encoding="UTF-8"?>
<configuration id="AliasConfig" >
<section name="fileeditor">
<config name="source">
<config name="path"><![CDATA[./System/Configuration/CIISONLINE.dbconf]]></config>
</config>
</section>
</configuration>



configuration (AliasConfig.pageconf):


<?xml version="1.0" encoding="UTF-8"?>
<page name="AliasConfig" id="AliasConfig" >
<processor PageSecurityCode="1" HelpContext="LIGHTARMY-Applications.AliasConfig"
sOnlyTemplateFileName="FileEditor.html" CanPublic="false">

<PageSecurityCode>
<Name>Alias Configuration</Name>
<Description></Description>
<HelpContext>LIGHTARMY-Applications.AliasConfig</HelpContext>
</PageSecurityCode>

<PageActionSelectionScript><![CDATA[
switch ((string)GetCurrentPageConfig('sForm')) {
case 'FileEditor':
CIISONLINE_FileEditor::FileEditorAction(GetCurrentPageConfig('sAction'));
}
]]></PageActionSelectionScript>
<TemplateProcessingScript><![CDATA[
CIISONLINE_Header::Menu_Show();
CIISONLINE_Footer::FooterForm_Show();
CIISONLINE_FileEditor::MenuPath_Show();
CIISONLINE_FileEditor::FileEditor_Show();

]]></TemplateProcessingScript>
<ResponseProcessingScript><![CDATA[
ResponseWrite (PrintVar('main'));
]]></ResponseProcessingScript>
<IncludeFile>PageClass/Header.php</IncludeFile>
<IncludeFile>PageClass/Footer.php</IncludeFile>
<IncludeFile>PageClass/FileEditor.php</IncludeFile>

<TemplateSpaceHolder name="Header">Header.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Footer">Footer.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space01">Space01.html</TemplateSpaceHolder>

</processor>
</page>



application #2:
manifest (AutoIncludeConfig.pageprop):


<?xml version="1.0" encoding="UTF-8"?>
<configuration id="AutoIncludeConfig" >
<section name="fileeditor">
<config name="source">
<config name="path"><![CDATA[./System/Configuration/CIISONLINE.coreconf]]></config>
</config>
</section>
</configuration>



configuration (AutoIncludeConfig.pageconf):


<?xml version="1.0" encoding="UTF-8"?>
<page name="AutoIncludeConfig" id="AutoIncludeConfig" >
<processor PageSecurityCode="2" HelpContext="LIGHTARMY-Applications.AutoIncludeConfig"
sOnlyTemplateFileName="FileEditor.html" CanPublic="false">

<PageSecurityCode>
<Name>AutoInclude Configuration</Name>
<Description></Description>
<HelpContext>LIGHTARMY-Applications.AutoIncludeConfig</HelpContext>
</PageSecurityCode>

<PageActionSelectionScript><![CDATA[
switch ((string)GetCurrentPageConfig('sForm')) {
case 'FileEditor':
CIISONLINE_FileEditor::FileEditorAction(GetCurrentPageConfig('sAction'));
}
]]></PageActionSelectionScript>
<TemplateProcessingScript><![CDATA[
CIISONLINE_Header::Menu_Show();
CIISONLINE_Footer::FooterForm_Show();
CIISONLINE_FileEditor::MenuPath_Show();
CIISONLINE_FileEditor::FileEditor_Show();

]]></TemplateProcessingScript>
<ResponseProcessingScript><![CDATA[
ResponseWrite (PrintVar('main'));
]]></ResponseProcessingScript>
<IncludeFile>PageClass/Header.php</IncludeFile>
<IncludeFile>PageClass/Footer.php</IncludeFile>
<IncludeFile>PageClass/FileEditor.php</IncludeFile>

<TemplateSpaceHolder name="Header">Header.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Footer">Footer.html</TemplateSpaceHolder>
<TemplateSpaceHolder name="Space01">Space01.html</TemplateSpaceHolder>

</processor>
</page>



You can also use different style for that applications as needed.

What kind of contents the help file is ?

There are five files to render help: contents, index, keywords, name and overview.
You will access the contents using context id like this: context_id=<root help>.ManifestProcessMaint.Queen.email_autoresponse. Here are as that examples:

contents:


<p><font face="Verdana" size="2">
<p>
<img src="help::this.figures.help-s.png"/>
<h3>Email Autoresponder Manifest Process Maintenance Page</h3>
</p>
<p>
<a id="Purpose"><b>Purpose</b></a><br>
Maintain an email autoresponder manifest process.
<br><br>
The Email Autoresponse takes an incoming email message
from a mailbox, and sends the response using the
recogniser patern to determine the response to 'replyto'
/or sender.
<br><br>
As with all Lightant queenProcess, you are required to
have a unique 'process.name' value. The 'process.type'
value corresponds to the processor source to load from
the processes directory. If this configuration file is
designed to load the code in processes/foo/bar.php, the
entry for 'process.type' should be foo_bar.
</p>
<p>
<a id="Operations"><b>Operations</b></a><br>
<ol type="I">
<li>Create<br>
<br>
<br>
<ol>
<li>Screenshots<br>
<br>
<img src="help::this.figures.hlp_en_queenmanifestmaint_new__email_autoresponse.png"/>
</li>
<br>
<li>Fields<br>
<br>
<ol type="a">
<li>Write manifest as explain in <b>Manifest Contents</b> below.<br>
</li>
<br>
</ol>
</li>
</ol>
</li>
<li>Update<br>
<br>
<br>
<ol>
<li>Screenshots<br>
<br>
<img src="help::this.figures.hlp_en_queenmanifestmaint_update__email_autoresponse.png"/>
</li>
<br>
<li>Fields<br>
<br>
<ol type="a">
<li>Write manifest as explain in <b>Manifest Contents</b> below.<br>
</li>
<br>
</ol>
</li>
</ol>
</li>
<li>Delete<br>
<br>
<br>
<ol>
<li>Screenshots<br>
<br>
<img src="help::this.figures.hlp_en_queenmanifestmaint_update__email_autoresponse.png"/>
</li>
<br>
<li>Fields<br>
<br>
<ol type="a">
</ol>
</li>
</ol>
</li>
<li>Cancel<br>
<br>
<br>
<ol>
<li>Screenshots<br>
<br>
<img src="help::this.figures.hlp_en_queenmanifestmaint_update__email_autoresponse.png"/>
</li>
<br>
<li>Fields<br>
<br>
<ol type="a">
</ol>
</li>
</ol>
</li>
</ol>
</p>
<p>
<a id="ManifestContents"><b>Manifest Contents</b></a><br>
<ol>
<li>Structure<br>
<fieldset style="border: 1px dotted ;" >
<PRE>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;configuration id=&quot;email_autoresponse&quot;&gt;
&lt;section name=&quot;core&quot;&gt;
&lt;!-- Process Configuration--&gt;
&lt;config name=&quot;process&quot;&gt;
&lt;config name=&quot;type&quot;&gt;email_autoresponse&lt;/config&gt;
&lt;config name=&quot;name&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;description&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;start&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;end&quot;&gt;&lt;/config&gt;
&lt;/config&gt;

&lt;!--Mail Connection--&gt;
&lt;config name=&quot;connections&quot;&gt;
&lt;config name=&quot;mail&quot;&gt;
&lt;config name=&quot;type&quot;&gt;Mail&lt;/config&gt;
&lt;config name=&quot;host&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;user&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;password&quot;&gt;&lt;/config&gt;

&lt;config name=&quot;service&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;authuser&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;crypto&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;anonymous&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;debug&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;secure&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;norsh&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;notls&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;readonly&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;validate-cert&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;novalidate-cert&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;options&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;n_retries&quot;&gt;&lt;/config&gt;

&lt;config name=&quot;port&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;mailboxes&quot;&gt;
&lt;config name=&quot;source&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;handled&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;unhandled&quot;&gt;&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;

&lt;config name=&quot;testcode&quot;&gt;&lt;/config&gt;

&lt;!--Recognizer--&gt;
&lt;config name=&quot;recognizer&quot;&gt;
&lt;config name=&quot;minLetters&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;maxLetters&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;brain&quot;&gt;
#THE BRAIN CONFIGURATION#
&lt;/config&gt;
&lt;/config&gt;

&lt;!--Responder--&gt;
&lt;config name=&quot;responder&quot;&gt;
&lt;config name=&quot;default&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;directory&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;names&quot;&gt;
&lt;config name=&quot;{RESPONDER NAME}&quot;&gt;
&lt;config name=&quot;type&quot;&gt;&lt;&gt;
#THE RESPONDER CONFIGURATION#
&lt;/config&gt;
&lt;config name=&quot;{RESPONDER NAME}&quot;&gt;
&lt;config name=&quot;type&quot;&gt;&lt;&gt;
#THE RESPONDER CONFIGURATION#
&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;

&lt;!--Control--&gt;
&lt;config name=&quot;control&quot;&gt;
&lt;config name=&quot;sleepingduration&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;errorsthreshold&quot;&gt;&lt;/config&gt;
&lt;/config&gt;

&lt;!--Response--&gt;
&lt;config name=&quot;response&quot;&gt;
&lt;config name=&quot;to&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;from&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;replyto&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;rpath&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;cc&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;bcc&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;subject&quot;&gt;&lt;/config&gt;
&lt;/config&gt;

&lt;/section&gt;
&lt;/configuration&gt;
</PRE>
</fieldset>
</li>
<li>Parameters<br>
<ol type="a">
<li>id<br>
The identity of manifest.
</li>
<li>core.process.type<br>
The process type of manifest. Type is email_autoresponse.
</li>
<li>core.process.name<br>
The name given to this manifest.
</li>
<li>core.process.description<br>
The additional information to manifest.
</li>
<li>core.process.start<br>
The first date (time) the process will be executed.
</li>
<li>core.process.end<br>
The last date (time) the process will be executed.
</li>
<li>core.connections.mail.type<br>
The type of connection. The value should be and always: MAIL.
</li>
<li>core.connections.mail.host<br>
The mail server host name or IP address.
</li>
<li>core.connections.mail.user<br>
The account/ user of mail server.
</li>
<li>core.connections.mail.password<br>
The password of account/user of mail server.
</li>
<li>core.connections.mail.service<br>
The type of service of this mail connection.
</li>
<li>core.connections.mail.authuser<br>
The remote authentication user.
</li>
<li>core.connections.mail.crypto<br>
The crypto type of connection:ssl,tls,null.
</li>
<li>core.connections.mail.anonymous<br>
For anonymous connection mode.
</li>
<li>core.connections.mail.debug<br>
Activate debuging.
</li>
<li>core.connections.mail.secure<br>
Do not transmit a plaintext password.
</li>
<li>core.connections.mail.norsh<br>
Do not use rsh or ssh to establish a preauthenticated.
</li>
<li>core.connections.mail.notls<br>
Do not do start-tls.
</li>
<li>core.connections.mail.readonly<br>
Request read-only mailbox open.
</li>
<li>core.connections.mail.validate-cert<br>
Validate certificates from tls/ssl server.
</li>
<li>core.connections.mail.novalidate-cert<br>
Do not validate certificates from tls/ssl server.
</li>
<li>core.connections.mail.options<br>
Options of connection.
</li>
<li>core.connections.mail.n_retries<br>
Number of maximum connect attempts.
</li>
<li>core.connections.mail.port<br>
Port to your mail server.
</li>
<li>core.connections.mail.mailboxes.source<br>
Mailbox name.
</li>
<li>core.connections.mail.mailboxes.handled<br>
Mailbox name for handled email.
</li>
<li>core.connections.mail.mailboxes.unhandled<br>
Mailbox name for unhandled email.
</li>
<li>core.testcode<br>
The test code of email contents.
</li>
<li>core.recognizer.minLetters<br>
The anagram minimum length.
</li>
<li>core.recognizer.maxLetters<br>
The anagram maximum length.
</li>
<li>core.recognizer.brain<br>
The brain configuration.
</li>
<li>core.responder.default<br>
The default response.
</li>
<li>core.responder.directory<br>
The directory location of responder.
</li>
<li>core.responder.names<br>
The responder configuration.
</li>
<li>core.control.sleepingduration<br>
The sleeping time on subsequence errors.
</li>
<li>core.control.errorsthreshold<br>
The errors threshold for sleeping stage.
</li>
<li>core.response.to<br>
The destination of email.
</li>
<li>core.response.from<br>
The source of email.
</li>
<li>core.response.replyto<br>
The destination of reply.
</li>
<li>core.response.rpath<br>
The return path on error.
</li>
<li>core.response.cc<br>
The cc of email.
</li>
<li>core.response.bcc<br>
The bcc of email.
</li>
<li>core.response.subject<br>
The subject of email.
</li>
</ol>
</li>
<li>Example<br>
<fieldset style="border: 1px dotted ;" >
<PRE>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;configuration id=&quot;email_autoresponse&quot;&gt;
&lt;section name=&quot;core&quot;&gt;
&lt;!-- Process Configuration--&gt;
&lt;config name=&quot;process&quot;&gt;
&lt;config name=&quot;type&quot;&gt;email_autoresponse&lt;/config&gt;
&lt;config name=&quot;name&quot;&gt;CIISONLINE_COM_AUTORESPONSE&lt;/config&gt;
&lt;config name=&quot;start&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;end&quot;&gt;&lt;/config&gt;
&lt;/config&gt;

&lt;!--Mail Connection--&gt;
&lt;config name=&quot;connections&quot;&gt;
&lt;config name=&quot;mail&quot;&gt;
&lt;config name=&quot;type&quot;&gt;Mail&lt;/config&gt;
&lt;config name=&quot;host&quot;&gt;imap.gmail.com&lt;/config&gt;
&lt;config name=&quot;user&quot;&gt;ciisonline.com&lt;/config&gt;
&lt;config name=&quot;password&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;crypto&quot;&gt;ssl&lt;/config&gt;
&lt;config name=&quot;port&quot;&gt;993&lt;/config&gt;
&lt;config name=&quot;service&quot;&gt;imap&lt;/config&gt;

&lt;config name=&quot;mailboxes&quot;&gt;
&lt;config name=&quot;source&quot;&gt;inbox&lt;/config&gt;
&lt;config name=&quot;handled&quot;&gt;handled&lt;/config&gt;
&lt;config name=&quot;unhandled&quot;&gt;unhandled&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;

&lt;!--Recognizer--&gt;
&lt;config name=&quot;recognizer&quot;&gt;
&lt;config name=&quot;minLetters&quot;&gt;5&lt;/config&gt;
&lt;config name=&quot;maxLetters&quot;&gt;7&lt;/config&gt;
&lt;config name=&quot;brain&quot;&gt;
&lt;config name=&quot;type&quot;&gt;TextBrain&lt;/config&gt;
&lt;config name=&quot;fact&quot;&gt;Application/Email/Recognizers/responder.fact&lt;/config&gt;
&lt;config name=&quot;knowledge&quot;&gt;Application/Email/Recognizers/responder.knowledge&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;

&lt;!--Responder--&gt;
&lt;config name=&quot;responder&quot;&gt;
&lt;config name=&quot;default&quot;&gt;Default&lt;/config&gt;
&lt;config name=&quot;directory&quot;&gt;Application/Email/Responder/&lt;/config&gt;
&lt;config name=&quot;names&quot;&gt;
&lt;config name=&quot;Default&quot;&gt;
&lt;!--#THE RESPONDER CONFIGURATION#--&gt;
&lt;config name=&quot;type&quot;&gt;Application_Email_Responder_Body&lt;/config&gt;
&lt;config name=&quot;use_template&quot;&gt;1&lt;/config&gt;
&lt;config name=&quot;mail&quot;&gt;
&lt;config name=&quot;from&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;config name=&quot;fromname&quot;&gt;CIISONLINE NET&lt;/config&gt;
&lt;config name=&quot;replyto&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;config name=&quot;replytoname&quot;&gt;CIISONLINE NET&lt;/config&gt;
&lt;config name=&quot;rpath&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;config name=&quot;body&quot; xml:space=&quot;preserve&quot;&gt;
Hello {toname},

Thanks You
{fromname}
&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;
&lt;config name=&quot;OrderForm&quot;&gt;
&lt;!--#THE RESPONDER CONFIGURATION#--&gt;
&lt;config name=&quot;type&quot;&gt;Application_Email_Responder_Body&lt;/config&gt;
&lt;config name=&quot;use_template&quot;&gt;1&lt;/config&gt;
&lt;config name=&quot;mail&quot;&gt;
&lt;config name=&quot;from&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;config name=&quot;fromname&quot;&gt;CIISONLINE NET&lt;/config&gt;
&lt;config name=&quot;replyto&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;config name=&quot;replytoname&quot;&gt;CIISONLINE NET&lt;/config&gt;
&lt;config name=&quot;rpath&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;config name=&quot;body&quot;&gt;OrderForm&lt;/config&gt;
&lt;config name=&quot;bodyfile&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;altbody&quot;&gt;&lt;/config&gt;
&lt;config name=&quot;altbodyfile&quot;&gt;&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;
&lt;config name=&quot;ProductInfo&quot;&gt;
&lt;!--#THE RESPONDER CONFIGURATION#--&gt;
&lt;config name=&quot;type&quot;&gt;Application_Email_Responder_Mime&lt;/config&gt;
&lt;config name=&quot;use_template&quot;&gt;1&lt;/config&gt;
&lt;config name=&quot;mail&quot;&gt;
&lt;config name=&quot;from&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;config name=&quot;fromname&quot;&gt;CIISONLINE NET&lt;/config&gt;
&lt;config name=&quot;replyto&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;config name=&quot;replytoname&quot;&gt;CIISONLINE NET&lt;/config&gt;
&lt;config name=&quot;rpath&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;!--&lt;config name=&quot;mime&quot;&gt;&lt;/config&gt;--&gt;
&lt;config name=&quot;mimefile&quot;&gt;Application/Email/Mimes/html.eml&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;
&lt;config name=&quot;ProductCatalog&quot;&gt;
&lt;!--#THE RESPONDER CONFIGURATION#--&gt;
&lt;config name=&quot;type&quot;&gt;Application_Email_Responder_Mime&lt;/config&gt;
&lt;config name=&quot;use_template&quot;&gt;1&lt;/config&gt;
&lt;config name=&quot;mail&quot;&gt;
&lt;config name=&quot;from&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;config name=&quot;fromname&quot;&gt;CIISONLINE NET&lt;/config&gt;
&lt;config name=&quot;replyto&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;config name=&quot;replytoname&quot;&gt;CIISONLINE NET&lt;/config&gt;
&lt;config name=&quot;rpath&quot;&gt;ciisonline.net@gmail.com&lt;/config&gt;
&lt;!--&lt;config name=&quot;mime&quot;&gt;&lt;/config&gt;--&gt;
&lt;config name=&quot;mimefile&quot;&gt;Application/Email/Mimes/message.eml&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;
&lt;/config&gt;

&lt;!--Control--&gt;
&lt;config name=&quot;control&quot;&gt;
&lt;config name=&quot;sleepingduration&quot;&gt;1000&lt;/config&gt;
&lt;config name=&quot;errorsthreshold&quot;&gt;10&lt;/config&gt;
&lt;/config&gt;

&lt;!--Response--&gt;
&lt;/section&gt;
&lt;/configuration&gt;
</PRE>
</fieldset>
</li>
</ol>
</p>
<p>
<a id="RelatedPages"><b>Related Pages</b></a><br>
<ol>
<li><a href="help::this.ManifestProcessesList">Manifest Processes List Page</a><br>
Display list of Queen manifest processes.
</li>
</ol>
</p>
<p>
<a id="RelatedTopics"><b>Related Topics</b></a><br>
<ol>
<li><a href="help::LIGHTARMY-UserGuide.Concepts.General.Manifest">Manifest (Concept)</a></li>
<li><a href="help::LIGHTARMY-UserGuide.Concepts.General.ServiceBus">Service Bus (Concept)</a></li>
<li><a href="help::LIGHTARMY-UserGuide.Concepts.General.Capability">Capability (Concept)</a></li>
<li><a href="help::LIGHTARMY-UserGuide.Concepts.General.AutomationPlatform">Automation Platform (Concept)</a></li>
<li><a href="help::LIGHTARMY-UserGuide.Concepts.General.ProcessPlatform">Process Platform (Concept)</a></li>
<li><a href="help::LIGHTARMY-UserGuide.Concepts.Application.Queen">Queen (Concept)</a></li>
<li><a href="help::LIGHTARMY-UserGuide.Concepts.Application.Nest">Nest (Concept)</a></li>
</ol>
</p>
<p>
<a id="Notes"><b>Notes</b></a><br>
<ol>
</ol>
</p>
</font></p>




index:


Email Autoresponder Manifest Process Maintenance
Email Autoresponder Manifest Process Maintenance Page



keywords:


Email Autoresponder Manifest Process Maintenance
Email Autoresponder Manifest Process Maintenance Page



name:


Email Autoresponder Manifest Process Maintenance Page



overview:


<p><font face="Verdana" size="2">
<p>
<h3>Email Autoresponder Manifest Process Maintenance Page</h3>
</p>
<p>
<a id="Purpose"><b>Purpose</b></a><br>
Maintain an email autoresponder manifest process.
<br><br>
The Email Autoresponse takes an incoming email message
from a mailbox, and sends the response using the
recogniser patern to determine the response to 'replyto'
/or sender.
<br><br>
As with all Lightant queenProcess, you are required to
have a unique 'process.name' value. The 'process.type'
value corresponds to the processor source to load from
the processes directory. If this configuration file is
designed to load the code in processes/foo/bar.php, the
entry for 'process.type' should be foo_bar.
</p>

Where I can found information of manifest parameters for a type?

LightArmy provides help context-sensitive for all applications inside. You just open an appropriate page and then click provided help context (question mark image). Appropriate help context will be displayed on new window.

Here is an example help for email_autoresponse:





Email Autoresponder Manifest Process Maintenance Page




Purpose

Maintain an email autoresponder manifest process.



The Email Autoresponse takes an incoming email message
from a mailbox, and sends the response using the
recogniser patern to determine the response to 'replyto'
/or sender.


As with all Lightant queenProcess, you are required to
have a unique 'process.name' value. The 'process.type'
value corresponds to the processor source to load from
the processes directory. If this configuration file is
designed to load the code in processes/foo/bar.php, the
entry for 'process.type' should be foo_bar.



Operations


  1. Create






    1. Screenshots







    2. Fields




      1. Write manifest as explain in Manifest Contents below.








  2. Update






    1. Screenshots







    2. Fields




      1. Write manifest as explain in Manifest Contents below.








  3. Delete






    1. Screenshots







    2. Fields








  4. Cancel






    1. Screenshots







    2. Fields











Manifest Contents


  1. Structure



    <?xml version="1.0" encoding="UTF-8"?>
    <configuration id="email_autoresponse">
    <section name="core">
    <!-- Process Configuration-->
    <config name="process">
    <config name="type">email_autoresponse</config>
    <config name="name"></config>
    <config name="description"></config>
    <config name="start"></config>
    <config name="end"></config>
    </config>

    <!--Mail Connection-->
    <config name="connections">
    <config name="mail">
    <config name="type">Mail</config>
    <config name="host"></config>
    <config name="user"></config>
    <config name="password"></config>

    <config name="service"></config>
    <config name="authuser"></config>
    <config name="crypto"></config>
    <config name="anonymous"></config>
    <config name="debug"></config>
    <config name="secure"></config>
    <config name="norsh"></config>
    <config name="notls"></config>
    <config name="readonly"></config>
    <config name="validate-cert"></config>
    <config name="novalidate-cert"></config>
    <config name="options"></config>
    <config name="n_retries"></config>

    <config name="port"></config>
    <config name="mailboxes">
    <config name="source"></config>
    <config name="handled"></config>
    <config name="unhandled"></config>
    </config>
    </config>
    </config>

    <config name="testcode"></config>

    <!--Recognizer-->
    <config name="recognizer">
    <config name="minLetters"></config>
    <config name="maxLetters"></config>
    <config name="brain">
    #THE BRAIN CONFIGURATION#
    </config>
    </config>

    <!--Responder-->
    <config name="responder">
    <config name="default"></config>
    <config name="directory"></config>
    <config name="names">
    <config name="{RESPONDER NAME}">
    <config name="type"><>
    #THE RESPONDER CONFIGURATION#
    </config>
    <config name="{RESPONDER NAME}">
    <config name="type"><>
    #THE RESPONDER CONFIGURATION#
    </config>
    </config>
    </config>

    <!--Control-->
    <config name="control">
    <config name="sleepingduration"></config>
    <config name="errorsthreshold"></config>
    </config>

    <!--Response-->
    <config name="response">
    <config name="to"></config>
    <config name="from"></config>
    <config name="replyto"></config>
    <config name="rpath"></config>
    <config name="cc"></config>
    <config name="bcc"></config>
    <config name="subject"></config>
    </config>

    </section>
    </configuration>



  2. Parameters


    1. id

      The identity of manifest.

    2. core.process.type

      The process type of manifest. Type is email_autoresponse.

    3. core.process.name

      The name given to this manifest.

    4. core.process.description

      The additional information to manifest.

    5. core.process.start

      The first date (time) the process will be executed.

    6. core.process.end

      The last date (time) the process will be executed.

    7. core.connections.mail.type

      The type of connection. The value should be and always: MAIL.

    8. core.connections.mail.host

      The mail server host name or IP address.

    9. core.connections.mail.user

      The account/ user of mail server.

    10. core.connections.mail.password

      The password of account/user of mail server.

    11. core.connections.mail.service

      The type of service of this mail connection.

    12. core.connections.mail.authuser

      The remote authentication user.

    13. core.connections.mail.crypto

      The crypto type of connection:ssl,tls,null.

    14. core.connections.mail.anonymous

      For anonymous connection mode.

    15. core.connections.mail.debug

      Activate debuging.

    16. core.connections.mail.secure

      Do not transmit a plaintext password.

    17. core.connections.mail.norsh

      Do not use rsh or ssh to establish a preauthenticated.

    18. core.connections.mail.notls

      Do not do start-tls.

    19. core.connections.mail.readonly

      Request read-only mailbox open.

    20. core.connections.mail.validate-cert

      Validate certificates from tls/ssl server.

    21. core.connections.mail.novalidate-cert

      Do not validate certificates from tls/ssl server.

    22. core.connections.mail.options

      Options of connection.

    23. core.connections.mail.n_retries

      Number of maximum connect attempts.

    24. core.connections.mail.port

      Port to your mail server.

    25. core.connections.mail.mailboxes.source

      Mailbox name.

    26. core.connections.mail.mailboxes.handled

      Mailbox name for handled email.

    27. core.connections.mail.mailboxes.unhandled

      Mailbox name for unhandled email.

    28. core.testcode

      The test code of email contents.

    29. core.recognizer.minLetters

      The anagram minimum length.

    30. core.recognizer.maxLetters

      The anagram maximum length.

    31. core.recognizer.brain

      The brain configuration.

    32. core.responder.default

      The default response.

    33. core.responder.directory

      The directory location of responder.

    34. core.responder.names

      The responder configuration.

    35. core.control.sleepingduration

      The sleeping time on subsequence errors.

    36. core.control.errorsthreshold

      The errors threshold for sleeping stage.

    37. core.response.to

      The destination of email.

    38. core.response.from

      The source of email.

    39. core.response.replyto

      The destination of reply.

    40. core.response.rpath

      The return path on error.

    41. core.response.cc

      The cc of email.

    42. core.response.bcc

      The bcc of email.

    43. core.response.subject

      The subject of email.



  3. Example



    <?xml version="1.0" encoding="UTF-8"?>
    <configuration id="email_autoresponse">
    <section name="core">
    <!-- Process Configuration-->
    <config name="process">
    <config name="type">email_autoresponse</config>
    <config name="name">CIISONLINE_COM_AUTORESPONSE</config>
    <config name="start"></config>
    <config name="end"></config>
    </config>

    <!--Mail Connection-->
    <config name="connections">
    <config name="mail">
    <config name="type">Mail</config>
    <config name="host">imap.gmail.com</config>
    <config name="user">ciisonline.com</config>
    <config name="password"></config>
    <config name="crypto">ssl</config>
    <config name="port">993</config>
    <config name="service">imap</config>

    <config name="mailboxes">
    <config name="source">inbox</config>
    <config name="handled">handled</config>
    <config name="unhandled">unhandled</config>
    </config>
    </config>
    </config>

    <!--Recognizer-->
    <config name="recognizer">
    <config name="minLetters">5</config>
    <config name="maxLetters">7</config>
    <config name="brain">
    <config name="type">TextBrain</config>
    <config name="fact">Application/Email/Recognizers/responder.fact</config>
    <config name="knowledge">Application/Email/Recognizers/responder.knowledge</config>
    </config>
    </config>

    <!--Responder-->
    <config name="responder">
    <config name="default">Default</config>
    <config name="directory">Application/Email/Responder/</config>
    <config name="names">
    <config name="Default">
    <!--#THE RESPONDER CONFIGURATION#-->
    <config name="type">Application_Email_Responder_Body</config>
    <config name="use_template">1</config>
    <config name="mail">
    <config name="from">ciisonline.net@gmail.com</config>
    <config name="fromname">CIISONLINE NET</config>
    <config name="replyto">ciisonline.net@gmail.com</config>
    <config name="replytoname">CIISONLINE NET</config>
    <config name="rpath">ciisonline.net@gmail.com</config>
    <config name="body" xml:space="preserve">
    Hello {toname},

    Thanks You
    {fromname}
    </config>
    </config>
    </config>
    <config name="OrderForm">
    <!--#THE RESPONDER CONFIGURATION#-->
    <config name="type">Application_Email_Responder_Body</config>
    <config name="use_template">1</config>
    <config name="mail">
    <config name="from">ciisonline.net@gmail.com</config>
    <config name="fromname">CIISONLINE NET</config>
    <config name="replyto">ciisonline.net@gmail.com</config>
    <config name="replytoname">CIISONLINE NET</config>
    <config name="rpath">ciisonline.net@gmail.com</config>
    <config name="body">OrderForm</config>
    <config name="bodyfile"></config>
    <config name="altbody"></config>
    <config name="altbodyfile"></config>
    </config>
    </config>
    <config name="ProductInfo">
    <!--#THE RESPONDER CONFIGURATION#-->
    <config name="type">Application_Email_Responder_Mime</config>
    <config name="use_template">1</config>
    <config name="mail">
    <config name="from">ciisonline.net@gmail.com</config>
    <config name="fromname">CIISONLINE NET</config>
    <config name="replyto">ciisonline.net@gmail.com</config>
    <config name="replytoname">CIISONLINE NET</config>
    <config name="rpath">ciisonline.net@gmail.com</config>
    <!--<config name="mime"></config>-->
    <config name="mimefile">Application/Email/Mimes/html.eml</config>
    </config>
    </config>
    <config name="ProductCatalog">
    <!--#THE RESPONDER CONFIGURATION#-->
    <config name="type">Application_Email_Responder_Mime</config>
    <config name="use_template">1</config>
    <config name="mail">
    <config name="from">ciisonline.net@gmail.com</config>
    <config name="fromname">CIISONLINE NET</config>
    <config name="replyto">ciisonline.net@gmail.com</config>
    <config name="replytoname">CIISONLINE NET</config>
    <config name="rpath">ciisonline.net@gmail.com</config>
    <!--<config name="mime"></config>-->
    <config name="mimefile">Application/Email/Mimes/message.eml</config>
    </config>
    </config>
    </config>
    </config>

    <!--Control-->
    <config name="control">
    <config name="sleepingduration">1000</config>
    <config name="errorsthreshold">10</config>
    </config>

    <!--Response-->
    </section>
    </configuration>






Related Pages


  1. Manifest Processes List Page

    Display list of Queen manifest processes.




Related Topics


  1. Manifest (Concept)

  2. Service Bus (Concept)

  3. Capability (Concept)

  4. Automation Platform (Concept)

  5. Process Platform (Concept)

  6. Queen (Concept)

  7. Nest (Concept)




Notes





How to sync data/files between site?

You must prepare your IPC first as explains before.
Then your only work as an example is defined manifest like this:



<?xml version="1.0" encoding="UTF-8"?>
<configuration id="file_synchronize">
<section name="core">
<!-- Process Configuration-->
<config name="process">
<config name="type">file_synchronize</config>
<config name="name"><![CDATA[FileSynchronizer]]></config>
<config name="description"><![CDATA[File Synchronizer]]></config>
<config name="start"></config>
<config name="end"></config>
</config>

<!--Wrapper Configuration-->
<config name="wrappers">
<config name="doc">
<config name="wrapper">fep</config>
<config name="server">http://localhost/document/Public/IPC.php</config>
<config name="user">admin</config>
<config name="password"></config>
<config name="md5">1</config>
</config>
<config name="admin">
<config name="wrapper">fep</config>
<config name="server">http://localhost/admin/Public/IPC.php</config>
<config name="user">admin</config>
<config name="password"></config>
<config name="md5">1</config>
</config>
</config>

<!--Proxy Configuration-->
<config name="proxy">
</config>

<!--Update Configuration-->
<config name="sync">
<config name="all">0</config>
<config name="directories">Extensions</config>
<config name="exceptions"></config>
<config name="files">index.php</config>
<config name="source">doc://</config>
<config name="destination">admin://Public/tmp/test/</config>
</config>

</section>
</configuration>



Execute this manifest then.

How to setup IPC?

Preparation for IPC is only in this configuration:



<?xml version="1.0" encoding="UTF-8"?>
<configuration id="ipc">
<section name="directories">
<config name="tmp">
<config name="name">tmp</config>
<config name="description">tmp</config>
<config name="dir">/tmp/</config>
<config name="protectdir"></config>
</config>
<config name="queue">
<config name="name">RemoteQueue</config>
<config name="description">RemoteQueue</config>
<config name="dir">/data/ext-01/Miscs/admin/RemoteQueue</config>
<config name="protectdir"></config>
</config>
</section>
</configuration>

How to setup Remote Queue server?

You can expose more than one queue to remote user. Your only work is configure your queue server setting and your queue.

Here is an example of server configuration:





<?xml version="1.0" encoding="UTF-8"?>
<configuration id="queuesvr">
<section name="core">
<config name="root">queue</config>
<config name="selector"></config>
</section>

<section name="queues">
<config name="SYSTEM">
<config name="description">?</config>
<config name="queue">
<config name="ref">QUEUEROUTER:SYSTEM:default</config>
</config>
<config name="selector">inbox</config>
<config name="parameters"></config>
</config>
<config name="SYSNOTIFY">
<config name="description">?</config>
<config name="queue">
<config name="ref">QUEUEROUTER:NOTIFYSUBSCRIBER::{subscriber}:default</config>
</config>
<config name="parameters">
<config name="subscriber">subscriber</config>
</config>
<config name="selector">subscriber</config>
</config>
<config name="SUBSCRIBER">
<config name="description">?</config>
<config name="queue">
<config name="router">
<config name="selectors">
<config name="subscriber">
<config name="selector" >
<config name="type" >Message</config>
<config name="unique-id" >subscriber</config>
</config>
<config name="box">
<config name="ref">QUEUEBOX:NOTIFYSUBSCRIBER:Sync:{subscriber}:subscriber:buffer</config>
</config>
</config>
</config>
</config>
</config>
<config name="parameters">
<config name="subscriber">subscriber</config>
</config>
<config name="selector">subscriber</config>
</config>

</section>
</configuration>


Full features CRUD database no more than 1 minute

You can create full features CRUD (create, read, update, and delete) database application in no more than 1 minute. Here are your steps to create such of application:


  • Create your table database.

  • Create manifest with process_type: gencode_dblist1,or gencode_dbmaint1, or gencode_dbmix1. Fill only the name of application and table you just created. (another process_type will be added countinually.)

  • Execute the manifest.

  • Install your application in container.



You can finishing step 2 and 3 in no more than 1 minute.
If you fast enough doing step 1 and 4, all steps can be finishing in ~ 1 minute.

Here is an example CRUD database application that need only 20 seconds for step 2 and 3:




Manifest in usage:

<?xml version="1.0" encoding="UTF-8"?>
<configuration id="mix">
<section name="core">
<!-- Process Configuration-->
<config name="process">
<config name="type">gencode_dbmix1</config>
<config name="name">GenCodeDbmix1TEST</config>
<config name="start"></config>
<config name="end"></config>
</config>

<!--Database Connection-->

<!--configuration-->
<config name="config">
<config name="public">0</config>
<config name="securitycodes">
<config name="default">
<config name="code">2</config>
<config name="name">dbmix1 TEST</config>
<config name="description">dbmix1 TEST</config>
</config>
</config>
</config>

<!--Query-->
<config name="query">
<config name="table">Test</config>
</config>

<!--Form-->
<config name="form">
<config name="search">
<config name="name">Test</config>
<config name="parameters">
<config name="ds_keywords">
<config name="type">like</config>
<config name="caption">KeywordsColumn</config>
<config name="column">1,0</config>
</config>
</config>
</config>
<config name="data">
<config name="frame">
<config name="maint">
</config>
</config>
</config>
</config>

<!--Output-->
<config name="output">
<config name="sign"><![CDATA[stevanus.dh@gmail.com]]></config>
</config>

<!--Item-->
<config name="item">
<config name="name">Test</config>
<config name="names">Tests</config>
</config>

<!--Class-->
<config name="class">
<config name="name">TestMix</config>
<config name="author">Stevanus DH</config>
<config name="package">TEST</config>
<config name="version">1.0.0</config>
<config name="copyright">Stevanus DH</config>
<config name="description">DESCR</config>
</config>

</section>
</configuration>































CommentLuv Enabled

Followers