Size: a a a

Camunda BPM Group

2022 February 07

YK

Yuri Kolesnikov in Camunda BPM Group
Java Delegate is not super class. It's just interface you have to implement.
источник

AK

Abhishek Kadam in Camunda BPM Group
Hi Yuri, I have significantly less experience with Java. You are saying that click on the Browse button and search JavaDelegate. Right?
источник

YK

Yuri Kolesnikov in Camunda BPM Group
No. Press the Add button
источник

AK

Abhishek Kadam in Camunda BPM Group
Okay
источник

AK

Abhishek Kadam in Camunda BPM Group
I tried couldn't find JavaDelegate in it.

Previously, I followed different tutorials and was able to add JavaDelegate class (Youtube Tutorial)
источник

AK

Abhishek Kadam in Camunda BPM Group
I have also added these dependencies, yet no change. I couldn't implement JavaDelegate.
источник
2022 February 08

AK

Abhishek Kadam in Camunda BPM Group
I have referred to this Youtube video for Camunda Get Started: Video.

Here, I was able to add the JavaDelegate Interface while creating a new Java Class.

In the video, Niall has used Widlfly, and while deploying, the process is entirely different compared to Camunda Run Open source(I am working on)

I am unable to create a JavaDelegate class in Camunda Open Source.
YouTube
Tutorial: Camunda Enterprise Edition for Java Developers (Video 2)
For a more current walk-through of Camunda Platform, please take a look at our Building a Camunda Platform Project with Spring Boot playlist: https://bit.ly/3hOyQeG

---

In this how-to video, you will learn how to build a process in our Enterprise Edition, and how to add some Java classes to it. Join Camunda Developer Advocate and all-around Camunda expert, Niall Deehan, on this simple process automation journey walkthrough using tools like Camunda Cockpit, Tasklist, Wildfly, Java, Eclipse, Maven Archetypes and more.

We have received feedback that the audio is inconsistent. We have updated our closed captions to more closely match what is being discussed in the video.

Share your questions at any time: https://forum.camunda.org/.
Subscribe to our newsletter for the latest from the Camunda Developer Community: http://bit.ly/2NRgq0D

---

Visit our website: https://bit.ly/3vDGkp0
Connect with us on LinkedIn: https://www.linkedin.com/company/camu...
Tweet with us: https://twitter.com/Camunda
Join us on Facebook: https://www.facebook.com/CamundaTeam

---

Camunda is an open source software company innovating process automation with a developer-friendly approach that is standards-based, highly scalable and collaborative for both business and IT needs.

A community of thousands of users across companies such as Allianz, ING, and Vodafone design, automate and improve mission-critical business processes end-to-end with Camunda, enabling them to build software applications more flexibly, collaboratively and efficiently, gaining the business agility, visibility and scale needed to drive digital transformation.
источник

DP

Dmitrii Pisarenko in Camunda BPM Group
Here is an example of a JavaDelegate

https://github.com/mentiflectax/minimal-crypto-exchange/blob/0.1/process-engine/src/main/java/com/dpisarenko/minimalcryptoexchange/delegates/ApproveUsdtTransfer.java

Crucial part #1:

`import org.camunda.bpm.engine.delegate.JavaDelegate;`

Crucial part #2:

```
@Component("ApproveUsdtTransfer")

public class ApproveUsdtTransfer implements JavaDelegate {


...

@Override

   public void execute(final DelegateExecution delEx) throws Exception {

  // Do whatever you want to do here
}

...

}
```

Can you create a class like this? If not, why not?
источник

DP

Dmitrii Pisarenko in Camunda BPM Group
На первый взгляд узнать состояние задачи можно с помощью вот этого запроса:

https://docs.camunda.org/manual/7.16/reference/rest/task/get/

Если я правильно понимаю, то в ответе приходят данные всех незавершенных задач.

Управлять задачей можно с помощью вот этих запросов:

1. Завершить: https://docs.camunda.org/manual/7.16/reference/rest/task/post-complete/
2. Назначить пользователю: https://docs.camunda.org/manual/7.16/reference/rest/task/post-claim/
3. Снять назначение: https://docs.camunda.org/manual/7.16/reference/rest/task/post-unclaim/
источник

V

