Details
-
Sub-task
-
Resolution: Fixed
-
Major
-
3.0 Beta 1
-
None
-
None
Description
current implementation:
-------------------------------
- tree prepares params (map)
- passes the map to the context
- calls command.execute(context)
- command gets params (the map) from context
- if the command starts a workflow it neeeds to populate the workitem which is done hardcoded
- if a command is called from out the workflow it does
- take the item
- creates again the parameters map (hard coded)
- puts this into the context and calls finaly the command
intendend implementation:
-----------------------------------
- the parameters a set to the context (the magnolia context in the locale scope)
- the locale magnolia context is passed to the command
- the command used directly this context (to get parameters, manipulate parameters, pass return values, ...)
- if this command starts a workflow it passes all serializable parameters in the locale scope to the workitem (this should avoid implementing a command for each special case)
- if the workflow calls a command it creates a context which wraps the workitem (it's exaclty the same as for the request)
- as an addon we should also wrap the commands configuration in the context so that one can easely pass parameters to the command (like the workflow name to start)