Commit Graph

49 Commits

Author SHA1 Message Date
Janne Valkealahti
e62b09d2bb Overhaul gradle build
- Focus of this commit is to have modern gradle build.
- Migrate most of a plugin configurations from dsl
  into buildSrc.
- This fixes issues with existing docs build.
- Allows to sign files so that we have that part
  done for central in a build.
- We can skip publishing samples.
- We're able to share similar logic for modules
  which are meant for publish or just being samples.
- It's easier to upgrade gradle versions without
  getting various build issues.
- Relates #1143
2024-03-14 12:26:47 +00:00
Niels
19d1fc3836 Implement named transitions
- Backport #850
- Fixes #989
Co-authored-by: Niels Hoppe <niels.hoppe@fokus.fraunhofer.de>
2021-07-11 12:49:21 +01:00
Janne Valkealahti
69ba75453c Support uml model linking
- Essentially add support to be able to understand
  papyrus uml linked models.
- Change handling of files in a classpath(fat-jar) to copy
  those into jvm tmp directory in a structure where relative
  links can work.
- Forward port #888
2020-12-05 15:06:49 +00:00
Janne Valkealahti
644dd331cb Port uml tests to assertj 2020-11-22 10:38:27 +00:00
Janne Valkealahti
5b017e4b38 Missing spel effect with transition in uml
- Add missing resolve/create for action if type is defined as spel.
- Some additional reactive changes.
- Forward port #889
2020-11-22 09:28:37 +00:00
Janne Valkealahti
4e4ed2fc38 Polish 2020-09-06 09:45:07 +01:00
Janne Valkealahti
e7092a31f1 Initial reactive Guard changes
- First changes to introduce ReactiveGuard similar to work done
  for ReactiveAction. User level interface is ReactiveGuard but internally
  it is handled as its super type Function<StateContext<S, E>, Mono<Boolean>>.
- This change still keeps some calls as blocking which will get changed
  in futher commits to get a full reactive chain.
- Touching only Transition to change guard signature, other use of blocking guard
  internally need to get similar changes in next commits.
- Baby steps...
- Relates #791
2019-06-29 15:30:41 +01:00
Ming Deng
9f10700da2 Refactor to junit5
- remove junit4 dependecies
- refactor the unit tests by junit5
- enhance the spring-statemachine-test and spring-statemachine-build-tests so they can work together with junit4/junit5
- relates #779
2019-06-08 07:23:59 +01:00
Janne Valkealahti
cd37ab871a Reactive test changes for uml and recipes
- Relates #744
2019-05-10 16:19:42 +01:00
Janne Valkealahti
d8f1fc0155 Initial reactive action support
- This first commit related to reactive action support basically changes internal
  logic away from original Action interface which really is just
  a Consumer<StateContext> but it originates pre jdk8 era.
  Reactive equivalent internally is now Function<StateContext<S, E>, Mono<Void>>.
- Essentially actions will now get executed with a reactor chain fully.
- Fix StateMachineExecutorTransit in AbstractStateMachine to be full reactive
  chain which were needed to get reactive actions working. This also put
  StateContextTests back to its original state.
- Add typesafe interface ReactiveAction which simply wraps
  Function<StateContext<S, E>, Mono<Void>> and add this to transitions with
  actionFunction() as a concept. This will be added to states in next
  commits if actionFunction() as a concept works.
- Polish various things and issues which were not addressed with initial reactive commit.
- Disable ActionSecurityTests for now as secured Action bean now breaks because it's
  internally wrapped into a Function and Spring Security doesn't see it anymore.
  Security like this needs a bit of a overhaul which can be done later.
- State do actions which are done via scheduling needs some work as now we just do
  a subscribe which is probably a bit wrong. There's going to be more work for
  scheduling so this also can be left later stages.
- Relates #743
2019-05-06 17:03:21 +01:00
Spring Operator
426fa163b2 URL Cleanup
- Merge/squash #686 and #694
2019-05-03 15:01:31 +01:00
Janne Valkealahti
6867b5dc9e Fix pseudostate parent with uml machine references
- In a case where uml is drawn with submachine references where
  a pseudostate like choice is defined in a reference, UmlModelParser
  needs to find possible parent by following machine/state references
  to match a state name which references to a this particular machine.
- Actual bug was because pseudostate parent wasn't found it became null,
  thus causing it to be defined in a root machine which then caused
  other cascading errors like nasty loop shown in #729.
