Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
posting_messages_on_slack [2017/10/27 02:48]
admin created
posting_messages_on_slack [2017/10/27 23:22] (current)
admin
Line 1: Line 1:
-==== Posting Messages ​on Slack ====+====== Post Slack Message ====== 
 + 
 +===== Description ===== 
 + 
 +Posts a message ​on Slack workspace. For example, this can be used to inform about the progress of a model that might take many hours to run. 
 + 
 +===== Inputs ===== 
 + 
 +^ Name  ^ Type  ^ Description ​ ^ 
 +| Message ​ | [[String Type]] ​ | Message that will be posted on the slack channel. The message may include multiple lines of text.  | 
 +| Channel ​ | [[String Type]] ​ | Slack channel where the message will be posted. Must start with a an "#"​. Ex: "#​experimental"​. The channel must exist on the Slack workspace or the message will be ignored. ​ | 
 +| Slack Webhook ​ | [[String Type]] ​ | URL of the corresponding Slack workspace webhook. This URL should be enabled for the Slack service before using it. Ex: "​https://​hooks.slack.com/​services/​xxxxxx/​yyyyy/​zzzzzz" ​ | 
 + 
 +===== Optional Inputs ===== 
 + 
 +^ Name  ^ Type  ^ Description ​ ^ Default Value  ^ 
 +| Username ​ | [[String Type]] ​ | Username of the user posting the message. This username does not have to be a real user name. The name can include spaces and hyphens. Ex: "​Dinamica EGO - Model"​. ​ | Dinamica EGO  | 
 + 
 +===== Output ===== 
 + 
 +^ Name  ^ Type  ^ Description ​ ^ 
 +| Always True  | [[Boolean Value Type]] ​ | Used to facilitate chaining this submodel to other functors. Explicitly chaining functors simplify the definition of a custom execution order among them.  | 
 + 
 +===== Notes ===== 
 + 
 +This submodel uses the [[https://​cran.r-project.org/​web/​packages/​curl/​index.html|R package "​curl"​]] to post a message to an [[https://​slack.com/​|Slack channel]] specified. 
 + 
 +In order to work with Slack, the submodels asks for the definition of an "​incoming webhook"​ used to allow the communication between external applications and a Slack workspace. More information about how to create a webhook once you have created a slack channel can be found [[https://​api.slack.com/​custom-integrations/​incoming-webhooks|here]]. 
 + 
 +As an additional constraints,​ the model using the submodel as part of its definition must be executed using a [[http://​csr.ufmg.br/​dinamica/​dokuwiki/​doku.php?​id=reference_book:​r_coupling#​calculate_r_expression|custom R interpreter]],​ since the R script will automatically download and install the package "​curl"​ if necessary. If downloading and installing the package is not possible, the submodel execution will have no effect. 
 + 
 +===== Group ===== 
 + 
 +[[Functor List#Slack | Slack]] 
 + 
 +===== Internal Name ===== 
 + 
 +PostSlackMessage