processcube_engine_client

Crates.ioprocesscube_engine_client
lib.rsprocesscube_engine_client
version0.3.0
sourcesrc
created_at2023-11-14 11:23:21.949951
updated_at2023-11-21 10:04:16.937172
description5Minds ProcessCube® Engine client written in Rust
homepage
repositoryhttps://github.com/stefanluth/ProcessCube.Engine.Client.rs
max_upload_size
id1034617
size107,387
Stefan Luthardt (stefanluth)

documentation

README

ProcessCube.Engine.Client.rs

A library and CLI tool written in Rust, to send requests to the 5Minds ProcessCube® Engine API.

This project was designed to work with the ProcessCube® Engine API provided in the Docker Image 5minds/processcube_engine:16.0.0.

Older or newer versions might work, but support is not guaranteed.

Current coverage

Coverage of the available endpoints is currently rather limited.

Endpoint Library CLI
AnonymousSessions
ApplicationInfo
Correlations
Cronjobs
DataObjectInstances
EmptyActivities
Events
ExternalTasks
FlowNodeInstances
ManualTasks
Notifications
ProcessDefinitions
ProcessInstances
ProcessModels
UserMetadata
UserTasks

✅ Full Support - ❌ No Support - GET/POST/... Partial Support

How to Use

CLI

If you just want to use the processcube_engine_client CLI tool, you can use

cargo install processcube_engine_client

to install it. You should then be able to use it, e.g. processcube_engine_client application-info authority

Library

When developing an application, you can use the library by adding this package to your project, i.e.

cargo add processcube_engine_client

A short usage example:

use processcube_engine_client::clients::{client_factory::ClientFactory, error::EngineError};

// Be sure to have a running ProcessCube® Engine at the given URL
const ENGINE_URL: &str = "http://localhost:10560";
const DUMMY_TOKEN: &str = "Bearer ZHVtbXlfdG9rZW4=";

#[tokio::main]
async fn main() -> Result<(), EngineError> {
    let client_factory = ClientFactory::new(ENGINE_URL, DUMMY_TOKEN);
    let client = client_factory.create_application_info_client();
    let info = client.get_application_info().await?;
    println!("{:#?}", info);
    Ok(())
}

Development

Prerequisites

Setup

  1. Clone this repository
  2. Run docker run -p 10560:80 5minds/processcube_engine:16.0.0 to start the 5Minds ProcessCube® Engine
  3. Ready to go!

You can now run cargo test to run the tests, or cargo run --bin processcube_engine_client to run the CLI tool. Swagger documentation for the API can be found at http://localhost:10560/.

Commit count: 74

cargo fmt