Start Workflows Using Email Runner

The custom engine of Email Runner is used to start or initiate a workflow. This engine requires custom code written in Visual Basic; the custom code decides the actions to be performed when a workflow is started. Custom code is triggered when the donotdelete tag is not available in the body of the email sent to Email Runner. The user who is assigned the workflow item receives the email notification.

To start workflows using Email Runner

  1. In Email Runner, in connection string, enter the details of Easy Workflow database. The information required are the database server, database name, user name, and password to connect to the database.
  2. Starting-workflow-using-email-1
  3. Declare a variable of the type of class and create an instance of the class.
  4. If Assign to in the workflow definition is set to Initiator of Workflow, specify the EShare file ID in the custom code on which the workflow must be started.
  5. In the custom code specify the Windows user ID of the users who can initiate the workflow. Here DC1, DC2, DC3, and DC4 indicates the IDs that must be used in the email template. The user ID mentioned in custom code should be defined in both Easy Workflow Cockpit and also in Email Runner.
  6. Starting-workflow-using-email-3
  7. In the custom code, mention the workflow ID to be started on the EShare file specified in step 3.
  8. Starting-workflow-using-email-4
  9. Save the custom code.
  10. Follow these steps to start a workflow using email:
    1. Write an email that does not consist of any format keyword donotdelete tag, but consists of workflow initiator information.
    2. Send this email to Email Runner.
    3. Custom code is run to start the workflow. A message is displayed to the initiator or assigned user of the workflow that indicates that the custom engine has processed successfully and that the workflow is started.

You can also write custom code to download an Excel file from EShare server, copy the data received from email (without the donotdelete tag) to this Excel file, and then start workflow on the file.

Related Topics: