highbond_handler (Resource)
Schema
Required
name | String | The name of the handler |
Optional
actions | Block List | List of handler actions | |||||||||||||||||||||||||||||||||||||||||||||||||||
Nested Schema for `actions`Optional
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
condition_conjunction | String | Type of conditions, can have possible Enum values: allOf, anyOf | |||||||||||||||||||||||||||||||||||||||||||||||||||
conditions | Block List | An array of Conditions | |||||||||||||||||||||||||||||||||||||||||||||||||||
Nested Schema for `conditions`Optional
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
description | String | The description of the handler | |||||||||||||||||||||||||||||||||||||||||||||||||||
force_updates | Boolean | Allows overriding top-level 'create_only' option. | |||||||||||||||||||||||||||||||||||||||||||||||||||
id | String | The ID of this resource. | |||||||||||||||||||||||||||||||||||||||||||||||||||
shared | Boolean | Handlers can be marked as shared. Only shared handlers can be reused across multiple events in different workflows |
Read-Only
created_at | String | The date the handler was created |
updated_at | String | The date the handler was updated |
Example Usage
// Handler
resource "highbond_handler" "main" {
name = "Feb 26 Handler 1"
description = "Description of My first Handler"
shared = false
condition_conjunction = "allOf"
force_updates = true // Create only with force update changes
conditions {
name = "BViswa"
condition_type = "specificFieldsAreRequired" // Values can be specificFieldsAreRequired,fieldValueComparison
configuration {
field_names = ["reviewSummary", "reviewer"]
// Required when condition_type is fieldValueComparison
left_operand_field_name = highbond_attribute_type.text.field_name
right_operand_value = ["test"]
operator = "equals"
}
scopes = ["self"]
on_failure_action = "stopAllHandlersForThisEvent"
// on_failure_display_message will be deprecated and replaced by show_failure_message. Only this boolean OR show_failure_message may be set in a single request
// Strictly Use either `on_failure_display_message` or `show_failure_message`. Do not use both the fields together
on_failure_display_message = true
show_failure_message = true
on_failure_message = "Testing"
}
actions {
name = "Action name1"
action_type = "transitionStatus" // Values can be notify,transitionstatus,runRobot and sendQuestionnaire
configuration {
status_id = "8bdecf0c-1145-4e2c-af90-da3a0595ec19" // Required when action_type is transitionStatus
}
scopes = ["self"]
}
actions {
name = "Action name2"
action_type = "notify"
configuration {
emails = ["ccc@aaa.com", "ddd@bbb.com"]
email_body = "This is test body"
email_subject = "This is the subject"
}
scopes = ["self"]
show_success_message = true
on_success_message = "Test success message"
}
actions {
name = "Action name3-Rub robot task"
action_type = "runRobot"
configuration {
task_id = highbond_robot_task.main.id
}
scopes = ["self"]
}
actions {
name = "Action name2-send the Questionnaire"
action_type = "sendQuestionnaire"
configuration {
allowed_questionnaire_ids = [highbond_questionnaire.main.id]
questionnaire_context_fields = ["field_names"]
email_attribute_field_name = highbond_attribute_type.email.field_name
distribution_type = "automated" // Values can be manual,automated
sent_questionnaire_id = highbond_questionnaire.main.id // Required when distribution_type is automated
}
scopes = ["self"]
}
}