Vladimir in Camunda BPM Group
Благодарю Дмитрий! Хотелось бы не через редирект на урл TaskResource или так тоже можно? . А уже на  бэке засетить нужное значение переменной.
источник

V

Vladimir in Camunda BPM Group
просто загнать переменную в вариаблес и выполнить код VariableMap taskVariables = formService.submitTaskFormWithVariablesInReturn(taskId, variables, false);
источник

DP

Dmitrii Pisarenko in Camunda BPM Group
Для каждого запроса REST API есть соотв. вызов Java API.

Конкретно здесь я бы посмотрел на org.camunda.bpm.engine.rest.sub.task.impl.TaskResourceImpl#submit:

  @Override
 public Response submit(CompleteTaskDto dto) {
   FormService formService = engine.getFormService();

   try {
     VariableMap variables = VariableValueDto.toMap(dto.getVariables(), engine, objectMapper);
     if (dto.isWithVariablesInReturn()) {
       VariableMap taskVariables = formService.submitTaskFormWithVariablesInReturn(taskId, variables, false);
   
   ...

   }
 
 ...

 }


Как я понимаю, этот кот код, который выполняется при REST-запросе

package org.camunda.bpm.engine.rest.sub.task;

...

public interface TaskResource {

...

 @POST
 @Path("/submit-form")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
 Response submit(CompleteTaskDto dto);

...
источник

M

Mohammad Baghaee in Camunda BPM Group
Hello
May I ask my questions in english here?
источник

AK

Abhishek Kadam in Camunda BPM Group
Yes.
источник

M

Mohammad Baghaee in Camunda BPM Group
ok thank you
I should say I'm sooo new to camunda and its api services
Now , I want to call Metrics table in cockpit by an API
But I don't know how and where to find it.
Please tell me how
Thanks
источник

M

Mohammad Baghaee in Camunda BPM Group
I'm using exactly this library for .net
источник

DP

Dmitrii Pisarenko in Camunda BPM Group
источник

M

Mohammad Baghaee in Camunda BPM Group
Thanks
was helpful
источник
2022 February 09

AK

Abhishek Kadam in Camunda BPM Group
Hi, as I was following the Get Started Guide --> I created the POM.xml File:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.camunda.bpm.getstarted</groupId>
<artifactId>charge-card-worker</artifactId>
<version>0.0.1-SNAPSHOT</version>

<properties>
 <camunda.external-task-client.version>7.16.0</camunda.external-task-client.version>
 <maven.compiler.source>1.8</maven.compiler.source>
 <maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
 <dependency>
  <groupId>org.camunda.bpm</groupId>
  <artifactId>camunda-external-task-client</artifactId>
  <version>${camunda.external-task-client.version}</version>
 </dependency>
 <dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-simple</artifactId>
  <version>1.6.1</version>
 </dependency>
 <dependency>
  <groupId>javax.xml.bind</groupId>
  <artifactId>jaxb-api</artifactId>
  <version>2.3.1</version>
 </dependency>
</dependencies>
</project>


In this POM.xml file, in Properties tag:

<properties>
 <camunda.external-task-client.version>7.16.0</camunda.external-task-client.version>
 <maven.compiler.source>1.8</maven.compiler.source>
 <maven.compiler.target>1.8</maven.compiler.target>
</properties>

When I add <camunda.external-task-client>, I cannot add Java Class with JavaDelegate Interface.

If I follow the Springboot tutorial and create a project using "start.camunda.com", I can create a class with JavaDelegate Interface.
I compared the two POM.xml files from both the projects; I tried to copy-paste, but again I could not get the desired output.
Is it possible to create a class using JavaDelegate Interface in Open Source BPM -- Get Started Guide?

What dependencies am I missing?
источник

DP

Dmitrii Pisarenko in Camunda BPM Group
In order to use `JavaDelegate`s you don't need any additional dependencies.

So, I would remove

<dependency>
  <groupId>org.camunda.bpm</groupId>
  <artifactId>camunda-external-task-client</artifactId>
  <version>${camunda.external-task-client.version}</version>
 </dependency>


Also, please create a GitHub project without any sensitive information (like company names) and post the link here.

Then, it will be much easier to tell how to fix your issues.
источник