Git Product home page Git Product logo

camunda-community-hub / camunda-platform-7-rest-client-spring-boot Goto Github PK

View Code? Open in Web Editor NEW
72.0 14.0 22.0 7.18 MB

Camunda REST client for Java Spring Boot Projects, implemented using Feign

Home Page: https://camunda-community-hub.github.io/camunda-platform-7-rest-client-spring-boot/

License: Apache License 2.0

Kotlin 99.88% Mustache 0.12%
kotlin java remote client rest feign hacktoberfest camunda-7

camunda-platform-7-rest-client-spring-boot's Issues

What is the artifactId to use?

The documentation is not clear on this subject. The "QuickStart" page uses the camunda-rest-client-spring-boot artifact ID while the "working example" page refers to camunda-rest-client-spring-boot-starter and camunda-rest -client-spring -boot-starter-provided.

I tested both, and only camunda-rest-client-spring-boot-starter works for me.

Setup code quality metrics

I was using codeacy for code quality metrics (is like sonar, but better and free for open source) Could you enable this?

You just need to activate codacy app for this repository.

Codecov Bash Uploader Security Update

There is a known security vulnerability with the Codecov Bash Uploader they recommend affected users immediately re-roll all of their credentials, tokens, or keys located in the environment variables in their CI processes that used one of Codecov’s Bash Uploaders.

Try to translate REST Exceptions to Camunda Exceptions

e.g. when I try to correlate a message and there's nothing listening for it, the REST endpoint returns a HTTP 400 Bad Request with the following body:

{"type":"RestException","message":"org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message 'aMessage': No process definition or execution matches the parameters"}

This should be translated to an org.camunda.bpm.engine.MismatchingMessageCorrelationException with message Cannot correlate message 'aMessage': No process definition or execution matches the parameters (and probably the original Feign Exception as cause).

If the result cannot be translated to a known exception, either the original Feign exception should be thrown or a wrapper specific to the camunda-rest-client.

Bumb versions

Current versions should be:

Camunda BPM 7.13
SpringBoot 2.2.8.RELEASE
Spin 1.9.0

RemoteRuntimeService#startProcessInstanceByKey: how to create JSON variable

Hi,
I am using RemoteRuntimeService's startProcessInstanceByKey to start camunda process. The issue which I am currently facing is, that it is not possible to create camunda variable of JSON type (not Object type with Serialization Data Format: application/json, but JSON type). Am I missing something or is it really true, that camunda JSON variable cannot be created when startProcessInstanceByKey method is called?

Creation of Object variable can be achieved using this:
VariableMap processVariables = Variables.createVariables().putValue("SOME_VARIABLE_NAME", Variables.serializedObjectValue() .objectTypeName(SomeSpecificObject.class.getCanonicalName()) .serializedValue(serializedStringIntoJson) .serializationDataFormat(SerializationDataFormats.JSON));

But I have not found a way how to create JSON variable.
Thanks

Implement RuntimeService#Variable

Implement these methods:

  • getVariables(executionId: String?): MutableMap<String, Any>
  • getVariables(executionId: String?, variableNames: MutableCollection?): MutableMap<String, Any>
  • createVariableInstanceQuery(): VariableInstanceQuery
  • removeVariable(executionId: String?, variableName: String?)
  • setVariable(executionId: String?, variableName: String?, value: Any?)
  • setVariables(executionId: String?, variables: MutableMap<String, out Any>?)
  • <T : TypedValue?> getVariableTyped(executionId: String?, variableName: String?): T
  • <T : TypedValue?> getVariableTyped(executionId: String?, variableName: String?, deserializeValue: Boolean): T
  • getVariablesTyped(executionId: String?): VariableMap
  • getVariablesTyped(executionId: String?, deserializeValues: Boolean): VariableMap
  • getVariablesTyped(executionId: String?, variableNames: MutableCollection?, deserializeValues: Boolean): VariableMap
  • getVariablesLocal(executionId: String?): MutableMap<String, Any>
  • getVariablesLocal(executionId: String?, variableNames: MutableCollection?): MutableMap<String, Any>
  • getVariableLocal(executionId: String?, variableName: String?): Any
  • setVariableLocal(executionId: String?, variableName: String?, value: Any?)
  • removeVariables(executionId: String?, variableNames: MutableCollection?)
  • getVariable(executionId: String?, variableName: String?): Any
  • removeVariablesLocal(executionId: String?, variableNames: MutableCollection?)
  • getVariablesLocalTyped(executionId: String?): VariableMap
  • getVariablesLocalTyped(executionId: String?, deserializeValues: Boolean): VariableMap
  • getVariablesLocalTyped(executionId: String?, variableNames: MutableCollection?, deserializeValues: Boolean): VariableMap
  • <T : TypedValue?> getVariableLocalTyped(executionId: String?, variableName: String?): T
  • <T : TypedValue?> getVariableLocalTyped(executionId: String?, variableName: String?, deserializeValue: Boolean): T
  • removeVariableLocal(executionId: String?, variableName: String?)
  • setVariablesLocal(executionId: String?, variables: MutableMap<String, out Any>?)