- Fixes #729
2019-04-18 17:45:37 +01:00
Janne Valkealahti
d698fc8d11 Allow auto naming for uml pseudostates
- Fixing issue when i.e. choice pseudostate is not named which
  then cause some other internal errors in a model parser.
- As pseudostate need to have a name, we now auto generate with
  pseudostate type name + counter.
- Fixes #591
2019-01-13 16:09:25 +00:00
Janne Valkealahti
6fc0c5e6e6 UML Factory facilities leak memory
- Refactor UmlStateMachineModelFactory and UmlUtils
  so that eclipse emf unloads a resource and thus
  should work better with gargage collections.
- Also try to clean out tmp files.
- Fixes #572
2018-07-10 17:11:14 +01:00
Janne Valkealahti
e2c2d4cbee Fix uml spel state action
- UmlModelParser wrongly set spel based state action as
  exit action. Change this to behave same as bean based
  action is used.
- Fixes #474
2018-01-23 09:56:27 +00:00
Janne Valkealahti
3884d48fef Support actions with transition via choice/junction pseudostate
- Adding support for javaconfig/uml to define
  actions for transitions leading out from a
  choice or junction states.
- Support for action for incoming transition is
  already implemented as it is defined as normal
  transition.
- Backport #108
- Relates #307
2017-05-05 14:57:15 +01:00
Janne Valkealahti
6e64797ac7 Support Connection Point References
- Add support to uml parser to properly
  detect and use exit/entry points if those
  are used via connection ref points with
  submachine references.
- Backport #323
- Relates to #307
2017-03-09 10:51:20 +00:00
Janne Valkealahti
554e374f80 Add tests
- Add tests related to discussion in #288
2016-12-06 03:23:12 +00:00
Janne Valkealahti
9c20ddd051 Fix state action tests
- Tests should now be more reliable as trying to
  make sure actions run before testing further.
- Fixes #257
2016-09-25 11:20:20 +01:00
Janne Valkealahti
51c9e72961 Update docs for StateMachineComponentResolver
- Relates to #238
2016-09-24 15:19:27 +01:00
Janne Valkealahti
693d7b8951 Fix StateMachineModelFactory usage
- When StateMachineModelFactory is passed into config
  it is now used everytime when machine is build which
  allows model factory to get a fresh model from its
  own storage if needed.
- Shuffled stuff around in machine factory base classes
  to call StateMachineModelFactory only once during a machine
  build operation.
- Other tweaks and a polish.
- Fixes #254
2016-09-23 15:44:13 +01:00
Janne Valkealahti
25e190c57d Fix local transition logic
- Add missing creating of a local transition
- Fix logic how entry/exit is not called with local
- Add tests comparing functionality with external
- Fixes #248
- Fixes #249
2016-09-11 10:25:05 +01:00
Janne Valkealahti
062bc9aa0e Support state activity
- AbstractState now extends LifecycleObjectSupport getting
  access to TaskScheduler.
- Modify all configs so that we can have a cancellable Action
  which is executed after state is entered and which is
  cancelled(if running) when state is exited.
- Fixes #239
2016-08-14 10:06:33 +01:00
Janne Valkealahti
c387979d75 Support for UML Sub State Machines
- Enhance config model so that a state can be
  configured as a submachine or a factory.
- With uml it's possible to put multiple machines
  into one xml(one needs to be a root machine) and
  in a same way, define state as a separate machine.
- JavaConfig vs. uml config differs in a bit where
  latter is passing raw model data into pojo config and
  JavaConfig either full machine or machine factory.
- Fixes #121
2016-08-13 07:19:21 +01:00
Janne Valkealahti
049f811f56 Refactor join handling
- Refactor how join is handled
- Add new StateListener for listening entry/exit per State.
- Transition is now passed to next guy from a join state.
- A lot of changes in core machine/factory/executor to support
  this new join handling.
- Fixes #235
- Fixes #237
2016-08-11 08:58:34 +01:00
Janne Valkealahti
ec21afc131 Refactor concepts around uml model factory
- Fixes #226
2016-05-17 09:11:14 +01:00
Janne Valkealahti
657c1d8e4b UmlModelParser breaks with shadow entries
- Fix so that unused transition with now source
  or target will not cause NPE.
