Hi everyone,
I configured mail (using SendGrid) with connector in camunda 8 using Camunda 8 SaaS SendGrid connector | Camunda Platform 8 and it is working fine , I am able to send mail , Now I want same configuration with my self managed configuration using docker , where should I give my secret key in java instead of Clusters ( Secret Key)? Can we trigger SendGrid Mail without secret key( API key) ? Instead of Secret key I have given direct Mail API key in BPMN Still not able to send mail , Any document or suggestion is helpful ? Thanx in advance
Hey @Avinash_Rawat,
in Camunda Platform 8 SaaS, the provided connectors are operated by Camunda offered in the scope of the product. In Camunda Platform 8 Self-Managed, the user can employ the same concept of element templates and job workers to provide their connector landscape.
So the SendGrid Connecter is not shipped in the self-managed Version of Camunda 8. But if you use the element templates you can create one by yourself.
Best,
Thomas
Hi @Hafflgav,
I went through Element Templates documents Configuring template , there were two options for configuration
**1. Retrieve from Cawemo **
2. Local filesystem
As I do not have Enterprise version , So I can not retrieve from Cawemo. Then I went with Local fileSystem method , In user Data Directory I added folders and added json file but I am facing below errors :-
Cannot destructure property ‘frames’ of ‘t’ as it is undefined.
[C:\Users\AvinashRavat\Downloads\diagram_4.bpmn] template C:\Camunda\resources\element-templates\my-element-templates.json parse error: Unexpected token } in JSON at position 339
When I am creating for custom class template with service task it is working fine with below code:-
{
“$schema”: “https://unpkg.com/@camunda/element-templates-json-schema@0.7.0/resources/schema.json”,
“name”: “Mail Task”,
“id”: “com.camunda.example.MailTask”,
“appliesTo”: [“bpmn:ServiceTask”],
“properties”: [
{
“label”: “Implementation Type”,
“type”: “String”,
“value”: “com.mycompany.MailTaskImpl”,
“editable”: false,
“binding”: {
“type”: “property”,
“name”: “camunda:class”
}
},
{
“label”: “Sender”,
“type”: “String”,
“binding”: {
“type”: “camunda:inputParameter”,
“name”: “sender”
},
“constraints”: {
“notEmpty”: true
}
},
{
“label”: “Receivers”,
“type”: “String”,
“binding”: {
“type”: “camunda:inputParameter”,
“name”: “receivers”
},
“constraints”: {
“notEmpty”: true
}
},
{
“label”: “Template”,
“description”: “By the way, you can use freemarker templates ${…} here”,
“value”: “Hello ${firstName}!”,
“type”: “Text”,
“binding”: {
“type”: “camunda:inputParameter”,
“name”: “messageBody”,
“scriptFormat”: “freemarker”
},
“constraints”: {
“notEmpty”: true
}
},
{
“label”: “Result Status”,
“description”: “The process variable to which to assign the send result to”,
“type”: “String”,
“value”: “mailSendResult”,
“binding”: {
“type”: “camunda:outputParameter”,
“source”: “${ resultStatus }”
}
},
{
“label”: “Async before?”,
“type”: “Boolean”,
“binding”: {
“type”: “property”,
“name”: “camunda:asyncBefore”
}
}
]
}
But when I am trying with custom connector template with service task getting error
{
“name”: “ConnectorGetTask”,
“id”: “my.connector.http.get.Task”,
“appliesTo”: [
“bpmn:Task”
],
“properties”: ,
“scopes”: [
{
“type”: “camunda:Connector”,
“properties”: [
{
“label”: “ConnectorId”,
“type”: “String”,
“value”: “My Connector HTTP - GET”,
“binding”: {
“type”: “property”,
“name”: “connectorId”
}
},
…
]
}
]
}
Error:-
Cannot destructure property ‘frames’ of ‘t’ as it is undefined.
[C:\Users\AvinashRavat\Downloads\diagram_4.bpmn] template C:\Camunda\resources\element-templates\my-element-templates.json parse error: Unexpected token } in JSON at position 339
Can you tell me why this error ? Json file will change accordingly our need ? Can you refer me any json file related document , I am doing something wrong in json file only.
Regards,
Avinash
This is saying that your JSON file C:\Camunda\resources\element-templates\my-element-templates.json file is not valid. Specifically you have a } where it shouldn’t be.
Hey @Avinash_Rawat!
I might have mistaken something - It might be the case that the integration framework for connectors on Self-managed is not released yet. @aleksander-dytko am I right that this functionality is going to be released in the next version?
okay @Hafflgav But as you told to create Element template in Camunda 8 self managed and then I tried with Local file system as I do not have enterprise version . Configuring templates | Camunda Platform 8 , Below I am able to use custom Element Template .
Then I configured Rest connectors input/output Below you can see
Then I ran my spring code for process deployment , I am facing Below Issue while deploying process
Any Help or suggestion is appreciable @Hafflgav @aleksander-dytko @davidgs @amara.graham @Niall @jonathan.lukas Thanx in Advance
Regards,
Avinash
Could it be @Avinash_Rawat that you are using a Camunda 7 BPMN diagram for modelling purposes? The underlying XML is not compatible with Camunda 8.
No @Hafflgav, Actually I am using Camunda 8 Modeler for BPMN diagram in that I manually Configured Element Template for Rest Connector , You can check below diagram
restconnector.bpmn (2.9 KB)
@PreetiNirwal could you take a look at this issue with element templates? Maybe you’ve seen it somewhere else
Hi @Avinash_Rawat,
in the XML the zeebe:taskDefinition type="http"
is defined twice (lines 14 and 22):
Please check or share your element template definition to get an idea if it may be an issue with the element template framework.
Hope this helps, Ingo
Hi @Ingo_Richtsmeier Thank you,
As you told there are two task definition in XML , I removed one , now I am able to deploy my Process by Spring Boot Thank you but Now I am facing Issue in my Element Template Here is the Element Template file which I am using in my local desktop modeler . when I am adding that Json file (Element Template ) then I am getting below connectors in that I am selecting Rest Connectors
Properties I am giving down, here is External API
My token is getting stop here only on Rest connector Activity.
Any Help is appreciable
Regards,
Avinash
Hi @Avinash_Rawat,
you need a worker to execute the rest calls. This project may help you further: GitHub - camunda-community-hub/zeebe-http-worker: Zeebe worker for HTTP calls
Hope this helps, Ingo
Hi @Ingo_Richtsmeier Thanx ,
Actually I have already one Zeebe worker in my code , Can you check once my code ? Rest Connector Git HUB code
I will go once with your given github example.
Thanx,
Avinash
Hi @Avinash_Rawat,
in your process model you have a service task with taskDefinition "http"
. Your worker subscribes for taskDefinition (type) "connector"
.
This is why the task is not executed in the process instance. taskDefinition in the bpmn has to match the type in the worker.
Hope this helps, Ingo
Hi @Ingo_Richtsmeier ,
Thanks for above solution by using GitHub - camunda-community-hub/zeebe-http-worker: Zeebe worker for HTTP calls this code I am able to complete my job and getting Rest API’s response to the Process , But same job I want to complete from Docker Image , I am running docker but job is not completing .
Any example or help is appreciable,
Thanks,
Avinash