Fix error during deploy

The CI pipeline provided by Camunda (@lwille) is deploying a tag on a GH release publish. After the succesful publishing to Maven Central, it increments the versions of the artifacts and checks the versions back into repository. By doing so, it fails with the following error:

2020-07-15T19:51:43.7073146Z [INFO] Executing: /bin/sh -c cd '/home/runner/work/camunda-rest-client-spring-boot/camunda-rest-client-spring-boot' && 'git' 'rev-parse' '--show-prefix'
2020-07-15T19:51:43.7076993Z [INFO] Working directory: /home/runner/work/camunda-rest-client-spring-boot/camunda-rest-client-spring-boot
2020-07-15T19:51:43.7336383Z [INFO] Executing: /bin/sh -c cd '/home/runner/work/camunda-rest-client-spring-boot/camunda-rest-client-spring-boot' && 'git' 'status' '--porcelain' '.'
2020-07-15T19:51:43.7337408Z [INFO] Working directory: /home/runner/work/camunda-rest-client-spring-boot/camunda-rest-client-spring-boot
2020-07-15T19:51:43.7609201Z [WARNING] Ignoring unrecognized line: ?? camunda-rest-client-spring-boot-0.0.4.zip
2020-07-15T19:51:43.7612108Z [WARNING] Ignoring unrecognized line: ?? settings.xml
2020-07-15T19:51:43.7641580Z [INFO] Executing: /bin/sh -c cd '/home/runner/work/camunda-rest-client-spring-boot/camunda-rest-client-spring-boot' && 'git' 'commit' '--verbose' '-F' '/tmp/maven-scm-1163194214.commit' '-a'
2020-07-15T19:51:43.7642216Z [INFO] Working directory: /home/runner/work/camunda-rest-client-spring-boot/camunda-rest-client-spring-boot
2020-07-15T19:51:43.7793170Z [INFO] Executing: /bin/sh -c cd '/home/runner/work/camunda-rest-client-spring-boot/camunda-rest-client-spring-boot' && 'git' 'symbolic-ref' 'HEAD'
2020-07-15T19:51:43.7799354Z [INFO] Working directory: /home/runner/work/camunda-rest-client-spring-boot/camunda-rest-client-spring-boot
2020-07-15T19:51:43.7976686Z [INFO] Executing: /bin/sh -c cd '/home/runner/work/camunda-rest-client-spring-boot/camunda-rest-client-spring-boot' && 'git' 'push' 'https:********@github.com/camunda/camunda-rest-client-spring-boot.git' 'refs/heads/develop:refs/heads/develop'
2020-07-15T19:51:43.7977707Z [INFO] Working directory: /home/runner/work/camunda-rest-client-spring-boot/camunda-rest-client-spring-boot
2020-07-15T19:51:46.8323804Z [INFO] 
2020-07-15T19:51:46.8325393Z [INFO] --< org.camunda.bpm.extension.rest:camunda-rest-client-spring-boot-parent >--
2020-07-15T19:51:46.8326698Z [INFO] Building camunda-rest-client-spring-boot-parent 0.0.5-SNAPSHOT     [2/9]
2020-07-15T19:51:46.8327494Z [INFO] --------------------------------[ pom ]---------------------------------
2020-07-15T19:51:46.8328517Z [INFO] ------------------------------------------------------------------------
2020-07-15T19:51:46.8329669Z [INFO] Reactor Summary for camunda-rest-client-spring-boot-parent 0.0.5-SNAPSHOT:
2020-07-15T19:51:46.8330594Z [INFO] 
2020-07-15T19:51:46.8334610Z [INFO] camunda-rest-client-spring-boot-parent ............. FAILURE [  0.001 s]
2020-07-15T19:51:46.8335563Z [INFO] camunda-rest-client-spring-boot .................... SKIPPED
2020-07-15T19:51:46.8336411Z [INFO] camunda-rest-client-spring-boot-starter-provided ... SKIPPED
2020-07-15T19:51:46.8337232Z [INFO] camunda-rest-client-spring-boot-starter ............ SKIPPED
2020-07-15T19:51:46.8338224Z [INFO] camunda-rest-client-spring-boot-examples-root ...... SKIPPED
2020-07-15T19:51:46.8339482Z [INFO] camunda-rest-client-spring-boot-example ............ SKIPPED
2020-07-15T19:51:46.8340311Z [INFO] camunda-rest-client-spring-boot-example-provided ... SKIPPED
2020-07-15T19:51:46.8341154Z [INFO] camunda-rest-client-spring-boot-itest .............. SKIPPED
2020-07-15T19:51:46.8341983Z [INFO] camunda-rest-client-spring-boot-coverage-report .... SKIPPED
2020-07-15T19:51:46.8343384Z [INFO] ------------------------------------------------------------------------
2020-07-15T19:51:46.8344030Z [INFO] BUILD FAILURE
2020-07-15T19:51:46.8344799Z [INFO] ------------------------------------------------------------------------
2020-07-15T19:51:46.8381861Z [INFO] Total time:  17.146 s
2020-07-15T19:51:46.8383282Z [INFO] Finished at: 2020-07-15T19:51:46Z
2020-07-15T19:51:46.8383976Z [INFO] ------------------------------------------------------------------------
2020-07-15T19:51:46.8385400Z [ERROR] Unknown lifecycle phase "bump". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
2020-07-15T19:51:46.8386260Z [ERROR] 
2020-07-15T19:51:46.8386884Z [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
2020-07-15T19:51:46.8387529Z [ERROR] Re-run Maven using the -X switch to enable full debug logging.
2020-07-15T19:51:46.8388103Z [ERROR] 
2020-07-15T19:51:46.8388879Z [ERROR] For more information about the errors and possible solutions, please read the following articles:
2020-07-15T19:51:46.8389428Z [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
2020-07-15T19:51:46.8506588Z ##[error]Process completed with exit code 1.

Here is the relevant part of the workflow file:

        git config --global user.name "Release Bot"
        git config --global user.email [email protected]
        git fetch
        git checkout -b ${{ github.event.repository.default_branch }} --track origin/${{ github.event.repository.default_branch }}
        ./mvn -B org.apache.maven.plugins:maven-release-plugin:update-versions -DgenerateBackupPoms=false
        git add "**pom.xml"
        ./mvn -B scm:checkin -Dbasedir=. -Dmessage="release(v${{ github.event.release.tag_name }}): bump version" -DdeveloperConnectionUrl="scm:git:https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${{ github.event.repository.full_name }}.git"

In the same time, the current incremented version has been successfully commited to github.

Please have a look, I believe I'm not the only one, who should have this problem.

Activate developer CI/CD

As a developer, I would like to use github-internal CI/CD "Github Action"
Please activate them in the project settings.

TaskService is null

I need to search task on Camunda via Rest API but TaskService instance is not automatically injected in my Spring Context. It is always null.

How can I retrieve an istance of TaskService in ordeer to search tasks on camunda?

private RuntimeService runtimeService; //is ok
private TaskService taskService; //is null

public CamundaClient(@Qualifier("remote") RuntimeService runtimeService, @Qualifier("remote") TaskService taskService) {
	this.runtimeService = runtimeService;
	this.taskService = taskService;
}

`

Could you please help me to understand?

Thanks

Optimize dependencies

Make sure that only required libraries are pulled transitive.
Make optional as much as possible and allow for feign configuration.

Support for sorting properties in queries

Currently sorting is not supported in the implemented queries.
For Queries done with POST requests the sorting by multiple properties could be supported.
For Queries which are only provided as a GET (e.g. process definition query), support is not so easily done (maybe possible after request, if sorted only by properties in the result).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.