Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Actions Board View Rule #2249

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
353edeb
feat(actions): Actions system infra.
michaelkleinhenz Aug 17, 2018
6ea5c68
fix(tests): Fixed the tests.
michaelkleinhenz Aug 17, 2018
be9dae7
fix(doc): Fixed documentation.
michaelkleinhenz Aug 17, 2018
529be05
Merge remote-tracking branch 'upstream/master' into actions_infra
michaelkleinhenz Aug 17, 2018
008f7ff
Merge branch 'master' into actions_infra
michaelkleinhenz Aug 17, 2018
72ad9ce
Merge branch 'master' into actions_infra
michaelkleinhenz Aug 17, 2018
ab89650
fix(doc): Added doc.
michaelkleinhenz Aug 17, 2018
b7fa5c0
fix(code): Moved Change.
michaelkleinhenz Aug 17, 2018
5589d68
fix(code): Refactoring Change.Set.
michaelkleinhenz Aug 17, 2018
f625367
fix(formatting): Format fixed.
michaelkleinhenz Aug 17, 2018
00305cf
fix(staterule): Added state rule.
michaelkleinhenz Aug 17, 2018
88fdfe9
fix(actions): Enabled state rule.
michaelkleinhenz Aug 17, 2018
a60efd3
Merge remote-tracking branch 'upstream/master' into actions_staterule
michaelkleinhenz Aug 20, 2018
532ca2f
Fixed formatting.
michaelkleinhenz Aug 20, 2018
fa75f51
Fix documentation.
michaelkleinhenz Aug 20, 2018
13d3f53
Merge branch 'master' into actions_staterule
michaelkleinhenz Aug 20, 2018
9aab756
Fixed WIT.
michaelkleinhenz Aug 20, 2018
94ca51e
Fixed golden files.
michaelkleinhenz Aug 20, 2018
0edeacc
Merge remote-tracking branch 'upstream/master' into actions_staterule
michaelkleinhenz Aug 24, 2018
e832f8b
Fixed PR comments.
michaelkleinhenz Aug 24, 2018
13640c8
Merge branch 'master' into actions_staterule
michaelkleinhenz Aug 24, 2018
1ce8bd8
Merge remote-tracking branch 'upstream/master' into actions_staterule
michaelkleinhenz Aug 27, 2018
5b4d19c
Fixed group loading.
michaelkleinhenz Aug 27, 2018
4764322
Used id.Slice.
michaelkleinhenz Aug 27, 2018
feecf1c
Fixed error reporting.
michaelkleinhenz Aug 27, 2018
4b6acc6
Added test for contains. Fixes memory leak.
michaelkleinhenz Aug 27, 2018
35e6034
Added test for removeElement.
michaelkleinhenz Aug 27, 2018
d867145
Added removeElement() test.
michaelkleinhenz Aug 27, 2018
dab1b62
Merge remote-tracking branch 'upstream/master' into actions_staterule
michaelkleinhenz Aug 27, 2018
f758549
Fixed slice creation.
michaelkleinhenz Aug 27, 2018
649ef2a
Removed debug code.
michaelkleinhenz Aug 27, 2018
58f5187
Fixed equals.
michaelkleinhenz Aug 27, 2018
973fe2d
Fixed isDirty structural inconsistency in onStateChange().
michaelkleinhenz Aug 28, 2018
69d1af4
Fixed err check.
michaelkleinhenz Aug 28, 2018
9a8d624
Fixed leftover bug.
michaelkleinhenz Aug 28, 2018
5001aa2
Changed return type on fuseChanges.
michaelkleinhenz Aug 28, 2018
7dafce4
Fixed tests, removed action instances.
michaelkleinhenz Aug 28, 2018
595316f
Merge branch 'master' into actions_staterule
michaelkleinhenz Aug 29, 2018
6f4d7fb
Fixed empty return bug.
Aug 31, 2018
3cb93a2
Removed redundant code.
Aug 31, 2018
f83ff16
Updated OnChange() signature to not work with cbr.
Aug 31, 2018
9f4de7d
Removed pointer args.
Aug 31, 2018
5ff5380
Merge remote-tracking branch 'upstream/master' into actions_staterule
michaelkleinhenz Sep 6, 2018
89c8cb4
Fixed some minor issues.
michaelkleinhenz Sep 6, 2018
e71b346
Merge remote-tracking branch 'upstream/master' into actions_staterule
kwk Sep 11, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions actions/actions.go
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
package actions

/*
The actions system is a key component for process automation in WIT. It provides
a way of executing user-configurable, dynamic process steps depending on user
settings, schema settings and events in the WIT.

The idea here is to provide a simple, yet powerful "publish-subscribe" system that
can connect any "event" in the system to any "action" with a clear decoupling
of events and actions with the goal of making the associations later dynamic and
configurable by the user ("user connects this event to this action"). Think
of a "IFTTT for WIT" (https://en.wikipedia.org/wiki/IFTTT).

Actions are generic and atomic execution steps that do exactly one task and
are configurable. The actions system around the actions provide a key-based
execution of the actions.

Some examples for an application of this system would be:
- closing all children of a parent WI that is being closed (the user connects the
"close" attribute change event of a WI to an action that closes all WIs of
a matching query).
- sending out notifications for mentions on markdown (the system executes an
action "send notification" for every mention found in markdown values).
- moving all WIs from one iteration to the next in the time sequence when
the original iteration is closed.

For all these automations, the actions system provides a re-usable, flexible
and later user configurable way of doing that without creating lots of
custom code and/or custom process implementations that are hardcoded in the
WIT.
*/

import (
"context"

Expand Down Expand Up @@ -72,14 +42,12 @@ func ExecuteActionsByChangeset(ctx context.Context, db application.DB, userID uu
Ctx: ctx,
UserID: &userID,
}, actionConfig, newContext, contextChanges, &actionChanges)
/* commented out for now until this rule is added
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please line comments. Then it is easier to follow what is affected.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.

case rules.ActionKeyStateToMetastate:
newContext, actionChanges, err = executeAction(rules.ActionStateToMetaState{
Db: db,
Ctx: ctx,
UserID: &userID,
}, actionConfig, newContext, contextChanges, &actionChanges)
*/
default:
return nil, nil, errs.New("action key " + actionKey + " is unknown")
}
Expand Down
2 changes: 1 addition & 1 deletion actions/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Package actions system is a key component for process automation in WIT. It prov
way of executing user-configurable, dynamic process steps depending on user
settings, schema settings and events in the WIT.

The idea here is to provide a simple, yet powerful "signal-slot" system that
The idea here is to provide a simple, yet powerful "publish-subscribe" system that
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have almost the same comment without relating to a package or something in actions/actions.go. Please remove the latter one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelkleinhenz great. But please try to use one commit per comment so it is easy to follow as a reviewer.

can connect any "event" in the system to any "action" with a clear decoupling of
events and actions with the goal of making the associations later dynamic and
configurable by the user ("user connects this event to this action"). Think
Expand Down
Loading