How to use the workit-core.ProxyFactory.create function in workit-core

To help you get started, we’ve selected a few workit-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github VilledeMontreal / workit / packages / workit-bpm-client / src / camundaMessage.ts View on Github external
public static wrap(payload: { task: IVariablePayload; taskService: any }): [IMessage, ICamundaService] {
    const { task } = payload;
    const properties = CamundaMapperProperties.map(task);
    const messageWithoutSpan = {
      body: task.variables.getAll(),
      properties: properties as IWorkflowProps
    };
    // TODO: create a CamundaMessage builder
    const msg = ProxyFactory.create({
      body: messageWithoutSpan.body,
      properties: messageWithoutSpan.properties
    });
    return [
      msg,
      // TODO: create a CamundaService builder
      {
        hasBeenThreated: false,
        /**
         * Acknowledge the message to Camunda platform
         * Variables will be updated if change has been detected
         */
        async ack(message: IMessage) {
          if (this.hasBeenThreated) {
            return;
          }

workit-core

This package provides default and no-op implementations of the WorkIt types for client packages.

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis