Commit Graph

83 Commits

Author SHA1 Message Date
Robert von Burg bbf021f73b [Fix] Fixed bug where changed element is not returned in streams 2018-06-22 11:38:24 +02:00
Robert von Burg 3eba63ff13 [Minor] code cleanup in planning tests 2018-03-26 10:41:25 +02:00
Robert von Burg abeceb7a6c [Minor] more waiting in LockingTest 2018-03-09 10:42:16 +01:00
Robert von Burg 4f2fd4648a [Fix] fix broken tests 2018-02-28 09:10:47 +01:00
Robert von Burg 676bb9c11e [Fix] Fixed broken tests 2018-02-28 09:04:49 +01:00
Robert von Burg c66f7c2805 [Major] Implement StrolchElement.isReadOnly() and .setReadOnly()
Modifying a read only element causes an exception. Retrieving elements from the TX, or directly from the ElementMap returns a clone, so nothing changes there. But elements returned by a query will have their readOnly flag set, thus if these are modified, then they need to be cloned first.
2018-02-27 14:46:23 +01:00
Robert von Burg f3ea159052 [Major] RIP transactional mode 2018-02-09 22:16:34 +01:00
Robert von Burg 2d60a352b4 [Fix] Fix not allow to re-add removed element with versioning enabled 2017-11-01 10:15:21 +01:00
Robert von Burg c0bf2ae428 [Major] Refactored GenericReport into Policies for extension 2017-10-18 13:11:39 +02:00
Robert von Burg adf53dd49f [Major] Implemented SingleSignOn facility for Privilege 2017-10-06 16:59:22 +02:00
Robert von Burg 4087608e1a [Fix] Throw Exception on programmer mistake if no commitOnClose with + 2017-10-05 09:54:42 +02:00
Robert von Burg dad2f35b16 [Major] Multiple changes to StrolchTransaction:
New:
- needsCommit() -> return true if objects or commands are registered
- hasResource()
- hasOrder()
- hasActivity()

Changes:
- When tx.add(), update() or remove() is called, then get*Template(),  or get*By() check the internal cache and thus e.g. a new resource is immediately available.
- the has*()-methods also check the internal cache, thus the need to get the underlying maps should now no longe be required in normal TX use.
2017-10-04 13:10:20 +02:00
Robert von Burg 2c5dddd893 [Major] rename add/update/remove methods in StrolchTransaction 2017-10-03 11:41:30 +02:00
Robert von Burg 84d3ca4666 [Minor] Some code cleanup for JDK 9 2017-09-29 16:21:21 +02:00
Robert von Burg 40c9d92bb2 [Fix] Fixed broken test 2017-07-27 14:27:47 +02:00
Robert von Burg e71b7b018b [Major] Now exposing StrolchTransaction.assertHasPrivilege()
Enforcing privilege checking was a bad idea
2017-07-25 14:12:51 +02:00
Robert von Burg c0cc6f57cb [Major] Added add, update and remove methods to TX for elements
Moved add, update and remove commands to agent package
2017-07-24 13:51:17 +02:00
Robert von Burg b8b0806e12 [New] Now StrolchTimedState compact only if boolean supplied 2017-06-08 14:33:59 +02:00
Robert von Burg 4c9e66876a [Major] Privilege passwords are now salted! 2017-05-22 14:37:48 +02:00
Robert von Burg 42c623cea6 [Major] Added Service.getArgumentInstance() 2017-05-16 15:18:38 +02:00
Robert von Burg 49f8e2bec5 [Fix] fixing broken tests 2017-05-03 16:47:49 +02:00
Robert von Burg fdc08d873d [Fix] Fixing StartActivityExecutionServiceTest test 2017-05-03 16:36:41 +02:00
Robert von Burg b13558eb65 [Fix] Fixing StartActivityExecutionServiceTest test 2017-05-03 16:24:04 +02:00
Robert von Burg b700bdf270 [New] Allow to hide objectType from report filter criteria 2017-05-03 16:06:56 +02:00
Robert von Burg 5f1f4af7b0 [Major] GenericReport now supports filter policies
The first two are:
- GreaterThan for FloatParameters
- Equals for strings
2017-05-03 15:32:20 +02:00
Robert von Burg f331babd3d [Minor] Small fixes 2017-04-25 19:47:15 +02:00
Robert von Burg d1a392f025 [Major] Changed the behaviour of the EventBasedExecutionHandler
Now execution is always performed asynchronously for each Action and an
Activity should be added to the ExecutionHandler by calling
.addForExecution(), so that it is executed later even if an action
couldn't be executed to it being reserved (for instance).
2017-04-22 19:25:27 +02:00
Reto Breitenmoser d469a035fb added commitOnClose statement and unit test 2017-03-28 22:19:55 +02:00
Robert von Burg 22892671a5 [New] Added searching of column parameter in GenericReport
If a column definition exists as follows:
  <Parameter Id="minQuantity" Name="Min Quantity" Type="String"
