Symphony Camunda Client

Symphony Camunda Client provided by Symphony Platform Solutions team

Лицензия

Лицензия

Категории

Категории

CLI Взаимодействие с пользователем ORM Данные
Группа

Группа

com.symphony.platformsolutions
Идентификатор

Идентификатор

symphony-camunda-client
Последняя версия

Последняя версия

1.0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

Symphony Camunda Client
Symphony Camunda Client provided by Symphony Platform Solutions team
Ссылка на сайт

Ссылка на сайт

https://github.com/SymphonyPlatformSolutions/symphony-camunda-client
Система контроля версий

Система контроля версий

https://github.com/SymphonyPlatformSolutions/symphony-camunda-client

Скачать symphony-camunda-client

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.symphony.platformsolutions/symphony-camunda-client/ -->
<dependency>
    <groupId>com.symphony.platformsolutions</groupId>
    <artifactId>symphony-camunda-client</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.symphony.platformsolutions/symphony-camunda-client/
implementation 'com.symphony.platformsolutions:symphony-camunda-client:1.0.3'
// https://jarcasting.com/artifacts/com.symphony.platformsolutions/symphony-camunda-client/
implementation ("com.symphony.platformsolutions:symphony-camunda-client:1.0.3")
'com.symphony.platformsolutions:symphony-camunda-client:jar:1.0.3'
<dependency org="com.symphony.platformsolutions" name="symphony-camunda-client" rev="1.0.3">
  <artifact name="symphony-camunda-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.symphony.platformsolutions', module='symphony-camunda-client', version='1.0.3')
)
libraryDependencies += "com.symphony.platformsolutions" % "symphony-camunda-client" % "1.0.3"
[com.symphony.platformsolutions/symphony-camunda-client "1.0.3"]

Зависимости

compile (6)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.25
org.glassfish.jersey.core : jersey-client jar 2.29
org.glassfish.jersey.media : jersey-media-json-jackson jar 2.29
org.glassfish.jersey.media : jersey-media-multipart jar 2.29
com.symphony.platformsolutions : symphony-api-client-java jar [1.0.0,)
org.camunda.bpm : camunda-external-task-client jar 1.2.0

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

symphony-camunda-client

Library for integration with Camunda REST API for Symphony bots that follow a workflow.

Provides access to the Camunda REST APIs in order to gather the process instance that belongs a to a user in Symphony Stream and if a user task is present action it.

Install using maven

<dependency>
    <groupId>com.symphony.platformsolutions</groupId>
    <artifactId>symphony-camunda-client</artifactId>
    <version>1.0.2</version>
</dependency>

Configuration

Create a camunda-config.json file in your project which includes the following property

{
  "camundaURL": "http://localhost:8080/engine-rest"
}

Usage

  1. First step is deploying your bpmn files to the camunda engine.
  2. Add this code to your message handler in the Symphony bot code:
ProcessInstance instance = processInstanceClient.getProcessInstance(inboundMessage.getStream().getStreamId().replace("_", "%"));
if (instance == null) {
    if (action != null) {
        ProcessDefinitionInfo info = processInstanceClient.getProcessDefinitionIdFromDeploymentName(action.getAction());
        Map<String, ValueType> variableMap = new HashMap<>();
        variableMap.put("streamId", new ValueType(inboundMessage.getStream().getStreamId().replace("_", "%")));
        variableMap.put("email", new ValueType(inboundMessage.getUser().getEmail()));
        for (String parameter : action.getParameters().keySet()) {
            variableMap.put(parameter, new ValueType(action.getParameters().get(parameter)));
        }
        processInstanceClient.startProcessInstance(variableMap, info.getId());
    }
} else {
    if(action!=null){
        processInstanceClient.setProcessVariable(instance.getId(),action.getAction(),"true");
    }

    for (String parameter : action.getParameters().keySet()) {
        processInstanceClient.setProcessVariable(instance.getId(),parameter,action.getParameters().get(parameter));
    }
    Task task = taskClient.getTask(instance.getId(), inboundMessage.getUser().getEmail());
    System.out.println(task.getId());
    taskClient.completeTask(task.getId());
}
com.symphony.platformsolutions

Symphony Platform Solutions

Symphony supported software client, bots, apps, and examples.

Версии библиотеки

Версия
1.0.3
1.0.2
1.0.1
1.0.0