- Fixes #218
2016-05-08 17:41:52 +01:00
Janne Valkealahti
84197d6ce5 Add tests
- Failed attempt to find failing tests for #216
  but then we can't ever have enought tests so
  stashing ongoing work here.
2016-05-01 19:27:30 +01:00
Janne Valkealahti
e7c28c2353 Add spel support for uml
- Now Guards and Actions can be defined
  as expressions if 'spel' language is used.
- Fixes #215
2016-05-01 15:35:50 +01:00
Janne Valkealahti
f7419d2c7d Support initial action in uml
- Add action detection from initial state
  vertex which then translates into initial state
  initial action.
- Fixes #213
2016-04-30 16:16:19 +01:00
Janne Valkealahti
a74e82a8f9 Fix missing guards in uml model
- Add defined guards to normal transitions.
- Fixes #212
2016-04-30 09:22:27 +01:00
Janne Valkealahti
8c0b95d679 Fix uml loading
- Now copying model into tmp file if it's not available
  as a physical file.
- Fixes #210
2016-04-25 07:51:24 +01:00
Janne Valkealahti
debc50cb56 Add support for timers in uml
- Can now use timers based on TimeEvent, TimeExpression
  and LiteralInteger.
- Fixes #207
2016-04-23 09:46:37 +01:00
Janne Valkealahti
1adca702f6 Add support for default history state
- Add mechanism for transition into a default
  state vertex in cases where i.e. substate has
  never been entered, thus meaning there is no
  history. Without default vertex, submachine now
  does default entry logic to that region.
- Fixes #204
2016-04-22 07:46:17 +01:00
Janne Valkealahti
510a796288 Support transition type in uml
- Fixes #202
2016-04-17 18:08:01 +01:00
Janne Valkealahti
b1c06b7d5d Support event deferring in uml
- Fixes #201
2016-04-17 17:32:51 +01:00
Janne Valkealahti
711910e3db Polish 2016-04-17 16:58:52 +01:00
Janne Valkealahti
9bf9d6cdfb Support resource loader in UmlStateMachineModelFactory
- Fixes #200
2016-04-17 16:10:44 +01:00
Janne Valkealahti
a4a4a28faf Support FunctionBehavior for actions
- Fixes #199
2016-04-17 15:24:40 +01:00
Janne Valkealahti
12ef87b692 Add junction state support for uml model
- Relates to #193
2016-04-16 17:18:08 +01:00
Janne Valkealahti
49b158d3c6 Add support for junction pseudostate
- Pretty much as choice as difference is more or less academic but
  needed for uml model.
- Fixes #42
2016-04-16 16:46:00 +01:00
Janne Valkealahti
5165221d84 Add history state support for uml model
- Relates to #193
2016-04-16 15:36:26 +01:00
Janne Valkealahti
7938086c46 Add fork and join state support for uml model
- Also add creation of an anonymous transition
- Relates to #193
2016-04-16 14:50:31 +01:00
Janne Valkealahti
78391822a9 Add choice state support for uml model
- Relates to #193
2016-04-16 12:24:58 +01:00
Janne Valkealahti
b5da16ac82 Update docs
- Relates to #194
2016-04-10 15:53:42 +01:00
Janne Valkealahti
cb7005b445 Add entry/exit points support for uml model
- Relates to #193
2016-04-10 14:59:11 +01:00
Janne Valkealahti
6f2e90f320 Add final state support for uml model
- Relates to #193
2016-04-10 10:00:50 +01:00
Janne Valkealahti
313fe954cb Add root regions support for uml model
- Now multiple root regions works via uml model.
- Relates to #193
2016-04-09 17:58:47 +01:00
Janne Valkealahti
51145f1368 Add base support for eclipse papyrus modeling
- First stage to add support for UI modeling via
  eclipse uml2 and papyrus frameworks.
- Add new interface StateMachineModelFactory which is
  a central point of building machines models outside
  of a normal annotation/build classes. What this mean is
  a hook to config model so that machine can be defined
  via a model factory, instead of writing config based on
  normal adapter callbacks.
- Integrate model config into an annotation model so that
  you can still use normal adapters but point those to
  model factory classes, which then allows external hooks
  for machine configuration.
- New spring-statemachine-uml package which supports
  eclipse uml2/emf frameworks to define a machine config.
- Relates to #193
2016-04-09 16:04:16 +01:00