Finish Task

  • FireStart.finishTask(successHeaderText, successDescriptionText)
    • Calls function to finish the task form
    • @param {string} successHeaderText - Text that appears in the message banner header in case of successful completion of the task - optional
    • @param {string} successDescriptionText - Text that appears in the message banner description in case of successful completion of the task - optional

Example Form 

This example shows how to create an HTML control with a button that completes the task form using the function listed above. This does not apply only for buttons, but in the course of this example, a button is used.

The first step is to configure a form, in this case, it includes a text field that is required and a regular expression has been applied so that only valid email addresses can be entered.

htmlC_14_finishTask_1

Now you can write your HTML content. The form designer can use custom success messages as optional parameters of the FireStart.finishTask() function.

htmlC_15_finishTask_2

 

HTML
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"/>
<script>
function buttonClick() {
FireStart.finishTask("HTML Example", "Successfully finished the Task from the HTML Control!");
}
</script>
</head>
<body>
<div class="container">
<form>
<div class="form-group">
<button type="button" class="btn btn-primary" onclick="buttonClick()">Finish Task from HTML Control</button>
</div>
</form>
</div>
</body>
</html>

After you finished and saved your configuration, the workflow is ready to be started. 

htmlC_16_finishTask_3htmlC_18_finishTask_5

 

Note: Equal validation rules are applied to the FireStart.finishTask() function as to a regular form button.