Specify a name, frequency, interval (if required) and then select the actions the workflow should take. The Frequency determines when the workflow should be evaluated next. If it’s time based (Minutes, Hourly, Daily, Weekly, Monthly) then the Interval field will be available. Specify the number of minutes, hours, etc. before the workflow should be run again. Once run, the Next Run Date will be set to the next interval. If the workflow is setup as One Time, it will be evaluated and run once for each targeted object. There are 2 other frequencies that can be selected, On action executed and Always. The On action executed option will allow a workflow instance to be created and processed when a user executes an action. You can use a pre-defined action or include a caption for your action and a new Workflow action will be added automatically for the user to select. Finally, the Always option is evaluated on every iteration of the workflow service (30 seconds by default). Once an object meets certain criteria, it will be evaluated and you should plan to affect the object so it no longer meets the criteria on the next iteration.
A – Run this workflow against individual objects
This option allows you to specify a Target Object Type and provide some criteria that the object must match in order to be considered when evaluating the workflow. Use the Show Current Results to see all items that can be run with the workflow. Note that depending on the frequency, you may see more items listed than what will actually be processed. This is because the workflow server checks to see if the workflow has been run against an object previously before processing it again.
B – Invoke a Method
You can invoke a method on your business object. Specify the method name that should be called. Please note that your method cannot contain any parameters. You can optionally return a bool value which will be considered during the workflow evaluation. If a false value is returned, the workflow is cancelled and will be re-evaluated on the next iteration. If any other return type is provided, the value is ignored.
C – Send an Email
Select an Email Template to send to the recipient. If a Target Object Type is selected, the current object being evaluated will be used as a data source for the email template. Next, provide a static email address or the Email Property Path within the target object. We recommend including criteria to load objects with an email address already specified to limit the amount of objects being processed by the workflow server.
D – Attach a Report
Along with your email, you can optionally send a report. This report is exported and attached as a PDF or Excel document (xls or xlsx). Select a report and, if necessary, select a Report Data Source. This is a property within your business object that should be used as the report data source. Finally, specify a report name without extension. The extension will automatically be applied to the end of the report name. You can include a property place holder in the report name if desired (Example: Invoice for {LastName} )
E – Instances
Once your workflow has been Activated, instances will be displayed in the grid below. This will display the status and/or any errors that may have occurred with a workflow instance.