Workflow via Http

For companies where the IMAP and POP protocols are not activated, Workflow can not be used by sending and responses via e-mail, because it is essential that one of these protocols of mailbox reading is active (the MAPI protocol is not supported by Microsiga Protheus®).

If the SMTP protocol is active, the Workflow can be used through the answer via Microsiga Protheus® HTTP, using technology ADVPLASP. An email is sent via SMTP with a link in the body of the message. This link points to an HTML visible to the HTTP of Microsiga Protheus® and automatically generated by Workflow through a standard process. Then it opens the HTML file in the Internet Explorer® Browser to be answered.

Example of Code:

//Excerpt from the creation of a standard Workflow process, but in the cTo information it is informed a user of Microsiga Protheus®

:

oProcess:cTo := 'siga'

:

// end of the Excerpt of the standard process creation

cMailID := oProcess:Start()    //Start the Process and keep the process ID.

oProcess:newtask('Link', '\workflow\wflink.htm')  //Start a new Task with a Simple HTML.

oProcess:ohtml:valbyname('user', SA2->A2_NAME)

oProcess:ohtml:valbyname('proc_link', 'http://127.0.0.1/messenger/emp' + cEmpAnt + '/siga/' + cMailId + '.htm' ) //Define the Link where the HTML was saved by Workflow, below the user directory defined in cTo of the process above.

oProcess:ohtml:valbyname('title', 'Price Quotation - Microsiga Protheus®')

oProcess:ohtml:valbyname('reference', 'Price Quotation - Microsiga Protheus®')

oProcess:cTo := [email protected]

oProcess:csubject := 'Price Quotation - Microsiga Protheus®” '

oProcess:Start()

Endif  

 

//Code of HTML wfLink.htm

HTML

<head>

<title>Untitled Document</title>

<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>

<head>

<body bgcolor='#FFFFFF' bgproperties='fixed' background='C:/mp8/workflow/fundo8.JPG'>

</body>

<form name='form1' method='post' action=''>

 <p>&nbsp;</p>

 <p>&nbsp;</p>

 <p>&nbsp;</p>

 <p>Sr. !usuario! </p>

 <p>Please, if you want to access <a href='!proc_link!' title='!titulo!'><processo/a> of Workflow related to !referencia!</p>

</form>

</body>

HTML