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

Activity Execution

Robert Mikes edited this page Jan 2, 2019 · 7 revisions

JooqClusterStorage

JooqClusterStorage: 111

  • createTables currently disabled, has to be run separately

Activity Execution

  • For each item an ItemImplementation instance is created in the memory.
  • When a CORBA call is received, Cristal finds the ItemImplementation object for the item and calls delegatedAction on it

ItemImplementation.delegatedAction() is invoked for all actions and predefined steps
The original idea behind delegated was that if an authorized agent goes on vacation, he delegates his duties to someone else.

  1. get the Workflow of the item
  2. Workflow.requestAction()
    1. find the Activity (vertex)
    2. call Activity.request() using itself as a locker object
    3. Activity.request()
      1. find requested Transition
      2. check authorization
      3. check that outcome was given if needed
      4. get new state
      5. Activity.runActivityLogic
        • run extra logic in predefined steps (overridden method in predefined steps)
      6. set new state and reservation
      7. unmarshal Outcome
      8. History.addEvent() -> RemoteMap.put() called for the event
        • TransactionManager.put()
          • caches the put() call (as a "pending transaction"), but only in an internal cache, does not invoke the ClusterStorage
          • calls are grouped by the locker object (basically used as a transaction ID)
      9. Gateway.getStorage().put() called for the outcome
      10. Gateway.getStorage().put() called for the attachment
      11. Gateway.getStorage().put() called for the viewpoint
      12. Gateway.getStorage().put() called for the last viewpoint
      13. Activity.updateItemProperties()
      14. runNext
      15. pushJobsToAgents
  3. store the new workflow if state changed
  4. handle Erase
  5. TransactionManager.commit() - called for the Workflow locker object: commits all the previous put() changes
    1. for each "pending transaction"
    2. ClusterStorageManager.put()
      1. call put() on all ClusterStorages
      2. JooqClusterStorage.put()
        • calls JooqHandler.put() on the JooqHandler corresponding to the ClusterType
        • calls DomainHandler.put() on all registered domain handlers to update domain specific tables - this sees ALL the changes done with the same locker object (i.e. in the same transaction) because of the get() implementation

The get() implementation

For example, if a DomainHandler executes a script (for example aggregate script) which reads a viewpoint (details schema): Script.evaluate()

Clone this wiki locally