### Starting a Process Instance Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-core.md Example of starting a new process instance using the ProcessRuntime API with specified variables. ```APIDOC ## Starting a Process Instance We are using Spring Scheduling capabilities to start a process every second picking up random values from an array to process: ```java @Scheduled(initialDelay = 1000, fixedDelay = 1000) public void processText() { securityUtil.logInAs("system"); String content = pickRandomString(); SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yy HH:mm:ss"); logger.info("> Processing content: " + content + " at " + formatter.format(new Date())); ProcessInstance processInstance = processRuntime .start(ProcessPayloadBuilder .start() .withProcessDefinitionKey("categorizeProcess") .withProcessInstanceName("Processing Content: " + content) .withVariable("content", content) .build()); logger.info(">>> Created Process Instance: " + processInstance); } ``` Same as before, we are using the ProcessPayloadBuilder to parameterize which process do we want to start and with which process variables in a fluent way. ``` -------------------------------- ### Deploy Activiti Cloud Full Example Helm Chart Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud.md Installs the Activiti Cloud full example chart. Requires setting the global gateway domain and optionally a Keycloak client secret and HTTP mode. ```bash helm install example activiti-cloud-helm-charts/activiti-cloud-full-example --version 8.2.0 --set global.gateway.domain=REPLACEME --set global.keycloak.clientSecret=$(uuidgen) --set global.gateway.http=false ``` -------------------------------- ### Clone Activiti Cloud Examples Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose.md Clone the Activiti Cloud examples repository and navigate to the docker-compose directory. This is the starting point for setting up your local environment. ```bash git clone https://github.com/Activiti/activiti-cloud-examples cd activiti-cloud-examples/docker-compose ``` -------------------------------- ### Start All Services Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose.md Starts all services defined in the Docker Compose setup. This is a convenient command to bring up the entire Activiti Cloud environment. ```bash make all ``` -------------------------------- ### Example Helm Deployment Output Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud.md Shows a typical output after successfully installing the Activiti Cloud full example Helm chart, including access URLs for various services. ```bash NOTES: _ _ _ _ _ _____ _ _ /\ | | (_) (_) | (_) / ____| | | | / \ ___| |_ ___ ___| |_ _ | | | | ___ _ _ __| | / /\ \ / __| __| \ \ / / | __| | | | | |/ _ \| | | |/ _` | / ____ \ (__| |_| |\ V /| | |_| | | |____| | (_) | |_| | (_| | /_/ \_\___|\__|_| \_/ |_|\__|_| \_____|_|\___/ \__,_|\__,_| Version: 7.1.0-SNAPSHOT Thank you for installing activiti-cloud-full-example-7.1.0-M4 Your release is named example. To learn more about the release, try: $ helm status example $ helm get example Get the application URLs: Activiti Gateway : http://gateway.default.alfrescodemo.co.uk/ Activiti Identity : http://identity.default.alfrescodemo.co.uk/auth Activiti Modeler : http://gateway.default.alfrescodemo.co.uk/modeling Activiti Runtime Bundle : http://gateway.default.alfrescodemo.co.uk/rb Activiti Cloud Connector : http://gateway.default.alfrescodemo.co.uk/example-cloud-connector Activiti Query : http://gateway.default.alfrescodemo.co.uk/query Activiti Audit : http://gateway.default.alfrescodemo.co.uk/audit Notifications GraphiQL : http://gateway.default.alfrescodemo.co.uk/notifications/graphiql Notifications WebSockets : http://gateway.default.alfrescodemo.co.uk/notifications/ws/graphql Notifications Graphql : http://gateway.default.alfrescodemo.co.uk/notifications/graphql To see deployment status, try: $ kubectl get pods -n default raphaels-mbp-1:development raphaelallegre$ ``` -------------------------------- ### Create a New Microservice from a Quickstart Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Generate a new microservice using a Jenkins X quickstart template. ```bash jx create quickstart ``` -------------------------------- ### Start Application Service Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose.md Starts the main application services. This requires using Postman with the provided collection and environment setup to interact with Activiti Rest APIs. ```bash make application ``` -------------------------------- ### Create Activiti Cloud Platform Quickstart Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/amazon-eks-jx.md This command initiates the creation of your first Activiti Cloud Platform Git repository using the specified quickstart filter. The --batch-mode flag ensures non-interactive execution. ```bash jx create quickstart --owner activiti \ --filter activiti-cloud-platform-quickstart \ --project-name=activiti-cloud-application \ --batch-mode ``` -------------------------------- ### List Registered Quickstart Locations Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Displays a list of all registered quickstart locations in Jenkins X, including the Activiti organization. ```bash jx get quickstartlocations ``` -------------------------------- ### Start All Services with Docker Compose Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose.md An alternative command to start all services using the `docker-compose up` command directly. This achieves the same result as `make all`. ```bash docker-compose up ``` -------------------------------- ### Install aws-iam-authenticator Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/amazon-eks.md Installs the AWS IAM Authenticator for Kubernetes using go get. Ensure you are using Go 1.7 or greater. ```bash go get -u -v github.com/kubernetes-sigs/aws-iam-authenticator/cmd/aws-iam-authenticator ``` -------------------------------- ### Verify EKS Cluster Installation Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/amazon-eks-jx.md After the cluster creation command finishes, use 'jx get eks' to verify that the EKS cluster has been successfully provisioned and is available. ```bash jx get eks ``` -------------------------------- ### Add Activiti Quickstart Location Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Adds the Activiti organization as a quickstart location for Jenkins X. This allows you to use Activiti quickstart templates. ```bash jx create quickstartlocation --owner activiti ``` -------------------------------- ### GKE Cluster Creation with JX CLI Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Use this command to create a GKE cluster with specific configurations. It skips the Jenkins X installation to allow for manual setup later. Ensure you have the `PROJECT_ID`, `CLUSTER_NAME`, and `ZONE` environment variables set. ```bash jx create cluster gke \ --project-id=$PROJECT_ID \ --cluster-name=$CLUSTER_NAME \ --machine-type='n1-standard-4' \ --min-num-nodes='2' \ --skip-installation \ --enhanced-apis \ --enhanced-scopes \ --kaniko=false \ --zone=$ZONE \ --advanced-mode \ $SKIP_LOGIN ``` -------------------------------- ### Jenkins Connectivity Configuration Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Configure Jenkins connectivity by selecting the installation type and workload build pack. This example shows selecting a 'Static Master Jenkins' and a Kubernetes-based build pack for GitOps promotion. It also specifies the organization for the environment repository. ```bash ? Select Jenkins installation type: Static Master Jenkins ? Pick workload build pack: Kubernetes Automated CI+CD with GitOps Promotion ? Select the organization where you want to create the environment repository: username ``` -------------------------------- ### Install NGINX Ingress Controller Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/amazon-eks.md Installs the NGINX Ingress controller using HELM, specifying version 1.8. ```bash helm install stable/nginx-ingress --version 1.8 ``` -------------------------------- ### Querying Documentation with GET Request Source: https://activiti.gitbook.io/activiti-7-developers-guide/components/activiti-cloud-application.md To get additional information not directly on the page, perform an HTTP GET request to the page URL with the 'ask' query parameter for a specific question and an optional 'goal' parameter for broader context. ```http GET https://activiti.gitbook.io/activiti-7-developers-guide/components/activiti-cloud-application.md?ask=&goal= ``` -------------------------------- ### Start a Process Instance with Variables Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-core.md Initiate a new process instance using the ProcessRuntime.start() method, specifying the process definition key, name, and variables via ProcessPayloadBuilder. ```java @Scheduled(initialDelay = 1000, fixedDelay = 1000) public void processText() { securityUtil.logInAs("system"); String content = pickRandomString(); SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yy HH:mm:ss"); logger.info("> Processing content: " + content + " at " + formatter.format(new Date())); ProcessInstance processInstance = processRuntime .start(ProcessPayloadBuilder .start() .withProcessDefinitionKey("categorizeProcess") .withProcessInstanceName("Processing Content: " + content) .withVariable("content", content) .build()); logger.info(">>> Created Process Instance: " + processInstance); } ``` -------------------------------- ### Start a New Process Instance Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud.md This JSON payload is used to start a new process instance with specified variables. Ensure the 'payloadType' is set to 'StartProcessPayload'. ```json { "processDefinitionKey": "SimpleProcess", "variables": { "firstName": "salaboy", "lastName": "salaboy", "age": 99 }, "payloadType":"StartProcessPayload" } ``` -------------------------------- ### Query Documentation Index Source: https://activiti.gitbook.io/activiti-7-developers-guide/llms.txt Use this GET request to ask a specific question about the documentation. Include the 'ask' parameter for your question and optionally the 'goal' parameter to tailor the response. ```http GET https://activiti.gitbook.io/activiti-7-developers-guide/community.md?ask=&goal= ``` -------------------------------- ### jx version command with upgrade prompt Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/amazon-eks-jx.md This example shows the output of the 'jx version' command when a new version is available, including the prompt to upgrade. It is recommended to answer 'No' to manage upgrades deliberately. ```bash ~ $ jx version NAME VERSION jx 2.0.232 git git version 2.17.2 (Apple Git-113) A new jx version is available: 2.0.333 ? Would you like to upgrade to the new jx version? No ``` -------------------------------- ### Query Documentation with Ask and Goal Parameters Source: https://activiti.gitbook.io/activiti-7-developers-guide/overview/comformance/set-2-basic-user-tasks.md Use this GET request to query the documentation dynamically. The 'ask' parameter specifies the immediate question, and the optional 'goal' parameter describes the broader end goal. ```http GET https://activiti.gitbook.io/activiti-7-developers-guide/overview/comformance/set-2-basic-user-tasks.md?ask=&goal= ``` -------------------------------- ### BPMN Service Task Example Source: https://activiti.gitbook.io/activiti-7-developers-guide/components/activiti-cloud-application/cloud-connectors.md Example of a BPMN Service Task with an implementation attribute that will trigger a Cloud Connector. ```bpmn ``` -------------------------------- ### Jenkins X Platform Installation Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Install the Jenkins X platform onto your existing GKE cluster. This command configures it for GKE, specifies the Docker registry, and enables advanced mode. It also sets up a static Jenkins master and disables Tiller. ```bash jx install --provider=gke \ --docker-registry=gcr.io/$PROJECT_ID \ --no-default-environments \ --static-jenkins \ --no-tiller=false \ --advanced-mode ``` -------------------------------- ### Create Activiti Cloud Platform Git Repository Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Creates a new Git repository for the Activiti Cloud Platform quickstart using Jenkins X. This command deploys the platform to your Kubernetes cluster. ```bash jx create quickstart --owner activiti \ --filter=activiti-cloud-platform-quickstart \ --project-name=activiti-cloud-application \ --batch-mode ``` -------------------------------- ### Display jx Client Version Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Verify the installation of the jx command-line tool by checking its version. This command is useful after installing or upgrading the jx client. ```bash $ jx version NAME VERSION Jx 2.0.323 ``` -------------------------------- ### Query GitBook Documentation Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/amazon-eks-jx.md Use this GET request to query the documentation dynamically. Include your specific question in the 'ask' parameter and an optional broader goal in the 'goal' parameter. ```bash GET https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/amazon-eks-jx.md?ask=&goal= ``` -------------------------------- ### Start Modeler Service Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose.md Starts the Modeler service using Docker Compose. After execution, check container status with `make ps` and logs with `make logs`. Access the modeler at http://$DOCKER_IP/modeling. ```bash make modeler ``` -------------------------------- ### Query GitBook Documentation Source: https://activiti.gitbook.io/activiti-7-developers-guide/overview/comformance/set-0-basic-process-information.md Use this GET request to ask questions about the documentation. The 'ask' parameter specifies the question, and the optional 'goal' parameter provides context for the desired outcome. ```http GET https://activiti.gitbook.io/activiti-7-developers-guide/overview/comformance/set-0-basic-process-information.md?ask=&goal= ``` -------------------------------- ### Query GitBook Documentation Dynamically Source: https://activiti.gitbook.io/activiti-7-developers-guide/community/repositories.md Use this GET request to ask questions about the documentation. The 'ask' parameter specifies the question, and the optional 'goal' parameter helps tailor the response to a broader objective. ```http GET https://activiti.gitbook.io/activiti-7-developers-guide/community/repositories.md?ask=&goal= ``` -------------------------------- ### Query GitBook Documentation Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/amazon-eks.md Use this GET request to query the documentation dynamically. Include your specific question in the 'ask' parameter and optionally your broader goal in the 'goal' parameter. ```http GET https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/amazon-eks.md?ask=&goal= ``` -------------------------------- ### Create Activiti Cloud Connector Git Repository Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Creates a new Git repository for an Activiti Cloud Connector quickstart using Jenkins X. This sets up a connector project for your application. ```bash jx create quickstart --owner activiti \ --filter activiti-cloud-connector-quickstart \ --project-name=activiti-my-connector \ --batch-mode ``` -------------------------------- ### Query Documentation Dynamically Source: https://activiti.gitbook.io/activiti-7-developers-guide/blueprints.md Perform an HTTP GET request to query the documentation dynamically. Use the 'ask' parameter for specific questions and the optional 'goal' parameter for broader objectives. ```http GET https://activiti.gitbook.io/activiti-7-developers-guide/blueprints.md?ask=&goal= ``` -------------------------------- ### Install Jenkins-X on EKS Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/amazon-eks-jx.md Install the Jenkins-X platform on the EKS cluster. This command specifies EKS as the provider, disables default environments, uses a static Jenkins, and ensures Tiller is enabled. ```bash jx install \ --provider=eks \ --no-default-environments \ --static-jenkins \ --no-tiller=false \ --advanced-mode ``` -------------------------------- ### Install NGINX Ingress Controller Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/google-cloud-gke.md Install the NGINX Ingress controller using Helm. This component is crucial for exposing services outside the Kubernetes cluster by automatically creating routes. ```bash helm install stable/nginx-ingress --version 1.5 ``` -------------------------------- ### Create Activiti Cloud Runtime Bundle Git Repository Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Creates a new Git repository for an Activiti Cloud Runtime Bundle quickstart using Jenkins X. This sets up a runtime bundle project for your application. ```bash jx create quickstart --owner activiti \ --filter activiti-cloud-runtime-bundle-quickstart \ --project-name=activiti-my-rb \ --batch-mode ``` -------------------------------- ### Create a Task using TaskPayloadBuilder Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-core.md Example of creating a new task with specific details like name, description, group, and priority using the TaskPayloadBuilder. ```java taskRuntime.create( TaskPayloadBuilder.create() .withName("First Team Task") .withDescription("This is something really important") .withGroup("activitiTeam") .withPriority(10) .build()); ``` -------------------------------- ### Query Documentation with HTTP GET Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx.md Use this mechanism to query the documentation dynamically when information is not explicitly present or requires clarification. Provide a specific question in the 'ask' parameter and an optional 'goal' for tailored answers. ```http GET https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx.md?ask=&goal= ``` -------------------------------- ### Test aws-iam-authenticator Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/amazon-eks.md Verifies that the aws-iam-authenticator binary is installed and accessible. ```bash aws-iam-authenticator help ``` -------------------------------- ### Configure UserDetailsService for Security Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-core.md Example configuration for UserDetailsService within a @Configuration class to manage users, groups, and roles for security. ```java @Configuration public class DemoApplicationConfiguration { @Bean public UserDetailsService myUserDetailsService() { InMemoryUserDetailsManager userDetailsService = new InMemoryUserDetailsManager(); userDetailsService.createUser(User.withDefaultPasswordEncoder().username("user").password("password").roles("ACTIVITI_USER").build()); return userDetailsService; } } ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://activiti.gitbook.io/activiti-7-developers-guide/faq.md Use this mechanism to query the documentation dynamically when information is not explicitly present on the page, or when clarification or additional context is needed. The `ask` parameter is mandatory for specifying the question, while `goal` is optional for tailoring the answer. ```http GET https://activiti.gitbook.io/activiti-7-developers-guide/faq.md?ask=&goal= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://activiti.gitbook.io/activiti-7-developers-guide/community.md Use this endpoint to dynamically query the documentation when information is not explicitly present on a page. The 'ask' parameter is for the specific question, and the optional 'goal' parameter helps tailor the answer to a broader objective. ```http GET https://activiti.gitbook.io/activiti-7-developers-guide/community.md?ask=&goal= ``` -------------------------------- ### Display Help for Make Commands Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose.md Lists all available `make` commands for managing the Activiti Cloud Docker Compose environment. This is a useful command to discover available actions. ```bash make help ``` -------------------------------- ### Create Production GitOps Environment Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Provision a production environment for Activiti Cloud Platform using GitOps. This environment uses manual promotion and is configured with the specified domain, fork repository, and prefix. ```bash jx create env --domain $CLUSTER_DOMAIN \ --fork-git-repo=$ENV_REPO \ --prefix=$ENV_PREFIX \ --name=production \ --namespace=production \ --git-private=true \ --label=Production \ --promotion=Manual \ --batch-mode ``` -------------------------------- ### Create Staging GitOps Environment Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Provision a staging environment for Activiti Cloud Platform using GitOps. This environment uses auto-promotion and is configured with the specified domain, fork repository, and prefix. ```bash jx create env --domain $CLUSTER_DOMAIN \ --fork-git-repo=$ENV_REPO \ --prefix=$ENV_PREFIX \ --name=staging \ --namespace=staging \ --git-private=true \ --label=Staging \ --promotion=Auto \ --batch-mode ``` -------------------------------- ### GraphQL Query via HTTP GET Source: https://activiti.gitbook.io/activiti-7-developers-guide/components/activiti-cloud-application/notification-service.md Use the 'query' parameter for GraphQL queries in HTTP GET requests. Query variables can be appended as a JSON-encoded string in the 'variables' parameter. ```http http://host/graphql?query={ProcessInstance(processInstanceId:"1"){processInstanceId,tasks{id,name}}} ``` -------------------------------- ### View Specific Service Logs Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose.md Displays and follows the logs for a single service, such as `example-runtime-bundle`. This helps in isolating and debugging issues for a particular component. ```bash make example-runtime-bundle/logs ``` -------------------------------- ### Check AWS CLI Version Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/amazon-eks.md Verifies the installed version of the AWS Command Line Interface. ```bash aws --version ``` -------------------------------- ### Upgrade Jenkins-X CLI Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/amazon-eks-jx.md Ensure you have the latest Jenkins-X CLI version installed by running the upgrade command. ```bash jx upgrade cli ``` -------------------------------- ### Stop All Services Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose.md Stops all running services managed by the Docker Compose setup. This command gracefully shuts down all containers. ```bash make stop ``` -------------------------------- ### GraphQL Singular Query Example Source: https://activiti.gitbook.io/activiti-7-developers-guide/components/activiti-cloud-application/notification-service.md Use the singular query wrapper, like 'ProcessInstance', to query for a single object by its ID. ```graphql query { ProcessInstance(processInstanceId:"1") { processInstanceId tasks { id name assignee status } } } ``` -------------------------------- ### Create a New Spring Boot Microservice Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Scaffold a new Spring Boot microservice with web and actuator dependencies. ```bash jx create spring -d web -d actuator ``` -------------------------------- ### Register Task Runtime Event Listener Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-core.md Register a TaskRuntimeEventListener to be notified of task-related events. This example logs task assignment details. ```java @Bean public TaskRuntimeEventListener taskAssignedListener() { return taskAssigned -> logger.info( ">>> Task Assigned: '" + taskAssigned.getEntity().getName() +"' We can send a notification to the assignee: " + taskAssigned.getEntity().getAssignee()); } ``` -------------------------------- ### GraphQL Singular Query Response Example Source: https://activiti.gitbook.io/activiti-7-developers-guide/components/activiti-cloud-application/notification-service.md This is the expected JSON response for a singular GraphQL query, detailing the requested process instance and its tasks. ```json { "ProcessInstance": { "processInstanceId": "1", "tasks": [ { "id": "4", "name": "task4", "assignee": "assignee", "status": "ASSIGNED" }, { "id": "5", "name": "task5", "assignee": "assignee", "status": "COMPLETED" } ] } } ``` -------------------------------- ### Add Activiti Spring Boot Starter Dependency Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-core.md Include the activiti-spring-boot-starter and a database driver like H2 for in-memory storage in your Maven project. ```xml org.activiti activiti-spring-boot-starter com.h2database h2 ``` -------------------------------- ### GraphQL Query Response Example Source: https://activiti.gitbook.io/activiti-7-developers-guide/components/activiti-cloud-application/notification-service.md The response is always in JSON format, containing 'data' and 'errors' fields. If no errors occurred, the 'errors' field will be null. ```json { "data": { "ProcessInstance": { "processInstanceId": "1", "tasks": [ { "id": "4", "name": "task4", "assignee": "assignee", "status": "COMPLETED" }, { "id": "5", "name": "task5", "assignee": "assignee", "status": "COMPLETED" } ] } }, "errors": null } ``` -------------------------------- ### Get Jx Cluster Domain and Environment Prefix Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Set environment variables for the Kubernetes cluster domain and environment prefix, which are essential for configuring GitOps environments. ```bash export CLUSTER_DOMAIN=$(kubectl get cm ingress-config -o=go-template --template='{{.data.domain}}' -n jx) && echo $CLUSTER_DOMAIN export ENV_PREFIX=$CLUSTER_NAME && echo $ENV_PREFIX ``` -------------------------------- ### SSH into Service Pod Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose.md Allows you to SSH into a specific service's pod, such as `example-runtime-bundle`. This is useful for inspecting the running environment or performing advanced debugging. ```bash make example-runtime-bundle/ssh ``` -------------------------------- ### Configure AWS Credentials and Cluster Name Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/amazon-eks-jx.md Set the AWS access key, secret access key, and cluster name as environment variables before proceeding with Jenkins-X setup. ```bash export AWS_ACCESS_KEY_ID=1234567890 export AWS_SECRET_ACCESS_KEY=123456789 export CLUSTER_NAME=activiti-cloud ``` -------------------------------- ### Query Notification Service Source: https://activiti.gitbook.io/activiti-7-developers-guide/components/activiti-cloud-application/notification-service.md Perform an HTTP GET request to query the notification service. Use the `ask` parameter for your specific question and optionally the `goal` parameter to tailor the response. ```http GET https://activiti.gitbook.io/activiti-7-developers-guide/components/activiti-cloud-application/notification-service.md?ask=&goal= ``` -------------------------------- ### Implement Configuration Class Source: https://activiti.gitbook.io/activiti-7-developers-guide/components/activiti-cloud-application/cloud-connectors.md Implement the message channel interface in a Configuration class to make the bindings available. ```java @Configuration public class RewardConfiguration implements RewardMessageChannels { } ``` -------------------------------- ### Add Activiti Cloud Helm Charts Repository Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud.md Registers the Activiti Cloud Helm charts repository to your Helm installation. This is the first step before deploying any Activiti Cloud components. ```bash helm repo add activiti-cloud-helm-charts https://activiti.github.io/activiti-cloud-helm-charts/ ``` -------------------------------- ### Import Existing Projects with Jenkins X Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/google-cloud-gke-jx.md Use this command to import existing projects into your Jenkins X environment. ```bash jx import ``` -------------------------------- ### Get Kubernetes Services Source: https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/google-cloud-gke.md Retrieve the list of services running in the Kubernetes cluster. This command is used to find the Public IP address assigned to the NGINX Ingress controller, which is necessary for external access. ```bash kubectl get services ```