Interpretation="Resource-Ref" Uom="Storage"
Value="$search:parent:Bags/parameters/minQuantity" />
  
Then a search is done by looking on this element, and all "parent"
elements where the parent relation is defined by the parameter with the
id "parent". The first instance of the Parameter "minQuantity" is used
as the value for the report.
2017-03-22 14:55:54 +01:00
Robert von Burg 9c45bf2ec3 [New] GenericReport: DateRange filter, incl. $id, $type, $date, $state 2017-03-21 15:34:10 +01:00
Robert von Burg 332463f8a9 [New] Added GenericReport.generateFilterCriteria()
This allows the UI to show filter facets based on the actual data
2017-03-21 08:23:29 +01:00
Robert von Burg b0e57d6425 [New] Added filtering to GenericReport 2017-03-21 07:51:13 +01:00
Robert von Burg 30ad0fcaa8 [New] Added new generic report creator
Create a Report as follows:

<Resource Id="stockReport" Name="Stock Report" Type="Report">

  <ParameterBag Id="parameters" Name="parameters" Type="Parameters">
    <Parameter Id="objectType" Name="Object Type" Type="String"
Interpretation="Resource-Ref" Uom="Slot" Value="Slot" />
  </ParameterBag>

  <ParameterBag Id="columns" Name="Display Columns" Type="Display">
    <Parameter Id="location" Name="Location" Type="String"
Interpretation="Resource-Ref" Uom="Location" Value="$name" />
    <Parameter Id="storage" Name="Storage" Type="String"
Interpretation="Resource-Ref" Uom="Storage" Value="$name" />
    <Parameter Id="section" Name="Section" Type="String"
Interpretation="Resource-Ref" Uom="Section" Value="$name" />
    <Parameter Id="slot" Name="Slot" Type="String"
Interpretation="Resource-Ref" Uom="Slot" Value="$name" />
    <Parameter Id="product" Name="Product" Type="String"
Interpretation="Resource-Ref" Uom="Product" Value="$name" />
    <Parameter Id="quantity" Name="Quantity" Type="String"
Interpretation="Resource-Ref" Uom="Slot"
Value="Bags/parameters/quantity" />
    <Parameter Id="maxQuantity" Name="Quantity" Type="String"
Interpretation="Resource-Ref" Uom="Slot"
Value="Bags/parameters/maxQuantity" />
  </ParameterBag>

  <ParameterBag Id="joins" Name="Joins" Type="Joins">
    <Parameter Id="Product" Name="Product" Type="String"
Interpretation="Resource-Ref" Uom="Product" Value="Slot" />
    <Parameter Id="Section" Name="Section" Type="String"
Interpretation="Resource-Ref" Uom="Section" Value="Slot" />
    <Parameter Id="Storage" Name="Storage" Type="String"
