Background: so far, xowf stored workflow definitions in the workflow context, which is generated f…
Show more
Add Feature: Shared Workflow DefinitionsBackground: so far, xowf stored workflow definitions in the workflowcontext, which is generated for every instantiated workflow instancedue to the needs of the State Pattern. While the old approach worksperfectly fine, when pre request only one or a few workflow instancesare created, but is inefficient, when e.g. 100 or more instances ofthe workflow definition are created.Now, the instances can share the definition, which is shared based onthe revision_id of the workflow FormPage.OLD: obj <-> obj::wf_ctxNEW: obj <-> obj::wf_ctx <(n)----> wf_definitionOLD scenario: - the wf_definition was part of the context (no distinction) - navigation from wf_ctx (and wf_definition) to object was possible via "info parent"NEW scenario: - the wf_definition is separate - one wf_definition can be used for multiple wf_ctx - new methods are required instead of "info parent" to navigate between these cooperating objects * xowf::WorkflowPage.wf_context * xowf::WorkflowConstruct.wf_context * xowf::Context.wf_container The navigation from a WorkflowConstruct (e.g. State) to the wf_ctx is slow and fragile if not following usual programming conventions and should e avoided (the methods of these constructs have the obj passed in, so this path should not be necessary in most situations)- as long the contents of the wf_container is constant, it can be shared in the per-thread cache.For now, the new feature is turned off by default via variable::xowf::sharedWorkflowDefinition, but this will change in the future.
Show less