Deploy sample app
Lead To Opportunity sample application consists of BPMN, DMN and Form units.
- BPMN - process def
- DMN - decision table
- Form - UI component
- Job Worker - custom app "toolkit"
The "toolkit" folder has custom app. You may explore the code in VS Code IDE.
Check the image in this path: GCP console > Artifact Registry > asia-south2-docker.pkg.dev/c8-labs/c8-labs-repo
We'll be using the pre-built Docker image for the custom app.
Check the image in this path: GCP console > Artifact Registry > asia-south2-docker.pkg.dev/c8-labs/c8-labs-repo
Deploy the worker tookit JAR.
envsubst '${UNAMESPACE}' < deploy-worker-toolkit.yaml | kubectl apply -f -
Add ingress to enable traffic flow to the deployed services.
envsubst '${UNAMESPACE}' < c8-ingress-with-toolkit.yaml | kubectl apply -f -
You may check the ingress definition in the assigned namespace.
Deploy process artifacts.
export ORCH_SECRET=$(kubectl get secret identity-secret-for-components -n ${UNAMESPACE} -o jsonpath="{.data.zeebe-secret}" | base64 --decode)
export TOKEN=$(curl https://${UNAMESPACE}.makelabs.in/auth/realms/camunda-platform/protocol/openid-connect/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials' \
-d 'client_id=orchestration' -d "client_secret=${ORCH_SECRET}" | jq -r '.access_token' )
curl -v --request GET \
--url "https://${UNAMESPACE}.makelabs.in/orchestration/v2/topology" \
--header "Authorization: Bearer $TOKEN" -H 'Content-Type: application/x-www-form-urlencoded'
curl -v --request POST "https://${UNAMESPACE}.makelabs.in/orchestration/v2/deployments" \
-H "Authorization: Bearer $TOKEN" \
-H 'Accept: application/json' \
-F resources=@1-lead-to-opportunity-dmn-form-webhook/new-lead-approval.dmn
curl -v --request POST \
--url "https://${UNAMESPACE}.makelabs.in/orchestration/v2/deployments" \
--header "Authorization: Bearer $TOKEN" \
--header 'Content-Type: multipart/form-data' \
--form 'resources=@1-lead-to-opportunity-dmn-form-webhook/lead-to-opportunity-with-dmn.bpmn'
curl -v --request POST \
--url "https://${UNAMESPACE}.makelabs.in/orchestration/v2/deployments" \
--header "Authorization: Bearer $TOKEN" \
--header 'Content-Type: multipart/form-data' \
--form 'resources=@1-lead-to-opportunity-dmn-form-webhook/lead-to-opportunity-with-webhook-Form.form'
You may check the deployment status via Operator console.
Now that solution is deployed, lets do a dry run with curl command.
curl -v --location --request PUT 'https://$UNAMESPACE.makelabs.in/connectors/inbound/new-lead-record' \
--header 'key: SRM-web-hook-8ui3nm' \
--header 'Content-Type: application/json' \
--data-raw '{
"companyName": "New Vista Travel Corp",
"companyPincode": "600001",
"companyContactPhone": "9836712345",
"companyContactEmail": "c@mail.com",
"agentNotes": "Meets the criteria as outlined in the last month sales manual",
"x-api-key": "SRM-web-hook-8ui3nm"
}'
You may check the runtime process instance via Operator console.