Service Tasks
Why use a service task?
Use a service task to send an email notification, save a form to the repository, start a workflow, or run a rule within a process. If a user must take action as part of the task, use a user task instead.
Email Service Tasks
Email service tasks automatically send an email to one or more users at a specified point in the business process. These service tasks are useful if a user does not have to take action in a process but should still be kept informed of its progress.
Email service tasks are represented by the following symbol:
To send an email during a process
- Open the process designer of the business process.
- Place an Email Service Task onto the canvas and connect it to the objects that precede and follow it in the process.
- Double-click the task to open its Properties dialog box.
- In the Name field, enter a descriptive name for the task.
- Under Description, describe the role that the task plays in the process.
- Fill in the Send to field. Use the Show Reply to/CC/BCC link to also fill in CC and BCC recipients. Click the Insert Variable button to insert a placeholder for process or field information.
- For the From field, select from the available display names, or click Manage display names to create a new one. See Email Display Names for more information.
- Fill in the Subject, and Body fields. Click the Insert Variable button to insert a placeholder for process or field information such as the name of the person who started the process, the submitter, any user task actions or comments, and field values.
- The Previous submitter variable refers to the last user or service that submitted a form.
- The Previous user submitter variable refers to the last user who submitted a form. This ignores any more recent service tasks that submitted a form.
- You can use rich-text to compose the email body.
- Optional: Click the checkbox for Include action history to attach a PDF of the last 10 completed steps of action history in the email. Use the action history section title field to name the action history section, including the option of using the token button (right arrow) to include process variables in the name. Under Action history location, choose between the following options:
- Before the form: The action history will be placed at the beginning of the form as a single document.
- After the form: The action history will be placed at the end of the form as a single document.
- As separate document: The action history will be included as a separate file from the form.
Workflow Service Tasks
Workflow service tasks start a workflow at a specific time in a business process. In the Workflow Service Task properties window, select the name of the workflow that should begin and the variables you want to send as inputs when the process reaches the service task. This service task lets you retrieve values from the completed workflow and assign those values to process variables.
For an example that uses this feature across process automation, see the Migrating Laserfiche Form Tables into Microsoft Word Documents whitepaper.
Workflow service tasks are represented by the following symbol:
To start a workflow during a process
- Open the process diagram of the business process from which you want to start a workflow.
- Place a Workflow Service Task onto the canvas and connect it to the objects that precede and follow it in the process.
- Double-click the task to configure its properties.
- In the Name field, enter a descriptive name for the task.
- Under Description, describe the role that the task plays in the process.
- In the Workflow name field, type or select the name of the workflow you want to start. If the workflow does not exist in the list, use the Manage workflows link to locate or create the workflow, and configure it for use with external processes. Once selected, you can use the Open selected workflow link to view the workflow and review how it will function.
- Select Wait for the invoked workflow to finish running before continuing to run the current process to pause this service task while the workflow runs, and resume when complete.
Note: If not selected, output values can not be retrieved from the workflow, as the process will continue without waiting for the values.
- Configure input and output values. Workflow parameters must be configured in the workflow prior to using them in a business process.
- Configure the Input values with the business process variables or other data that the process will send to the workflow.
- If you chose to have the process wait for the workflow to finish, configure which business process variables will be populated with the information returned from the workflow through the output parameters.
Field Mapping Guide
- When passing workflow outputs to checkboxes, dropdowns, and radio buttons, if the option already exists in the variable, it will show as selected on the next form. If the option does not already exist, the behavior varies.
- For checkboxes and dropdowns, an output value that does not exist will be appended to the options list and selected on the next form.
- For radio buttons, an output value that does not exist will not lead to any selection or change in the list.
- If a workflow output is mapped to a field inside a table or collection, all existing values for that field will be replaced. To change specific values in a table/collection:
- Pass the table variable to the workflow as a multi-value input parameter.
- Make the desired changes to the row elements in the workflow.
- Pass the token back via multi-value output parameter into the same field.
- Any invalid value passed back will erase any existing value in the variable.
- Any blank value passed back will erase existing values
Supported data types for workflow interactions:
- Input values: Single line, Multi-line, Radio button, Checkbox (as a whole and all individual options), Dropdown, Address (as a whole and all individual fields), Number, Email, Date (with or without time), Time, Currency, Geolocation (as a whole and each individual sub-field), and any supported fields in tables and collections.
- Not supported: File upload, Rich text, Signature, and Custom HTML.
- Output values: Single line, Multi-line, Radio button, Checkbox (as a whole and all individual options), Dropdown, Address (individual fields), Number, Email, Date (with or without time), Time, Currency, Geolocation (individual sub-fields only), and any supported fields in tables and collections.
Example: When a sales representative submits an initial inquiry form, a workflow runs that calculates a time estimate for the project, creates custom client documents in the repository, and creates a WebLink URL to the client documents. After the workflow finishes, it passes the URL back to business processes. Business processes then sends a new form to the sales representative with a link to the information packet.
Rules Service Task
#Rules-Service-TaskThe Rules service task is an extremely powerful feature that allows you to use rules to manipulate variables within a process.
Rules service tasks are represented by the following symbol:
To run a rule during a process
- Open the process diagram of the process from which you want to run a rule.
- Place a Rules Service Task onto the canvas and connect it to the objects that precede and follow it in the process.
- Double-click the task to configure its properties.
- In the Name field, enter a descriptive name for the task.
- Under Description, describe the role that the task plays in the process.
- Select the type of rule you wish to run.
- Select the rule to run.
- If the rule desired is not in the list, click the Manage rules link to open the Rules page to create or troubleshoot your rule.
- To view details or edit your rule, click the Open selected rule link.
- Once the rule has been published, click the refresh button to update the rule list or input/output value availability.
- If the rule has input parameters, click the Add input values link to select the parameters to make available to the process.
- Select the necessary parameters, and click Update to add them to the process.
- Configure which values will be passed to the rule. Use the variable picker to select from available variables within the process.
- If the rule has output parameters, click the Add output values link to select the parameters to make available to the process.
- Select the necessary parameters, and click Update to add them to the process.
- Configure which variables will be populated by the rule. Use the variable picker to select from available variables within the process.
Save to Repository Service Tasks
The Save to Repository service task save a copy of a particular form and its attachments to the Laserfiche repository. While the task attempts to preserve all data and maintain the basic layout of the form, there are limitations that are related to printing any web page. Please test the process, review the output, and verify that the output is sufficient for your business requirements.
Note: The Save To Repository task runs as a service process and does not have access to the user's cookies, browser storage, or any custom JavaScript on the form. This may create difficulties in rendering external sites embedded in iframes on a form.
You can configure the following options for Save to Repository service tasks:
- The template and fields that the saved document will have. You can fill fields with values from form fields.
- When in the process the form submission document will be created.
- Whether the process will wait for the task to complete before proceeding to the next step(s) in the process.
- The document name, path, format, and relationships between the form and its attachments.
Save to Repository service tasks are represented by the following symbol:
To save a form to a repository during a process
- Open the process designer of the business process.
- Place a Save to Repository Service Task onto the canvas and connect it to the objects that precede and follow it in the process.
- Double-click the task to configure its properties.
- In the Name field, enter a descriptive name for the task.
- Under Description, describe the role that the task plays in the process.
- Select Allow process to continue before service task completes if you want the process to start the Save to Repository task, then continue on to the next steps without waiting for the task to complete. If this option is cleared, a failed Save to Repository task will suspend the entire process, meaning that later steps in the process will not be taken.
- Select Generate Laserfiche pages when importing PDFs to generate Laserfiche TIFF image pages when a PDF is imported.
- In the Repository profile drop-down list, select a repository profile.
- Under the Save settings section, select the form you want to save to the repository.
- If you select Save the submitted form from this process step, choose the form that was submitted at the step specified. If the step was an earlier step, the document saved to the repository will reflect the previous values submitted on the form.
Note: If selected, all variables from the selected step will be applied including the folder/path save location.
- If you select Save a form with current process data, the saved form will use the current values for each field.
- Select Do not include any attachments to save forms in the repository without any attachments.
Note: If you want a document with specific formatting, you can create a copy of the original form, remove any fields that are not required, adjust the formatting, and use it with this setting to print the current process data.
- If you select Save the submitted form from this process step, choose the form that was submitted at the step specified. If the step was an earlier step, the document saved to the repository will reflect the previous values submitted on the form.
- After selecting between the two options in the previous step, select the form you want to save from the drop-down menu. If you selected Save the submitted form from this process step, you will also have to select the step/user task.
Once you select a form from the drop-down list, options for configuring the form and any of its attachments will appear.
- In the Document name field, enter a name for the form submission document in the repository. Click the Insert Variables button to insert a value from form or process variables into the name.
- In the Save location area:
- Under Folder ID, specify a folder in the repository to save into regardless of its path. This can be done by entering a valid folder ID, selecting from the variable picker, or using the folder picker.
Note: Use this option if you always want to save documents to the same folder. Using the folder ID to select the folder will keep your process running smoothly even if that folder is moved or renamed in the repository.
- Under Additional Path, specify an absolute path to where you would like the submissions to be saved. If Folder ID is blank, this path will be determined from the repository root. If Folder ID is set, this path will be below the specified folder.
Note: Use this option if you want the folder to be dynamic based on values in the form submission. For example, this would be the right choice if you wanted to save submissions based on date
For example, to place any form submissions in a date-based structure, you might select a folder from the folder ID called "new clients", then use variables to create sub-folders based on the date and information from the form itself.
- Under Folder ID, specify a folder in the repository to save into regardless of its path. This can be done by entering a valid folder ID, selecting from the variable picker, or using the folder picker.
- (Optional) Under Locations, manually specify latitude and longitude or use the token picker to add variables to save geolocation information for submitted forms or file upload variables. Multipoint coordinates can be used with the following format: Latitude; Longitude; Latitude; Longitude.
- If a single point location is used, the values can be checked in the details pane of the saved document by clicking Show Map.
-
If a multipoint location is used, the values can be checked via the API.
- Under Save Options, select to save the document as a PDF or TIFF.
- Alternatively, select No Form to save a document that has metadata but no actual image or electronic document components. If you clear this option, the folder path you specified above will be created. (You can apply metadata to this folder with the Configure fields and Parent folder fields options below.) You may want to clear this option if you're only using a form to gather the metadata that you will apply to a folder where the form's attachments will be saved.
- Optional: Select Include action history to include the action history from preceding user tasks on the form. Use the action history section title field to name the action history section, including the option of using the token button (right arrow) to include process variables in the name. Under Action history location, choose between the following options:
- Before the form: The action history will be placed at the beginning of the form as a single document.
- After the form: The action history will be placed at the end of the form as a single document.
- As separate document: The action history will be saved as a separate file from the form. Use the Action history filename field to create a custom file name for action history document.
- Select Save business process data as XML if you would like to save an XML copy of the business process with the document.
- Under Fields, click Configure fields to select a template or field to apply to the document.
- In the Configure fields dialog box, choose a template from the drop-down menu or click Add/remove fields to choose the fields you want applied to the form.
- You can specify a value for each template field and any added fields. Click the Insert Variables button to populate any field with form or process variables.
- Click Done when you have finished configuring the fields.
Note: For radio button or drop-down fields on your form, you must have assigned values to the field's choices if you want to save those field's values as metadata in a repository. In addition, the field you want to populate in the entry's metadata must be a list field, and the values available in the list field must be identical to the values available in your form's drop-down field.
- Under Parent folder template, click Configure fields to select a template and fields to apply to the folder the form submission document is saved in.
- In the Configure fields dialog box, choose a template from the drop-down menu or click Add/remove fields to choose the fields you want applied to the form.
- You can specify a value for each template field and any added fields. Click the Insert Variables button to populate any field with form or process variables.
Note: For radio button or drop-down fields on your form, you must have assigned values to the field's choices if you want to save those field's values as metadata in a repository. In addition, the field you want to populate in the entry's metadata must be a list field, and the values available in the list field must be identical to the values available in your form's drop-down field.
- Click Done when you have finished configuring the fields.
- If your form has file uploads, a tab will appear for each upload. Configure these tabs as follows:
- In the Document name field, enter a name for the file upload document in the repository. Click the Insert variable button to insert the value from form or process variables into the name.
- Next to Path, select whether the file upload document should be saved in the Parent form location or an Other location. If you select Other location, click the Path ... button to browse to a path.
- In the Document relationships field, choose the relationship you want to apply between the uploaded file and the submitted form. Learn more about document relationships.
- Under Fields, click Configure fields to select a template and fields to apply to the uploaded file. In the Configure fields dialog box, choose a template from the drop-down menu and/or click Add/remove fields to choose the fields you want applied to the uploaded file. You can specify a value for each template field and any added fields. Click the Insert Variable button to populate the field with form or process variables.
Note: When saving data from a process to a metadata field in a repository entry, the format of the data must match the metadata field's format. Attempting to save mismatching formats (e.g. saving text data to a number field) will cause a "Bad field value" error.
Save to Repository Considerations
Unless the Allow process to continue before service task completes is selected, your process will become suspended at a Save to Repository task under the following conditions:
- If the task fails to create the document in the repository.
- If the task is unable to upload attachments to the repository.
- If any uncaught exception errors occur when the PDF is being generated.
The first two issues most commonly occur either when the built in ProcessAutomation user has not been granted access to the desired repository locations, or when fields are populated with incompatible data types or are to long for the destination fields.
Note: When the Save to Repository task does fail, any documents or files created before the point of failure will be left behind. If you retry the step in the process without checking, duplicate documents can be created. For example, if saving a form with attachments fails after the PDF is generated and saved, but while attempting to upload the attachments, the PDF document will not be deleted.
Outflow Tab
All tasks have an Outflow tab which lets you specify which pathway the process should take after the task has completed.