Codota Logo
CreateWorkflowInstanceCommandStep1.bpmnProcessId
Code IndexAdd Codota to your IDE (free)

How to use
bpmnProcessId
method
in
io.zeebe.client.api.commands.CreateWorkflowInstanceCommandStep1

Best Java code snippets using io.zeebe.client.api.commands.CreateWorkflowInstanceCommandStep1.bpmnProcessId (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: zeebe-io/zeebe

 public static void main(final String[] args) {
  final String broker = "127.0.0.1:26500";

  final String bpmnProcessId = "demoProcess";

  final ZeebeClientBuilder builder = ZeebeClient.newClientBuilder().brokerContactPoint(broker);

  try (ZeebeClient client = builder.build()) {

   System.out.println("Creating workflow instance");

   final WorkflowInstanceEvent workflowInstanceEvent =
     client
       .newCreateInstanceCommand()
       .bpmnProcessId(bpmnProcessId)
       .latestVersion()
       .send()
       .join();

   System.out.println(
     "Workflow instance created with key: " + workflowInstanceEvent.getWorkflowInstanceKey());
  }
 }
}
origin: zeebe-io/zeebe

/**
 * Creates a workflow instance for the given process ID, with the given payload.
 *
 * @param processId BPMN process ID
 * @param payload initial payload for the instance
 * @return unique ID used to interact with the instance
 */
public long createWorkflowInstance(String processId, Map<String, Object> payload) {
 return clientRule
   .getClient()
   .newCreateInstanceCommand()
   .bpmnProcessId(processId)
   .latestVersion()
   .payload(payload)
   .send()
   .join()
   .getWorkflowInstanceKey();
}
origin: io.zeebe/zeebe-test

/**
 * Creates a workflow instance for the given process ID, with the given payload.
 *
 * @param processId BPMN process ID
 * @param payload initial payload for the instance
 * @return unique ID used to interact with the instance
 */
public long createWorkflowInstance(String processId, Map<String, Object> payload) {
 return clientRule
   .getClient()
   .newCreateInstanceCommand()
   .bpmnProcessId(processId)
   .latestVersion()
   .payload(payload)
   .send()
   .join()
   .getWorkflowInstanceKey();
}
origin: berndruecker/flowing-retail

@StreamListener(target = Sink.INPUT, condition = "(headers['messageType']?:'')=='OrderPlacedEvent'")
public void orderPlacedReceived(String messageJson) throws JsonParseException, JsonMappingException, IOException {
 // read data
 Message<Order> message = new ObjectMapper().readValue(messageJson, new TypeReference<Message<Order>>() {});
 Order order = message.getPayload();
 
 // persist domain entity
 // (if we want to do this "transactional" this could be a step in the workflow)
 repository.save(order);
 // prepare data for workflow
 OrderFlowContext context = new OrderFlowContext();
 context.setOrderId(order.getId());
 context.setTraceId(message.getTraceId());
 // and kick of a new flow instance
 System.out.println("New order placed, start flow. " + context.asJson());
 zeebe.workflowClient().newCreateInstanceCommand() //
   .bpmnProcessId("order-kafka") //
   .latestVersion() // 
   .payload(context.asJson()) //
   .send().join();
}
origin: zeebe-io/zeebe

public static void main(final String[] args) {
 final String broker = "127.0.0.1:26500";
 final ZeebeClientBuilder builder = ZeebeClient.newClientBuilder().brokerContactPoint(broker);
 try (ZeebeClient client = builder.build()) {
  final Order order = new Order();
  order.setOrderId(31243);
  client
    .newCreateInstanceCommand()
    .bpmnProcessId("demoProcess")
    .latestVersion()
    .payload(order)
    .send()
    .join();
  client.newWorker().jobType("foo").handler(new DemoJobHandler()).open();
  // run until System.in receives exit command
  waitUntilSystemInput("exit");
 }
}
io.zeebe.client.api.commandsCreateWorkflowInstanceCommandStep1bpmnProcessId

Javadoc

Set the BPMN process id of the workflow to create an instance of. This is the static id of the process in the BPMN XML (i.e. "<bpmn:process id='my-workflow'>").

Popular methods of CreateWorkflowInstanceCommandStep1

    Popular in Java

    • Running tasks concurrently on multiple threads
    • getSharedPreferences (Context)
    • scheduleAtFixedRate (Timer)
      Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
    • putExtra (Intent)
    • Proxy (java.net)
      This class represents proxy server settings. A created instance of Proxy stores a type and an addres
    • URI (java.net)
      Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
    • SecureRandom (java.security)
      This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
    • PriorityQueue (java.util)
      An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
    • LogFactory (org.apache.commons.logging)
      A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
    • SAXParseException (org.xml.sax)
      Encapsulate an XML parse error or warning.This exception may include information for locating the er
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now