-
Notifications
You must be signed in to change notification settings - Fork 200
C8 api intermediate tutorial #5636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
👋 🤖 🤔 Hello, @christinaausley! Did you make your changes in all the right places? These files were changed only in docs/. You might want to duplicate these changes in versioned_docs/version-8.7/.
You may have done this intentionally, but we wanted to point it out in case you didn't. You can read more about the versioning within our docs in our documentation guidelines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ No blocking feedback, this is fantastic!!!! Great work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Really cool, nothing to add besides what @pepopowitz already suggested 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @christinaausley, this is really helpful for users! 🚀
Just some nitpicky, non-blocking suggestions you can either adopt or ignore, depending on your preference! 😊
id: camunda-8-api-intermediate-tutorial | ||
title: Intermediate tutorial | ||
sidebar_label: Intermediate | ||
description: "Step through our intermediate Camunda 8 API tutorial to deploy resources, create and start a process instance, and view a process instance by its key." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "Step through our intermediate Camunda 8 API tutorial to deploy resources, create and start a process instance, and view a process instance by its key." | |
description: "Step through this intermediate Camunda 8 API tutorial to deploy resources, create and start a process instance, and view a process instance by its key." |
Rewording suggestion
--- | ||
|
||
In this tutorial, we'll step through examples to highlight the capabilities of the Camunda 8 API, such as deploying resources, creating and starting a process instance, and viewing a process instance by its key. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add an "About this tutorial" section here, that includes who this is aimed at, link back to the beginner tutorial for example, and describe what is achieved at the end of the tutorial - like a learning statement at the beginning of a lesson (already covered in the intro sentence, but perhaps more detail).
sidebar_label: Intermediate | ||
description: "Step through our intermediate Camunda 8 API tutorial to deploy resources, create and start a process instance, and view a process instance by its key." | ||
--- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add an intermediate badge, as per the Get Started guides?
|
||
In this tutorial, we'll step through examples to highlight the capabilities of the Camunda 8 API, such as deploying resources, creating and starting a process instance, and viewing a process instance by its key. | ||
|
||
## Prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could make this section into a table layout to make it easier to see, as it is quite cluttered atm with a lot of information. For example, https://docs.camunda.io/docs/next/components/modeler/web-modeler/idp/idp-configuration/#prerequisites.
Make sure you keep the generated client credentials in a safe place. The **Client secret** will not be shown again. For your convenience, you can also download the client information to your computer. | ||
::: | ||
|
||
- In this tutorial, we utilize a JavaScript-written [GitHub repository](https://github.com/camunda/camunda-api-tutorials) to write and run requests. Clone this repo before getting started. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- In this tutorial, we utilize a JavaScript-written [GitHub repository](https://github.com/camunda/camunda-api-tutorials) to write and run requests. Clone this repo before getting started. | |
- In this tutorial, we use a JavaScript-written [GitHub repository](https://github.com/camunda/camunda-api-tutorials) to write and run requests. Clone this repo before getting started. |
Rewording suggestion for plain English - I always trya nd avoid utilize where use can do the same job 😊
|
||
If you're interested in how we use a library to handle auth for our code, or to get started, examine the `auth.js` file in the GitHub repository. This file contains a function named `getAccessToken` which executes an OAuth 2.0 protocol to retrieve authentication credentials based on your client ID and client secret. Then, we return the actual token that can be passed as an authorization header in each request. | ||
|
||
To set up your credentials, create an `.env` file which will be protected by the `.gitignore` file. You will need to add the following: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To set up your credentials, create an `.env` file which will be protected by the `.gitignore` file. You will need to add the following: | |
To set up your credentials, create an `.env` file which will be protected by the `.gitignore` file. Add the following environment variables: |
|
||
These keys will be consumed by the `auth.js` file to execute the OAuth protocol, and should be saved when you generate your client credentials in [prerequisites](#prerequisites). | ||
|
||
Examine the existing `.env.example` file for an example of how your `.env` file should look upon completion. Do not place your credentials in the `.env.example` file, as this example file is not protected by the `.gitignore`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Examine the existing `.env.example` file for an example of how your `.env` file should look upon completion. Do not place your credentials in the `.env.example` file, as this example file is not protected by the `.gitignore`. | |
See the existing `.env.example` file for an example of how your `.env` file should look upon completion. Do not place your credentials in the `.env.example` file, as this example file is not protected by the `.gitignore`. |
9. In your terminal, run `node cli.js processInstances deploy`. | ||
|
||
:::note | ||
This `deploy` command is connected to the `deployResources` function at the bottom of the `camunda-process-instances.js` file, and executed by the `cli.js` file. While we will work with roles in this tutorial, you may add additional arguments depending on the API calls you would like to make. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This `deploy` command is connected to the `deployResources` function at the bottom of the `camunda-process-instances.js` file, and executed by the `cli.js` file. While we will work with roles in this tutorial, you may add additional arguments depending on the API calls you would like to make. | |
This `deploy` command is connected to the `deployResources` function at the bottom of the `camunda-process-instances.js` file, and executed by the `cli.js` file. While we will work with roles in this tutorial, you may add additional arguments depending on the API requests you want to make. |
Should we use request in place of call?
|
||
4. In your terminal, run `node cli.js processInstances view <key>`, where `<key>` is the process instance key. The `processDefinitionName` and `state` will then display in the output. | ||
|
||
## If you get stuck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## If you get stuck | |
## Troubleshooting |
- If you haven't done so already, [create a cluster](/guides/create-cluster.md). | ||
- Upon cluster creation, [create your first client](/guides/setup-client-connection-credentials.md). Ensure you check the `Zeebe` client scope box. | ||
|
||
:::note |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:::note | |
:::caution |
Is it worth making this a caution as this is important for them to capture first-time?
Description
Docs aligned with tutorial camunda/camunda-api-tutorials#13. This PR should not be merged until the actual tutorial is merged.
When should this change go live?
bug
orsupport
label)available & undocumented
label)hold
label)low prio
label)PR Checklist
/docs
directory (version 8.8)./versioned_docs
directory.@camunda/tech-writers
unless working with an embedded writer.