Skip to content

Releases: nocode-js/sequential-workflow-machine

0.7.1

17 Aug 13:32
2bb0159
Compare
Choose a tag to compare

This version introduces experimental support for workflow persistence. Please refer to the machine/src/activities/signal-activity/signal-activity-persistence.spec.ts file.

0.7.0

10 Aug 15:31
89923f8
Compare
Choose a tag to compare

This version introduces the signal activity. The signal activity stops the execution of the workflow machine and waits for a signal.

0.6.0

08 Jun 14:49
253d37c
Compare
Choose a tag to compare

This version introduces the parallel activity. The parallel activity allows to execute in the same time many activities.

Breaking Changes

  • The getStatePath method in the WorkflowMachineSnapshot class is deleted. Please use the tryGetStatePath method or the getStatePaths method instead.

0.5.2

18 Sep 19:30
3738a2c
Compare
Choose a tag to compare

This version adds a possibility to stop a workflow machine. To stop a workflow machine, you should call the tryStop() method of the WorkflowMachineInterpreter class.

0.5.1

16 Sep 19:28
283834b
Compare
Choose a tag to compare

This version adds a new feature to the fork activity. Now it's possible to skip all branches. The handler of the fork activity should return a value returned by the skip() function.

createForkActivity<BranchedStep, TestGlobalState>('if', {
  init: () => ({ /* ... */ }),
  handler: async (step, globalState, activityState) => {
    // ...
    return skip();
  }
})

0.5.0

16 Sep 16:08
c945fac
Compare
Choose a tag to compare

This version simplifies error handling:

  • The getSnapshot() method now returns an instance of the WorkflowMachineSnapshot class, which includes three new methods: isFinished(), isFailed(), and isInterrupted(). Additionally, you can retrieve the id of the last executing step by calling the tryGetCurrentStepId() method.
  • The unhandledError property of the snapshot class is always an instance of the MachineUnhandledError class.

0.4.0

05 Aug 20:40
63d598f
Compare
Choose a tag to compare

Updated the sequential-workflow-model dependency to the version 0.2.0.

0.3.2

20 Jul 21:18
d2a37d4
Compare
Choose a tag to compare

The LoopActivityEventHandler can return void or Promise now.

0.3.1

18 Jul 22:08
20c6b4b
Compare
Choose a tag to compare

This version adds a new feature to the break activity. Now it is possible to break a parent loop without specifying the name of the loop. The previous approach is still supported.

createBreakActivity<BreakStep>('break', {
  loopName: (step) => -1,
  // ...
});

0.3.0

15 Jul 15:59
8025a9d
Compare
Choose a tag to compare

This version changes the syntax of all create*Activity functions. The first argument is the step type, the second argument is the configuration.

// Old syntax
const fooActivity = createAtomActivity<FooStep, MyGlobalState, FooStateState>({
  stepType: 'foo',
  init: /* ... */,
  handler: /* ... */,
})

// New syntax
const fooActivity = createAtomActivity<FooStep, MyGlobalState, FooStateState>('foo', {
  init: /* ... */,
  handler: /* ... */,
})

Additionally this version introduces the createAtomActivityFromHandler function. It allows to create an activity by very short syntax. This function creates an activity without the activity state.

const fooActivity = createAtomActivityFromHandler<FooStep, MyGlobalState>('foo', async (step, globalState) => {
  // handler
});