Interpretation="Resource-Ref" Uom="Storage" Value="Section" />
    <Parameter Id="Location" Name="Location" Type="String"
Interpretation="Resource-Ref" Uom="Location" Value="Storage" />
  </ParameterBag>

</Resource>

This creates a report for objects of type Slot, where a Join is done on
multiple objects:
  Slot
    -> Product
    -> Section
         -> Storage
               -> Location

Thus the columns can then be fetched from different joing objects. The
joing is done by searching for a Parameter on the joined object on the
ParameterBag "relations". See the example XML on how this is done.

Or ask eitch@eitchnet.ch to write a proper documentation =))

Filtering is missing, and will be added later
2017-03-20 19:27:59 +01:00
Robert von Burg 5c8ccabd7f [New] Added new ReservationExection to reserve resources 2017-02-20 17:32:44 +01:00
Robert von Burg a67e18af40 [New] Added RuntimeMock.doServiceAssertResult() 2017-02-16 11:14:41 +01:00
Robert von Burg 061436e7ee [Project] Refactoring tests 2017-01-31 14:20:47 +01:00
Robert von Burg de1d569efd [Minor] Moved PrivilegeAddUserService to command, added tests 2017-01-31 14:20:14 +01:00
Robert von Burg 3be7f9e905 [Fix] Fix timing in execution tests for CI 2016-10-06 21:16:00 +02:00
Robert von Burg b775c00f4d [Major] Implemented ExecutionDuration and fixed deep execution
Using the DurationExecution:

<Activity Id="produceBicycle" Name="Activity" Type="ToStock" 
        TimeOrdering="Series">
  <ParameterBag Name="objectives" Id="Objectives" Type="Objectives">
    <Parameter Name="Duration" Id="duration" Value="PT0.01S" 
          Type="Duration" />
  </ParameterBag>
  <Action Id="produce" Name="Produce" ResourceId="bicycle" 
          ResourceType="Product" Type="Produce" />
</Activity>

IActivityElement now has a new method .findParameter() to search up the
activity hierarchy to find the element
2016-10-06 20:38:06 +02:00
Robert von Burg 811b71f543 [Major] Implemented EventBasedExecutionHandler
Now all Actions are executed, as long as Execution is done through the
ExecutionHandler
2016-09-30 16:35:16 +02:00
Robert von Burg aab5f0b22f [Major] Moved planning services to li.strolch.planning 2016-09-24 19:07:42 +02:00
Robert von Burg 65c02d2cc0 [Major] Implemented first version of Activity execution 2016-09-23 14:20:16 +02:00
Robert von Burg b4bc62d11c [Major] Implemented first version of Activity execution 2016-09-23 14:03:42 +02:00
Robert von Burg d413794213 [Major] Added Activity.TimeOrdering and updated Model XSD 2016-09-23 10:53:37 +02:00
Robert von Burg 02e0110fc6 [Minor] Refactoring packages of tests 2016-09-22 21:59:40 +02:00
Robert von Burg b7b9d63e79 [Major] Refactored services to use generic Arguments were applicable 2016-09-22 21:06:57 +02:00
Robert von Burg f8165208b1 [New] Added CRUD Services and Commands for Activities 2016-09-21 12:40:23 +02:00
Robert von Burg 6339f7df93 [Minor] Don't allow to add TimedState if already exists 2016-09-19 21:46:52 +02:00
Robert von Burg bcc0bf4a10 [Major] Now users can reset their own passwords
- built in User Challenge feature (currently only console)
- extended REST API to allow user to initiate a challenge and then use
the challenge to authenticate for a one time change password session
2016-09-07 14:41:16 +02:00
Robert von Burg 9dc09515e9 [Major] Implemented opt-in versioning
Now all root elements have a version, and if the realm has versioning
enabled, then actions through the ElementMap lead to new versions being
created. There are also methods to revert/undo changes to an object.

Some tests are still failing, this will be fixed later
2016-08-05 20:24:23 +02:00