Skip to content
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

ZeebeGrpcClient.deployResource with an array of resources #173

Closed
TylerHAtkinson opened this issue Jun 5, 2024 · 1 comment
Closed

ZeebeGrpcClient.deployResource with an array of resources #173

TylerHAtkinson opened this issue Jun 5, 2024 · 1 comment
Assignees

Comments

@TylerHAtkinson
Copy link

SDK Component

Zeebe

Expected Behavior

Both the documentation: https://camunda.github.io/camunda-8-js-sdk/classes/index.Zeebe.ZeebeGrpcClient.html#deployResource
and the comment above deployResource

* @description Deploys one or more resources (e.g. processes or decision models) to Zeebe.

indicate that we should be able to deploy multiple resources.

I would expect there to be a signature that accepts an array of resources to allow for this

Current Behavior

All of the deployResource overloads only support a single resource, and it sends an array with only that 1 resource to the underlying (await this.grpc).deployResourceSync({

Possible Solution

Either add an overload to accept an array of resources, or add a new function called deployResources if you want to avoid more overloads on that function, and call (await this.grpc).deployResourceSync({ with the full array of resources

Context (Environment)

We are trying to deploy all of our bpmns/dmns at once, ideally with the rollback feature the documentation describes if one of them in the batch fails

@jwulf jwulf self-assigned this Jun 6, 2024
jwulf added a commit that referenced this issue Jun 12, 2024
jwulf added a commit that referenced this issue Jun 12, 2024
jwulf added a commit that referenced this issue Jun 12, 2024
* docs(zeebe): document multi-tenant workers

* feat(zeebe): deployResources to deploy multiple resources atomically

add deployResources method

fixes #173
@jwulf jwulf closed this as completed in 695a26a Jun 12, 2024
jwulf added a commit that referenced this issue Jun 12, 2024
deploy multiple resources atomically

fixes #173
github-actions bot pushed a commit that referenced this issue Jun 12, 2024
## [8.6.2](v8.6.1...v8.6.2) (2024-06-12)

### Bug Fixes

* **zeebe:** security fix for grpc-js dependency update ([#180](#180)) ([f43d956](f43d956))

### Features

* **zeebe:** add deployResources method ([165862f](165862f)), closes [#173](#173)
* **zeebe:** add multi-tenant support to workers ([#175](#175)) ([28450a5](28450a5)), closes [#171](#171)
* **zeebe:** add updateJobTimeout method ([#172](#172)) ([5eff624](5eff624)), closes [#171](#171)
* **zeebe:** support StreamActivatedJobs RPC ([#160](#160)) ([258296a](258296a)), closes [#17](#17)
github-actions bot pushed a commit that referenced this issue Jun 12, 2024
## [8.6.2](v8.6.1...v8.6.2) (2024-06-12)

### Bug Fixes

* **zeebe:** security fix for grpc-js dependency update ([#180](#180)) ([f43d956](f43d956))

### Features

* **zeebe:** add deployResources method ([165862f](165862f)), closes [#173](#173)
* **zeebe:** add multi-tenant support to workers ([#175](#175)) ([28450a5](28450a5)), closes [#171](#171)
* **zeebe:** add updateJobTimeout method ([#172](#172)) ([5eff624](5eff624)), closes [#171](#171)
* **zeebe:** support StreamActivatedJobs RPC ([#160](#160)) ([258296a](258296a)), closes [#17](#17)
@jwulf
Copy link
Member

jwulf commented Jun 12, 2024

Thanks for the suggestions @TylerHAtkinson.

I went with option B: deployResources.

const result = await zbc.deployResources([
   {
      processFilename: './src/__tests__/testdata/Client-DeployWorkflow.bpmn',
   },
   {
      decisionFilename: './src/__tests__/testdata/quarantine-duration.dmn',
   },
   {
      form: fs.readFileSync('./src/__tests__/testdata/form_1.form'),
      name: 'form_1.form',
   },
])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants