How to use the workit-core.getVariablesWhenChanged 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-zeebe-client / src / zeebeMessage.ts View on Github external
async ack(message: IMessage | undefined, IWorkflowProps>) {
          if (this.hasBeenThreated) {
            return Promise.resolve();
          }

          // TODO: change any to real type body
          const vars = getVariablesWhenChanged(message, msg => ZeebeMessage.unwrap(msg));

          if (vars) {
            this.hasBeenThreated = complete.success(vars.variables);
          } else {
            this.hasBeenThreated = complete.success();
          }

          return Promise.resolve();
        },
        async nack(error: FailureException) {
github VilledeMontreal / workit / packages / workit-bpm-client / src / camundaMessage.ts View on Github external
async ack(message: IMessage) {
          if (this.hasBeenThreated) {
            return;
          }

          const vars = getVariablesWhenChanged(message, m => CamundaMessage.unwrap(m));

          await payload.taskService.complete(task, vars);
          this.hasBeenThreated = true;
        },
        /**