Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 3.27 KB

README.md

File metadata and controls

62 lines (42 loc) · 3.27 KB

.NET version of flowing-retail/rest

This example demonstrates stateful resilience patterns in a REST environment. A payment (micro-)service can retrieve payments if called via REST. It requires an upstream REST service to charge credit cards.

REST callstack

This simple call-chain is great to demonstrate various important resilience patterns.

See introduction for the storyline / patterns behind

Concrete technologies/frameworks in this folder:

  • .NET Core 2.0
  • C#
  • Polly 5.8.x
  • Camunda 7.x

How-to run

The first step is to run Camunda itself. You have two options:

docker run -d -p 8080:8080 camunda/camunda-bpm-platform:latest

See also Use Camunda without touching Java and get an easy-to-use REST-based orchestration and workflow engine for more details on this.

Hint: This project uses the unsupported Camunda Client Sample for C# available as NuGet Package: BerndRuecker.Sample.CamundaClient. This clients does the low level Camunda REST API handling and provides a proper C# API. However, it is just a sample developed for a showcase and not supported in any way.

In order to run the flowing-retail/rest example:

Now the different versions of the payment service are available:

You now can issue a PUT with an empty body:

curl \
-H "Content-Type: application/json" \
-X PUT \
-d '{}' \
http://localhost:8100/api/payment/v1

Hint on using Camunda Enterprise Edition

For Camunda there is an enterprise edition available with additional features in Cockpit (the monitoring tool). It is quite handy to use this when playing around with the example. You can easily switch to use enterprise edition:

Note that you do not need the enterprise edition to run the examples, the community edition will also do fine. But because of less features you do not see historical workflow instances - and that means you do not see that much in Camunda Cockpit if everything runs smoothly.