uddeshya pratik
uddeshya pratik

Reputation: 81

Generate BPMN with the http or rest connector using java library or Camunda library for Camunda

Trying to generate a BPMN diagram, even a basic one with start event, end event and some service tasks from which we can call a rest api and consume the api response. Is there any Java libraries or API's available that would help me achieve this. Have searched around a lot but could not find any suitable. Any help would be appreciated.

Upvotes: 0

Views: 81

Answers (1)

Yes, you can create a process with the BPMN model API.

BpmnModelInstance modelInstance = Bpmn.createExecutableProcess()
  .name("BPMN API Invoice Process")
  .[...]
  .userTask()
    .name("Assign Approver")
    .camundaAssignee("demo")
  .userTask()
    .id("approveInvoice")
    .name("Approve Invoice")
  .[...]
  .userTask()
    .name("Prepare Bank Transfer")
    .camundaCandidateGroups("accounting")
  .serviceTask()
    .name("Archive Invoice")
    .camundaClass("org.camunda.bpm.example.invoice.service.ArchiveInvoiceService")
  .[...]
  .done();

See:

Upvotes: 0

Related Questions