You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.5 KiB
Groovy
39 lines
1.5 KiB
Groovy
def smardigoUrl = "https://" + cluster.stage + "-management-01-connect.smardigo.digital/api/redirect/process/" + contextScopeId + "/dossier/simple-connect/" + contextProcessId
|
|
def smardigoMessageUrl = "https://" + cluster.stage + "-management-01-connect.smardigo.digital/api/v1/scopes/" + contextScopeId + "/processes/" + contextProcessId + "/messages"
|
|
|
|
def message = [:]
|
|
message["@type"] = "MessageCard"
|
|
message["@context"] = "http://schema.org/extensions"
|
|
message["themeColor"] = "0076D7"
|
|
message["summary"] = "Neue Aufgabe: " + comment
|
|
|
|
def section = [:]
|
|
section["activityTitle"] = activityTitle
|
|
section["activitySubtitle"] = activitySubtitle
|
|
section["activityImage"] = "https://smardigo.de/wp-content/uploads/2020/01/smardigo-min.png"
|
|
message.sections = [section]
|
|
|
|
def potentialAction = []
|
|
|
|
def openInSmardigo = [:]
|
|
openInSmardigo["@type"] = "ViewAction"
|
|
openInSmardigo["@context"] = "http://schema.org"
|
|
openInSmardigo["name"] = "Vorgang öffnen"
|
|
openInSmardigo["target"] = [smardigoUrl]
|
|
potentialAction.add(openInSmardigo)
|
|
|
|
if (vorgang_status < 30) {
|
|
def approveInSmardigo = [:]
|
|
approveInSmardigo["@type"] = "HttpPOST"
|
|
approveInSmardigo["name"] = "Server freigeben"
|
|
approveInSmardigo["target"] = smardigoMessageUrl
|
|
approveInSmardigo["body"] = "{\"message\":\"process-approved-" + contextProcessId + "\"}"
|
|
approveInSmardigo["headers"] = [
|
|
[name:"Smardigo-User-Token",value:envSmardigoUserToken]
|
|
]
|
|
potentialAction.add(approveInSmardigo)
|
|
}
|
|
|
|
message.potentialAction = potentialAction
|
|
|
|
message |